About

Why Quark?

Android malware analysis engine is not a new story. Every antivirus company has their own secrets to build it. With curiosity, we develop a malware scoring system from the perspective of Taiwan Criminal Law in an easy but solid way.

We have an order theory of criminal which explains stages of committing a crime. For example, crime of murder consists of five stages, they are determined, conspiracy, preparation, start and practice. The latter the stage the more we’re sure that the crime is practiced.

According to the above principle, . We developed five stages to see if the malicious activity is being practiced. They are 1. Permission requested. 2. Native API call. 3. Certain combination of native API. 4. Calling sequence of native API. 5. APIs that handle the same register. We not only define malicious activities and their stages but also develop weights and thresholds for calculating the threat level of a malware.

Malware evolved with new techniques to gain difficulties for reverse engineering. Obfuscation is one of the most commonly used techniques. In this talk, we present a Dalvik bytecode loader with the order theory of android malware to neglect certain cases of obfuscation.

Our Dalvik bytecode loader consists of functionalities such as 1. Finding cross reference and calling sequence of the native API. 2. Tracing the bytecode register. The combination of these functionalities (yes, the order theory) not only can neglect obfuscation but also match perfectly to the design of our malware scoring system.

История разработки алгоритма, особенности

Алгоритм Quark изобретен в 2013 году Жаном-Филиппом Аумассоном, Вилли Мейером, Марией Ная-Пласенсией и Лукой Хензеном. Его особенностью стало параллельное использование шести хеш-функций:

  • Skein;
  • Blue Midnight Wish;
  • Grostl;
  • JH;
  • Blake;
  • Keccak (SHA-3).

Создание этого алгоритма было обусловлено потребностями разработчиков мобильных приложений с протоколом RFID, который требует облегченной хеш-функции. Используемый SHA-3 протокол ориентирован в основном на программное обеспечение для ПК.

Quark — одноуровневая хеш-функция, состоящая из девяти раундов шифрования по шести криптографическим алгоритмам, с низкими требованиями к оперативной памяти. Quark обеспечивает высокую 64-битную защиту от хакерских атак и отличается низким потреблением электроэнергии, что делает этот алгоритм перспективным для применения в майнинге криптовалют.

Design and Digital

QuarkXPress

QuarkXPress is a page layout and graphic design software that lets anyone create and publish rich, compelling materials for print, the Web, e-readers, tablets, and other digital media using one easy tool. Its proven professional design features make QuarkXPress the must-have software for in-house, agency, and independent designers.


App Studio

App Studio is the leading cloud-based HTML5 solution that turns print into interactive award-winning tablet experiences. Using HTML5, App Studio translates content easily to the iPad and other tablets using the software you already know: QuarkXPress and InDesign. For large organizations, App Studio integrates fully with Quark Enterprise Solutions to automate the delivery of digital publications.

Преимущества и недостатки

Ввиду неудачного воплощения перспективной задумки можно выделить всего два преимущества криптовалюты Кварк:

  • Быстрая и, главное, доступная генерация монет, которая не предъявляет высоких требований к оборудованию.
  • Молниеносное формирование блоков, из чего следует моментальная обработка транзакций в пределах 30-40 секунд.

В тот же момент основное преимущество крипты стало и ее решающим недостатком. Она быстро потеряла интерес для инвесторов, так как не представляла ценности для рынка. Получить и продать единицы мог каждый, у кого были должная сноровка и производительный персональный компьютер. За полгода была добыта большая часть монет, и смысл в майнинге пропал за ненадобностью. Не смотря на это, Кварк до сих пор поддерживается многими биржами, хотя калькуляторы, графики и курсы показывают неблагоприятные для проекта цифры.

Обзор майнинга Quark: кошельки, майнеры и пулы

Для майнинга Quark необходимо создать кошелек:

  1. Для 32-разрядных версий Windows — https://github.com/quark-project/quark/releases/download/v10.6.1/quark-0.10.6.1-qt-win32.zip
  2. Для 64-разрядных версий Windows — https://github.com/quark-project/quark/releases/download/v0.10.6.1/quark-0.10.6.1-qt-win64.zip
  3. Для устройств под управлением MacOS — https://github.com/quark-project/quark/releases/download/v0.10.6.1/quark-0.10.6.1-qt-osx.dmg

Добычей этого типа криптовалюты занимаются следующие miner-программы:

  • https://github.com/palmd/Cp3u
  • https://github.com/Neisklar/quarkcoin-cpuminer
  • https://github.com/prettyhatemachine/sph-sgminer

Также есть возможность заниматься майнингом соло.

Сервера-pool, которые настроены на добычу coin Quark:

  • Mineblocks.ch
  • Aikapool.com
  • Mpool.me

А также биржи, которые производят обмен и вывод:

  • Cryptopia
  • Novaexchange
  • Nlexch.com

Оборудование для майнинга

Алгоритм Quark допускает майнинг на центральных процессорах, но более эффективно это делать на видеокартах с чипом AMD или Nvidia. Примерная вычислительная мощность видеокарт на чипе AMD по алгоритму Quark:

  • R295 – 20 Mh/s;
  • R9 390 – 18,6 Mh/s;
  • R9 NANO – 25,6 Mh/s;
  • HD 7990 – 28 Mh/s.

На чипе Nvidia:

  • GTX 1070 – 25,86 Mh/s;
  • RX 480 – 5 Mh/s;
  • GTX 970 – 16,6 Mh/s;
  • RX 980 Ti – 28,64 Mh/s;
  • GTX 750 – 6,3 Mh/s.

С недавнего времени были разработаны специальные вычислительные устройства большой мощности — ASIC, поддерживающие алгоритм Quark:

  • Baikal miner BK-X – 900 Mh/s;
  • Baikal Giant+ A2000 – 2000 Mh/s.

Алгоритм Quark считается следующим поколением механизмов хеширования. Он обладает неоспоримыми достоинствами и высокими показателями энергоэффективности.

Install with DevStack and Neutron

  • Ensure you have a user already with sudo rights. If you need one, do this as root:

    /usr/sbin/adduser stack
    echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
    
  • Switch to user with sudo rights:

    sudo su - stack  # or whatever user you already have (instead of stack)
    
  • Clone devstack:

    git clone https://github.com/openstack-dev/devstack
    
  • Go into devstack folder:

    cd devstack
    
  • Create the local.conf configuration file that DevStack needs (localrc is inside it now) with Neutron as an anabled service (NOTE: This notation is explained here):

    ]
    DATABASE_PASSWORD=password
    ADMIN_PASSWORD=password
    SERVICE_PASSWORD=password
    SERVICE_TOKEN=password
    RABBIT_PASSWORD=password
    # Enable Logging
    LOGFILE=/opt/stack/logs/stack.sh.log
    VERBOSE=True
    LOG_COLOR=True
    SCREEN_LOGDIR=/opt/stack/logs
    # Pre-requisite
    ENABLED_SERVICES=rabbit,mysql,key
    # Horizon (always use the trunk)
    ENABLED_SERVICES+=,horizon
    HORIZON_REPO=https://github.com/openstack/horizon
    HORIZON_BRANCH=master
    # Nova
    ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch
    IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
    # Glance
    ENABLED_SERVICES+=,g-api,g-reg
    # Neutron
    ENABLED_SERVICES+=,q-api,q-svc,q-agt,q-dhcp,q-l3,q-lbaas,q-meta,neutron
    # Cinder
    ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch
    # Tempest
    ENABLED_SERVICES+=,tempest
    
  • Remove Python’s six packge:

    sudo rm -f /usr/lib/python2.7/dist-packages/six.py /usr/lib/python2.7/dist-packages/six.pyc
    # Old version of six package in /usr/lib/python2.7/dist-packages/ crashes
    # quark server

  • Install Devstack:

    ./stack.sh
    
  • Install aiclib:

    sudo pip install aiclib
    # the reason for sudo here is if you don't you'll get permission denied when it tries to install to /usr/local/lib/python2.7/dist/packages
    
  • Install quark:

    cd /opt/stack  #the folder where devstack installed all the services
    git clone https://github.com/rackerlabs/quark
    cd quark
    sudo python setup.py develop
    # the reason for sudo here is if you don't you'll get permission denied when it tries to install to /usr/local/lib/python2.7/dist/packages
    
  • Validate quark installed:

    pip freeze | grep quark
    # should see something like:
    # -e git+http://github.com/rackerlabs/quark@ff5b05943b44a44712b9fc352065a414bb2a6bf9#egg=quark-master
    
  • Now edit the /etc/neutron/neutron.conf file to setup Quark as the core plugin:

    vim /etc/neutron/neutron.conf
    # Search for line containing 'core_plugin = ' and replace it with
    # 'core_plugin = quark.plugin.Plugin'
    #
    # Search for line containing 'service_plugins = ' and remove
    # 'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin,' from
    # service plugins list
    
  • Stop Neutron by going into the screen session and going to the q-svc window and pressing ctrl-C:

    screen -r  # or go into devstack clone and then type ./rejoin-stack.sh
    # press ctrl+6 to go to q-svc window
    ctrl+C
    
  • Go back into screen and restart neutron (q-svc window):

    screen -r  stack # or go into folder where you cloned devstack then type ./rejoin-stack.sh
    # if screen command returns 'Cannot open your terminal /dev/pts/0' execute 'sudo chmod o+rwx /dev/pts/0'
    # go to q-svc window (ctrl+a, 7 currently does it)
    # previous command that devstack used to start neutron should be in history, press up arrow key to see it
    
  • You shouldn’t receive any errors. To validate Quark has started up, you can scroll up in q-svc screen window (ctrl+a, esc, page-up) and look for the following lines:

    DEBUG neutron.service  core_plugin = quark.plugin.Plugin
    ...
    DEBUG neutron.service  QUARK.default_ipam_strategy=ANY
    DEBUG neutron.service  QUARK.default_net_strategy={}
    DEBUG neutron.service  QUARK.default_network_type=BASE
    DEBUG neutron.service  QUARK.ipam_driver=quark.ipam.QuarkIpam
    DEBUG neutron.service  QUARK.ipam_reuse_after=7200
    DEBUG neutron.service  QUARK.net_driver=quark.drivers.base.BaseDriver
    DEBUG neutron.service  QUARK.strategy_driver=quark.network_strategy.JSONStrategy
    

Quark Enterprise Solutions


Quark Publishing Platform

Quark Publishing Platform is a broad-reaching customer communication solution that streamlines and automates the publishing process. The modules of Quark Publishing Platform work together to automatically enable the assembly of content for different audiences, and publication and media types, creating an end-to-end publishing workflow that speeds time-to-market, improves customer satisfaction and lowers costs.


Quark Author

Quark Author is a Web-based content creation software that, together with Quark Publishing Platform, enables business and IT leaders to streamline and automate high-value customer communications across every channel. The intuitive online authoring experience means subject matter experts – wherever they are – can rapidly create, preview, publish and reuse content.


Quark XML Author

Quark XML Author is an add-in to Microsoft Word that enables subject matter experts to create semantic and metadata-rich content that can be reused, repurposed, and published automatically to multiple media and device formats. Quark XML Author integrates directly into Quark Publishing Platform, as well as content management systems such as IBM FileNet Content Manager and Microsoft SharePoint.

Docurated

Docurated is the sales enablement platform that lets sales teams find, customize and share content, while empowering marketing to measure content effectiveness and revenue contribution. Guided selling — powered by AI — recommends the most effective content for each selling scenario.


QuarkCopyDesk

QuarkCopyDesk provides the ability to edit content without altering the layout. Using components designated as editable, authors can amend text, place photos, and precisely fit copy.


QuarkXPress Server

QuarkXPress Server fuses the graphic capabilities of QuarkXPress with server-based automation. It is easy to program, integrate and scale, and can automate manual processes.

О проекте

Криптовалюта Quark основана летом 2013 года разработчиком Max Guevara. Как базу для разработки он взял исходный код популярного Биткоина, усовершенствовал и лишил главных недостатков – преимущественно «пробелов» в безопасности. Защите валюты было уделено больше всего внимания. Для проекта Max Guevara выбрал кодирование транзакций при помощи шести полуавтономных алгоритмов и девяти «кругов» хэширования.

Такая сложная структура обеспечила стабильность и устойчивость к хакерским атакам. Благодаря ей система функционирует, даже если строя выходит один алгоритм шифрования.

Это сделало Quark лидером по безопасности среди электронных валют состоянием на 2013 год. Пользователи могут быстро и без проблем расплачиваться монетами за покупки, и переводить средства в любую точку земного шара за считанные секунды (что в двадцать раз быстрее, чем у «прародителя» крипты – Биткоина).

В 2013 году Quarkcoin на фоне растущей популярности занял четвертое место по рыночной стоимости среди функционирующих крипто-проектов. Блоки на тот момент генерировались в 20 раз быстрее, чем у BTC, что сделало Кварк легкой добычей для предприимчивых майнеров. Монеты добывались легко, а на некоторых ценовых скачках сотни пользователей преумножили свои капиталы в сотни раз.

После ошеломляющего успеха проекта ждал ошеломляющий провал. С 2014 года курс криптовалюты Quark застыл на отметке меньше цента, и этому показателю не суждено вырасти. Его можно не рассматривать как источник для инвестирования.

https://youtube.com/watch?v=MIXGt0kjmYM

Usage

Add and to the development dependencies of your project.

# pubspec.yaml
dev_dependencies:
  quark: any
  test: any # To get access to the test runner executable
> pub get
# Run the tests with the usual test runner command
> pub run test

Unit Testing

// lib/greeter.dart

class Greeter {
  final Greeting greeting;

  Greeter(this.greeting);

  String greet(String name) {
    return '${greeting.phrase}, $name!';
  }
}

// An example of a collaborator that can be mocked
class Greeting {
  final String phrase;

  const Greeting(this.phrase);
}
// test/unit/greeter_test.dart
import 'package:quark/quark.dart';
export 'package:quark/init.dart';

import 'package:greeter/greeter.dart';

// Clean test double declaration inspired by Mockito
class GreetingDouble extends TestDouble implements Greeting {}

class GreeterTest extends UnitTest {
  @test itGreetsAPerson() {
    // Creation using test double
    final greeting = new GreetingDouble();
    final greeter = new Greeter(greeting);

    // The greeting will return "Yo"
    when(greeting.phrase).thenReturn('Yo');

    // Make the assertion
    expect(greeter.greet('buddy'), 'Yo, buddy!');

    // Verify that the phrase was fetched from the greeting.
    verify(greeting.phrase).wasCalled();
  }
}

Integration Testing with Gherkin Features!

# test/integration/welcome_on_home_screen.feature
Feature: Welcome message on the home screen

Scenario: Not logged in
  Given I'm not logged in
  When I visit the home page
  Then I expect to see "Hello, Guest!"

To write the implementations of feature steps, extend the class and
and annotate with the annotation.

// test/integration/welcome_on_home_screen_test.dart

// The TestOn annotation and browser.dart export enables
// reading features by relative URI.
@TestOn('browser')
export 'package:quark/browser.dart';

// There is also a vm implementation.
// @TestOn('vm')
// export 'package:quark/vm.dart';

import 'package:quark/quark.dart';
export 'package:quark/init.dart';

@Feature('welcome_on_home_screen.feature')
// The Gherkin can also be written inline and can then be run in both
// the browser and the vm.
// @Feature('''
//   Feature: ...
// ''')
class WelcomeMessageOnTheHomeScreenTest extends IntegrationTest {
  @Given("I'm not logged in")
  imNotLoggedIn() {}

  @When("I visit the home page")
  iVisitTheHomePage() {}

  @Then("I expect to see \"(.*?)\"")
  iExpectToSee(String message) {}
}

If there are steps in the feature that have no implementation in the test, the test runner
will print out snippets that can be copied into the test. Simple!

Преимущества алгоритма

Использование алгоритма Quark в механизмах достижения консенсуса POW или POS, призван обеспечить повышенный уровень безопасности и определенности при поддержании функционирования криптовалютной экосистемы. Это достигается за счет высокой сложности и изощренности применяемых алгоритмов. В отличие от SHA-256, применяемого в сети Биткоин, алгоритм Quark защищен от опасности возникновения единой точки отказа (SPOF), что может остановить всю систему.

Например, вычислительный прорыв выводит из строя хеш-функцию SHA256, аналогичная ситуация с Quark не приведет к сбоям системы, пока не будет нарушена работа всех шести хешей одновременно. При выявлении проблемной части ее можно заменить на другую хеш-функцию, без ущерба для работоспособности всей экосистемы.

Большинство криптовалют являются объектами инвестиций или финансовых спекуляций, применение алгоритма Quark, обеспечивает уверенность в сохранности цифровых активов и дает высокий уровень безопасности.

Сравнение Биткоина и Кварка

Сравнение сходств и различий Биткоина и форка Кварке будет происходить по основным параметрам, которые интересуют майнеров:

  • Безопасность. Так как ВТС был криптовалютой-пионером, в его системе безопасности много брешей, и она не справляется с полученной нагрузкой. Для шифрования используется SHA-256, который уже долгое время попадает под экспертную и пользовательскую критику за свою уязвимость. В свою очередь Quark использует усовершенствованную структуру защиты, о которой говорилось в предыдущем разделе. Она состоит из 6 современных алгоритмов, которые продолжают функционировать, даже если из строя выведен один, а также из 9 раундов хэширования. В плане безопасности Биткоин проигрывает Кварку.
  • Майнинг. В начале своего пути ВТС был «ходовой» криптовалютой, которую можно было майнить даже на откровенно средних пользовательских устройствах. Однако с ростом рыночной капитализации и популярности, требования к оборудованию и стартовым вложениям начали расти. На данный момент начать добывать «биток» с нуля без крупных капиталов и дорогостоящих GPU-ферм – невозможно. Единственная альтернатива – облачные сервисы, которые взымают серьезные комиссии. В период полного функционирования у системы Quarkcoin требования были гораздо лояльнее. Блоки генерировались в 20 раз быстрее, чем у прямого конкурента, но это, несмотря на пользу для начинающих майнеров, привело проект к провалу. Из-за перемайна за полгода было добыто 247 миллионов единиц, поэтому разработчикам пришлось заложить искусственную инфляцию, чтобы в последующие годы выпускать по 1 миллиону монет. С одной стороны это можно считать плюсом, так как вероятность превратить майнинг Кварка в «гонку вооружений» свелась к нулю, но с другой стороны это привело к обесцениванию валюты и полному упадку существующей системы.
  • Скорость. В плане скорости обработки транзакций Биткоин уступает практически всем перспективным проектам. Переводы исполняются в рамках непозволительно долгих сроков – минимум 10 минут и до нескольких часов (а в случае с перегруженностью серверов во время сильных скачков стоимости – до суток). Именно этот фактор отвернул многих пользователей ВТС в сторону других «шустрых» криптовалют. В свою очередь среднее время подтверждения транзакции в сети QRK не превышает отметки в 40 секунд.
  • Распределение. По этому параметру Биткоин также уступает Кварку по всем фронтам. Постоянный рост требований и запросов системы к современному оборудованию урезал аудиторию битка до маленькой группы людей, владеющей 85% всех криптовалютных капиталов (большинство из которых являются резидентами азиатских стран). АСИК-оборудование обходится дорого не только на этапе покупки, но и в процессе обслуживания. Минимальные стартовые затраты для начала майнинга превышают отметку в 10 000 долларов США. Quark же в основу идеи заложил доступность добычи для всех, в том числе и для владельцев производительных персональных компьютеров. Это подтверждается рядом факторов: основные «запасы» крипты находятся в руках не ограниченного небольшого круга пользователей, а у тысяч людей со всего мира, а также тем моментом, что большинство монет (247 миллионов) было добыто за короткий промежуток времени – за 6 месяцев. Простота и доступность майнинга снизила рыночную стоимость криптовалюты до рекордно низких отметок.

Easy to Use and Reading Friendly Report

Quark is very easy to use and also provides flexible output formats. There are 6 types of output reports: detail report,
call graph, rules classification, summary report, label-based report, behaviors comparison radar chart. Please see below for more details.

Detail Report

This is how we examine a real android malware (candy corn) with one single rule (crime).

$ quark -a 14d9f1a92dd984d6040cc41ed06e273e.apk -d

and the report will look like:

There is the possibility to select only one label to filter the rules:

quark -a 14d9f1a92dd984d6040cc41ed06e273e.apk -d network

There is also the possibility to select only one rule:

quark -a 14d9f1a92dd984d6040cc41ed06e273e.apk -d 00058.json

Call Graph for Every Potential Malicious Activity

You can add the option to the quark command, and you can
get the call graph (only those rules match with 100% confidence)

quark -a Ahmyth.apk -s -g

Rules Classification

You can add the option to the quark command, and you can
output the rules classification with the mutual parent function (only those rules match with 100% confidence).

quark -a Ahmyth.apk -s -c

Summary Report

Examine with rules.

quark -a 14d9f1a92dd984d6040cc41ed06e273e.apk -s

There is the possibility to select only one label to filter the rules:

quark -a 14d9f1a92dd984d6040cc41ed06e273e.apk -s network

There is also the possibility to select only one rule:

quark -a 14d9f1a92dd984d6040cc41ed06e273e.apk -s <path_to_rule_folder>/00058.json

(If you want to select one of the rules of Quark-Rule, the default path to Quark-Rule is .)

Check which topic (indicated by labels) of the malware is more aggressive.

quark -a Ahmyth.apk -l detailed

Behaviors Comparison Radar Chart

With the following command, you can compare different APK actions based on the max confidence of rule labels and generate
a radar chart.

quark -a first.apk -a second.apk -C

Parallelizing Quark

Now Quark supports multiprocessing for analyzing APKs parallelly, by adding the option and set the number of processes. (the default is the number of CPUs in your computer.)

quark -a Ahmyth.apk -s --multi-process 4

Upcoming unstable feature

Now Quark also supports Rizin as one of our Android analysis frameworks. You can use option with to enable the Rizin-based analysis library.

quark -a Ahmyth.apk -s --core-library rizin
Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *