Javascript obfuscator tool
Содержание:
- Что такое обфускация в JavaScript?
- Деобфускация
- 5. Деобфускация Obfuscator.IO
- Usage
- Features
- Как работает VPN-обфускация?
- 3. Универсальный деобфускатор JavaScript кода de4js
- N =>
- What is Bashfuscator?
- 📓 Usage
- ❱ Architecture
- Обфускация кода
- Что такое обфускация
- Недостатки обфускации
- 4. JavaScript онлайн деобфускатор deobfuscatejavascript.com
- Usage
- S =>
- ❱ Installation
Что такое обфускация в JavaScript?
Проще говоря, обфускация кода — это метод, используемый для преобразования простого, легкочитаемого кода в новую версию, которая становится тяжелой для понимания и обратного проектирования — как для людей, так и для машин.
К примеру, есть код:
function hello(name) {
console.log('Hello, ' + name);
}
hello('New user');
Теперь рассмотрим тот же код, запутанный онлайн-обфускатором JavaScript:
eval(function(p,a,c,k,e,d){e=function(c){returnc};if(!''.replace(/^/,String)){while(c--){d=k||c}k=}];e=function(){return'\\w+'};c=1};while(c--){if(k){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k)}}return p}('3 0(1){2.4(\'5, \'+1)}0(\'7 6\');',8,8,'hello|name|console|function|log|Hello|user|New'.split('|'),0,{}))
Не зная, как выглядит исходный код, тому, кто читает, будет сложнее определить, что подразумевал автор. При этом полученный код будет работать так же, как и исходный.
Деобфускация
Что такое обфускация? Это процесс «запутывания» кода. Но когда мы размышляем об обфускации, то в любом случае появляется вопрос: а существует ли обратный процесс, чтобы можно было «распутать» «запутанный» код?
Однозначного ответа на этот вопрос нет. То есть, программы для выполнения обфускации есть, а таких программ, чтобы обфусцированный код приводили в первозданный образ – нет. Однако сам процесс деобфускации существует.
Под деобфускацией понимают процесс при котором «запутанный» код становится более читабельным и понятным. По сути, это и есть процесс оптимизации кода, который рассчитан на удаление всего лишнего из кода. А как мы помним, при обфускации добавляется много «мусорного» ненужного кода, который затрудняет чтение кода программы.
В большинстве компиляторов процесс оптимизации кода встроен по умолчанию. Поэтому считается, что обфускация программ на высокоуровневых языках программирования менее продуктивна, так как после прохождения кода программы через компилятор он подвергнется оптимизации.
Получается, что деобфускация кода — это и есть оптимизация кода. Но и это еще не все. К процессу деобфускации кода можно отнести еще процедуру декомпиляции программного кода. При декомпиляции программ из двоичного кода на выходе получается более-менее понятное представление исходного кода программы на каком-либо языке программирования высокого уровня. А это значит, что процедуру реверсивной инженерии после декомпиляции осуществить легче.
Также к процессу деобфускации подключаются дополнительные инструменты в виде статического и динамического анализа программ.
В конечном итоге получаем, что деобфускация — это не какая-то конкретная программа, а это комплекс мер, связанных с оптимизацией, декомпиляцией и анализом обфусцированного кода.
5. Деобфускация Obfuscator.IO
Автор сайта Obfuscator.IO ищет программы, которые способны деобфусцировать созданный на этом сервисе код и постоянно меняет, исправляет обфускацию, в результате чего инструменты по деобфускации перестают работать. Поэтому инструменты автоматической деобфускации (включая de4js) обычно отстают от самой последней версии, то есть могут деобфусцировать код созданный ранее на Obfuscator.IO, но не могут деобфусцировать последнюю версию кода. Но это не означает, что это надёжный инструмент чтобы обезопасить свой исходный код — регулярно появляются проекты, которые обходят все методы деобфускации. К тому же, специалисты на заказ могут деобфусцировать любой код.
Usage
1. Attaching the behavior
Prepare for obfuscation by attaching the Obfuscate behavior to your table(s)
and specifying which strategy you want to use as shown in the following examples.
use Muffin\Obfuscate\Model\Behavior\Strategy\HashIdStrategy;
$this->addBehavior('Muffin/Obfuscate.Obfuscate', [
// Strategy constructor parameter:
// $salt - Random alpha numeric string. You can also set "Obfuscate.salt"
// $minLength (optional) - The minimum hash length. Default: 0
// $alphabet (optional) - Custom alphabet to generate hash from. Default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
// config instead of passing salt to construction.
// DO NOT USE same salt as set for "Security.salt" config.
'strategy' => new HashIdStrategy('5SX0TEjkR1mLOw8Gvq2VyJxIFhgCAYidrclDWaM3so9bfzZpuUenKtP74QNH6B', 10, 'abcdefghijklmnopqrstuvwxyz')
]);
use Muffin\Obfuscate\Model\Behavior\Strategy\OptimusStrategy;
$this->addBehavior('Muffin/Obfuscate.Obfuscate', [
// Strategy constructor parameters:
// $prime - Large prime number lower than 2147483647
// $inverse - The inverse prime so that (PRIME * INVERSE) & MAXID == 1
// $random - A large random integer lower than 2147483647
// You can use vendor/bin/optimus spark to generate these set of numbers.
'strategy' => new OptimusStrategy(2123809381, 1885413229, 146808189)
]);
use Muffin\Obfuscate\Model\Behavior\Strategy\TinyStrategy;
$this->addBehavior('Muffin/Obfuscate.Obfuscate', [
// Strategy constructor parameters:
// $set - Random alpha-numeric set where each character must only be used exactly once
'strategy' => new TinyStrategy('5SX0TEjkR1mLOw8Gvq2VyJxIFhgCAYidrclDWaM3so9bfzZpuUenKtP74QNH6B')
]);
2. Using the custom finders
This plugin comes with the following two custom finders that are responsible for
the actual obfuscation (cloaking) and elucidation (uncloaking) process:
- : used to find records using an obfuscated (cloaked) primary key
- : used to obfuscate (cloak) all primary keys in a find result set
findObfuscated
Use this finder if you want to look up a record using an obfuscated id.
The plugin will elucidate (uncloak) the obfuscated id and will execute the find
using the «normal» primary key as it is used inside your database.
CakePHP example:
public function view($id)
{
$article = $this->Articles->find('obfuscated')
->where() // For e.g. if value for $id is 'S' it will search for actual id 1
->first();
}
Crud plugin example:
public function view()
{
$this->Crud->on('beforeFind', function (EventInterface $event) {
$event->subject()->query->find('obfuscated');
});
}
findObfuscate
Use this finder if you want the plugin to obfuscate all «normal» primary keys
found in a find result set.
CakePHP example:
public function index()
{
$articles = $this->Articles->find('obfuscate');
}
Crud plugin example:
public function index()
{
$this->Crud->on('beforePaginate', function (EventInterface $event) {
$event->subject()->query->find('obfuscate');
});
}
Attaching the behavior also makes the following two methods
available on the table:
Features
| Features | Descriptions | Purpose of obfuscation | Compatibility with all types of python codes/syntaxes |
|---|---|---|---|
| Delete comments | Delete all comments (this feature is executed by default) | Delete potential behavioral informations | high |
| Delete line spaces | Delete all spaces line (this feature is executed by default) | Reduce the code visibility in clear | high |
| Correction padding empty classes/functions | Add padding to empty classes and functions, if the class or function contains comments only, the default feature can potentially let a class or function empty, this will avoid to generate an error (this feature is executed by default) | None, only to avoid to generate errors | high |
| Replace string to string mixed | Replace all names of variables/classes/functions to random strings with length defined | Reduce the code visibility in clear — Delay the deduction of the behavior of variables/classes/functions | low — high (depends of number of names that must exclude or not) |
| Exclude words | file to exclude word (check documentation for the format) only for ‘replace file name’ obfuscation feature | Information not required | Information not required |
| Padding script | Add padding of random scripts after each line | Reduce the code visibility in clear — add dead snippets code/classes/functions to blur and delay behavior analysis of program | high |
| Replace files name | Replace all files name to random strings with length defined | Reduce the code visibility in clear — Reduce the deduction of functionnalities of files | low |
| Exclude file names | file to exclude file names (check documentation for the format) only for ‘replace file name’ obfuscation feature | Information not required | Information not required |
| Replace string to hex | Replace all chars to their hexadecimal value | Reduce the code visibility in clear / avoid to be detected by the ‘grep’ commands per example | medium |
| Correction delete pyc file | Delete all pyc file in output directory (this feature is executed by default) | Delete files already compiled without having been obfuscated before | high |
| Mixer length lower | Define random strings length of chars when or or or parameters are specified | The longer the length is used, the more difficult the visibility of the code | Information not required |
| Mixer length medium | Define random strings length of chars when or or or parameters are specified | The longer the length is used, the more difficult the visibility of the code | Information not required |
| Mixer length high | Define random strings length of chars when or or or parameters are specified | The longer the length is used, the more difficult the visibility of the code | Information not required |
- Features can be executed separatly:
- ->
- ->
- ->
- ->
Как работает VPN-обфускация?
Читая о функциях различных VPN, вы можете встретить термины, связанные с маскировкой VPN. Есть много «модных слов», связанных с этой темой, но многие из них означают примерно одно и то же. Некоторыми примерами являются «скрытый VPN» или «скрытый режим», «технология маскировки» и «запутанные серверы». Все это означает, что VPN использует какой-то способ запутывания, чтобы замаскировать ваш трафик когда вы используете соответствующие настройки. Некоторые провайдеры придумали новые названия для своих методов запутывания, например, «Режим NoBorders» Surfshark и «Протокол Chameleon» VyprVPN.
Так что же они на самом деле делают с вашим VPN-трафиком? Ниже приведены некоторые методы, которые VPN-провайдеры могут использовать для обфускации
Обратите внимание, что для работы любого вида запутывания необходимо настроить клиент и сервер для его использования. Например, для работы Obfsproxy необходимо настроить приложение VPN и сервер.
Obfsproxy

Obfsproxy является подпроектом проекта Tor (отвечает за анонимный браузер Tor). Он был создан в ответ на блокировку трафика Tor в некоторых странах, например в Китае. Он запутывает трафик Tor, так что он больше не распознается. Хотя Obfsproxy был разработан для использования с Tor, его также можно использовать с OpenVPN.
Obfsproxy запускает различные подключаемые транспорты, которые по-разному работают, чтобы скрыть трафик OpenVPN. используемый сменный транспорт зависит от типа блока это обходится. В настоящее время наиболее распространенным подключаемым транспортом, используемым для трафика OpenVPN, является obfs4, который работает путем скремблирования трафика, чтобы он выглядел, по сути, как ничто..
Stunnel
Stunnel — это программное обеспечение с открытым исходным кодом, которое маскирует трафик OpenVPN как трафик TLS / SSL. TLS / SSL — это тип шифрования, используемый HTTPS. VPN-трафик маршрутизируется через туннель TLS / SSL, добавив еще один уровень шифрования и сделав так, чтобы любой слежка показала, что это обычный HTTPS-трафик.
OpenVPN XOR схватка

OpenVPN XOR scramble использует XOR-шифр для маскировки трафика OpenVPN. Это простой шифр, который предполагает замену значения каждого бита данных другим значением. Этого достаточно, чтобы некоторые методы DPI могли больше не обнаруживать подпись OpenVPN. Тем не менее, простота XOR означает, что он не всегда эффективен против правительственных блоков.
Стоит отметить, что XOR приобрел известность как популярный инструмент, используемый разработчиками вредоносных программ, чтобы скрыть свой код от обнаружения..
3. Универсальный деобфускатор JavaScript кода de4js
de4js — это деобфускатор исходного кода JavaScript и распаковщик.
Поддерживает (деобфусцирует) результат работы следующих инструментов, сервисов, методов:
- Eval, используются, например, в Packer, WiseLoop
- Array, используются, например, в Javascript Obfuscator, Free JS Obfuscator
- _Number
- Packer
- Javascript Obfuscator
- Free JS Obfuscator
- Obfuscator.IO (но не всегда срабатывает, так как этот сервис часто обновляется, что требует обновление деобфускатора)
- My Obfuscate
- Кодирование URL, используются, например, в bookmarklet
- JSFuck
- JJencode
- AAencode
- WiseLoop
Информацию об установке и запуске вы найдёте на странице программы: https://kali.tools/?p=6514
de4js запускается как небольшой сервер к которому можно подключиться веб-браузером. То есть у программы веб-интерфейс.
Перейдите в папку с программой:
cd bin/de4js
Запустите сервер:
npm start

В веб-браузере откройте адрес http://127.0.0.1:4000/de4js/
В веб-интерфейсе выберите один из способов ввода обфусцированного исходного кода:
- String — вставить код в окно веб-интерфейса
- Local File — выбрать локальный файл на компьютере
- Remote File — указать адрес удалённого файла

Ниже вы можете указать способ, которым выполнялась обфускация кода JavaScript:
- None
- Eval
- Array
- Obfuscator IO
- _Number
- JSFuck
- JJencode
- AAencode
- URLencode
- Packer
- JS Obfuscator
- My Obfuscate
- Wise Eval
- Wise Function
- Clean Source
- Unreadable
Либо вы можете нажать кнопку «Auto Decode», чтобы de4js автоматически определила способ обфускации. Деобфусцированный код будет показан в окне ниже.
Дополнительные опции, которые вы можете включить или выключить:
- Line numbers — показывать номера строк
- Format Code — форматирование и подсветка синтаксиса кода
- Unescape strings — перевод строк из экранированных последовательностей в нормальный вид
- Recover object-path — восстановить object-path
- Execute expression — вычислить выражения
- Merge strings — объединить (слить) строки
- Remove grouping — удаление группировки
de4js онлайн: https://lelinhtinh.github.io/de4js/
N =>
netshrink
netshrink — netshrink is an exe packer aka executable compressor, application password protector and virtual DLL binder for Windows & Linux .NET applications.
NetFuscate
NetFuscate — NETFuscate is a .NET obfuscator and a .NET code protection tool that offers protection against reverse engineering of your code.
NETGuard
NETGuard — NETGuard.IO will decompose your file, encrypt your strings, data, resources, methods, will perform numerous runtime-based verifications to ensure a fully-shielded security for
your file. The list of feature can be founded on our official documentation page.
NET Reactor
NET Reactor — NET Reactor is a powerful .NET code protection and software licensing system which completely stops any decompiling.
What is Bashfuscator?
Bashfuscator is a modular and extendable Bash obfuscation framework written in Python 3. It provides numerous different ways of making Bash one-liners or scripts much more difficult to understand. It accomplishes this by generating convoluted, randomized Bash code that at runtime evaluates to the original input and executes it. Bashfuscator makes generating highly obfuscated Bash commands and scripts easy, both from the command line and as a Python library.
The purpose of this project is to give Red Team the ability to bypass static detections on a Linux system, and the knowledge and tools to write better Bash obfuscation techniques.
This framework was also developed with Blue Team in mind. With this framework, Blue Team can easily generate thousands of unique obfuscated scripts or commands to help create and test detections of Bash obfuscation.
This is a list of all the media (i.e. youtube videos) or links to slides about Bashfuscator.
Bsides Charm
Payload support
Though Bashfuscator does work on UNIX systems, many of the payloads it generates will not. This is because most UNIX systems use BSD style utilities, and Bashfuscator was built to work with GNU style utilities. In the future BSD payload support may be added, but for now payloads generated with Bashfuscator should work on GNU Linux systems with Bash 4.0 or newer.
📓 Usage
Take out before to obfuscate
First of all, please make sure to strip the PHP open/close tags and
If you specify code to be obfuscated with , you will get a critical syntax error.
Example 1
<?php
require 'src/Obfuscator.php';
$sData = <<<'DATA'
echo 'This is my PHP code, can be class class, interface, trait, etc. in PHP 5, 7, 7.2, 7.4 and higher.';
DATA;
$sObfusationData = new Obfuscator($sData, 'Class/Code NAME');
file_put_contents('my_obfuscated_data.php', '<?php ' . "\r\n" . $sObfusationData);
Run the freshly created, and you will see:
If you open the file, you will see that your code is totally hidden (obfuscated).
Example 2
<?php
require 'src/Obfuscator.php';
$sData = <<<'DATA'
$hour = date('H');
echo 'The hour (of the server) is ' . date('H:m');
echo ', and will give the following message:<br><br>';
if ($hour < 10) {
echo 'Have a good morning!';
} elseif ($hour < 20) {
echo 'Have a good day!';
} else {
echo 'Have a good night! zZz z';
}
DATA;
$sObfusationData = new Obfuscator($sData, 'Give a name to the piece of code you want to obfuscate');
file_put_contents('obfuscated_code.php', '<?php ' . "\r\n" . $sObfusationData);
Run file and you will see something like below:
The hour (of the server) is 19, and will give the following message: Have a good day!
Example 3
<?php
require 'src/Obfuscator.php';
$filename = 'myphpfile'; // A PHP filename (without .php) that you want to obfuscate
$sData = file_get_contents($filename . '.php');
$sData = str_replace(array('<?php', '<?', '?>'), '', $sData); // We strip the open/close PHP tags
$sObfusationData = new Obfuscator($sData, 'Class/Code NAME');
file_put_contents($filename . '_obfuscated.php', '<?php ' . "\r\n" . $sObfusationData);
❱ Architecture

Obfuscapk is designed to be modular and easy to extend, so it’s built using a
plugin system. Consequently, every obfuscator is
a plugin that inherits from an abstract
base class
and needs to implement the method . When the tool starts processing a new
Android application file, it creates an
obfuscation object
to store all the needed information (e.g., the location of the decompiled code)
and the internal state of the operations (e.g., the list of already used obfuscators).
Then the obfuscation object is passed, as a parameter to the method, to all
the active plugins/obfuscators (in sequence) to be processed and modified. The list and
the order of the active plugins is specified through .
The tool is easily extensible with new obfuscators: it’s enough to add the source code
implementing the obfuscation technique and the plugin metadata (a
file) in the
directory (take a simple existing obfuscator like
as a starting example). The tool will detect automatically the new plugin, so no
further configuration is needed (the new plugin will be treated like all the other
plugins bundled with the tool).
Обфускация кода
Обфускацию применяют все: как создатели программ, так и создатели вирусов, чтобы обезопасить свой код от чужого вмешательства.
Обфусцированный код представляет собой запутанный программный код, в котором сложно проследить хоть какие-то логические взаимосвязи. Поэтому такой код очень трудно изучать, трансформировать и, тем более, модифицировать под свои потребности — это усложняет жизнь посторонним лицам, которые задались целью изучить уникальный алгоритм функционирования обфусцированной программы. В роли таких посторонних лиц могут выступать как злоумышленники, так и рядовые программисты, которые, допустим, хотят клонировать успешную программу.
Обфускация — это всего лишь дополнительный способ обезопасить код программного продукта, который часто используется с дополнительными инструментами защиты, такими как:
- шифрование программного кода;
- установка подлинности скриптов;
- «водяной знак» в коде;
- выполнение программы на стороне сервера и др.
В качестве единственного инструмента защиты кода, обфускация не способна дать 100%-ую защиту.
Что такое обфускация
Обфускация — это изменение исходного кода таким образом, чтобы он становился трудно понимаемым, но чтобы при этом не изменялась его функциональность. Обфускация применяется для исходного кода на интерпретируемых (а не компилируемых) языках программирования. То есть это JavaScript, PHP, обфускация может применяться для HTML (хотя это язык разметки, а не программирования), CSS и других, программы на которых не компилируют, а запускают в виде простых текстов.
Особенно актуальна обфускация для JavaScript, поскольку в отличии, например, от того же PHP, который выполняется на веб сервере, JavaScript загружается в браузер и каждый пользователь может иметь доступ к скриптам.
Обфускация использует разные приёмы. Один из них — это удаление пробелов. Это называется минимизацией кода и используется не только для запутывания, сколько для ускорения скачивания скриптов. Хотя в таком коде становится действительно трудно разобраться.

Часто при обфускации код превращается в бессмысленный набор функций и строк в которых невозможно разобраться, но которые в конечном счёте делают ровно то же самое, что и исходный код. Но есть и действительно потрясающие примеры обфускации, например, JSFuck может отобразить любой JavaScript код с помощью всего лишь шести следующих символов []()!+
К примеру, следующий код является рабочим JavaScript кодом:
[]+[])]+(]+[]])+]]+(![]+[])+!+[]]+(!![]+[])]+(!![]+[])+!+[]+!+[]]+(!![]+[])]]+[])]+(]+[] ])+]]+(![]+[])+!+[]]+(!![]+[])]+(!![]+[])+!+[]+!+[]]+ (!![]+[])]]+[])+!+[]+!+[]]+(!![]+[]+[])]+(]+[]])+]]+(![]+[])+!+[]]+(!![]+[])]+(!![]+[])+!+[]+!+[]]+(!!+[])]])+]]+([]]+[])]+(![]+[])+!+[]+!+[]]+(!![] +[])]+(!![]+[])]+([]]+[])]+([]+[])]+(]+[]])+]]+(![]+[])+!+[]]+(!![]+[])]+(!![]+[])+!+[]+!+[]]+(!! []+[])]]+[])+!+[]+!+[]]+(!![]+[])]+(!![]+[]+[])]+(]+[]])+]]+(![]+[])+!+[]]+(!![]+[])]+(!![]+[])+!++!+[]]+(!![]+[])]])+]]+(!![]+[])]]((![]+[])]+(!+[])+!+[]]+(!![]+[])+!+[]+!+[]]+(!![]+[])]+(!![]+[])]+(! []+[]+[])]+(]+[]])+]]+(![]+[])+!+[]]+(!![]+[]) ]+(!![]+[])+!+[]+!+[]]+(!![]+[])]])+!+[]+]]+]+( !![]+[]+[])]+(]+[]])+]]+(![]+[])+!+[]]+(!![]+)]+(!![]+[])+!+[]+!+[]]+(!![]+[])]])+!+[]+]])()
Обфускация используется как легитимными пользователями, которые хотят защитить свои идеи и свой код от воровства, так и хакерами для затруднения анализа их приёмов и программ.
Недостатки обфускации
- Хотя обфускация может сделать чтение, запись и обратное проектирование программы трудным и трудоемким, она не обязательно сделает это невозможным.
- Это добавляет времени и усложняет процесс сборки для разработчиков.
- Это может значительно затруднить отладку после того, как программное обеспечение было запутано.
- Как только код становится заброшенным и больше не поддерживается, любители могут захотеть поддерживать программу, добавлять моды или лучше понимать ее. Обфускация затрудняет конечным пользователям выполнение полезных вещей с кодом.
- Определенные виды обфускации (например, код, который не является просто локальным двоичным файлом и при необходимости загружает мини-двоичные файлы с веб-сервера) могут снизить производительность и / или потребовать доступа в Интернет.
4. JavaScript онлайн деобфускатор deobfuscatejavascript.com
Адрес сервиса: http://deobfuscatejavascript.com/
Исходный код этого сервиса не размещён на GitHub’е, но этот продукт тоже с открытым исходным кодом, поскольку все операции выполняются в браузере, а функции деобфускации вынесены в файл http://deobfuscatejavascript.com/deobfuscate.js.
Код, проанализированный этим инструментом, будет выполнен в вашем браузере. Этот инструмент предназначен только для перехвата вызовов, выполняемых функциями eval() и write(), которые обычно используются в качестве конечной функции во вредоносных JavaScript-скриптах. Некоторые вредоносные скрипты могут не использовать эти функции и поэтому могут заразить ваш браузер.
Этот инструмент предназначен для помощи аналитикам в деобфускации вредоносных JavasSripts. Он не интерпретирует HTML, поэтому любой HTML должен быть удалён для правильной деобфускации кода. Скрипт также не должен содержать синтаксических ошибок для получения правильных результатов.
Чёрные дыры, целевые страницы и наборы эксплойтов используют обфускацию для того, чтобы скрыть намерения кода при уменьшении вероятности обнаружения. Когда скрипты упакованы, исходный код становится данными, а видимый код — процедурой деобфускации. Во время выполнения данные распаковываются подпрограммой, и результатом является строка, которая должна быть обработана (исполнена) как код для выполнения. Этот инструмент во время процедуры деобфускации возвращая эту строку кода, но не запускает её выполнение. Полученный код показывается с подсветкой синтаксиса.
Usage
Prints the help page on the screen
Shows the version of the obfuscator
Input JAR
Output JAR
Config File
Class Path
A JS file to script certain parts of the obfuscation
Sets the number of threads the obfuscator should use
Sets logging to verbose mode
Excluding Classes
In some situations you need to prevent certain classes from being obfuscated, such as dependencies packaged with your jar or mixins in a forge mod.
You will need to exclude in two places.
Scripting Tab
Here is an example script that will obfuscate and remap all classes except the org.json dependency and mixins.
function isRemappingEnabledForClass(node) {
var flag1 = !node.name.startsWith("org/json");
var flag2 = !node.name.startsWith("com/client/mixin");
return flag1 && flag2;
}
function isObfuscatorEnabledForClass(node) {
var flag1 = !node.name.startsWith("org/json");
var flag2 = !node.name.startsWith("com/client/mixin");
return flag1 && flag2;
}
Name Obfuscation
If you also want to exclude these classes from name obfuscation you will need to go to Transformers -> Name Obfuscation and add these exclusions there.
To Exclude the same classes as we did above, we would need to add the following to Excluded classes, methods and fields.
org.json.** com.client.mixin.**
If your classes are still being obfuscated after applyinng both of these exclusions please open an issue.
S =>
Semantic Designs
Semantic Designs — The C# Obfuscator tool scrambles C# source code to make it very difficult to understand or reverse-engineer
SharpObfuscator
SharpObfuscator — It is a Software Protection tool, designed to help .NET developers efficiently protect their software. It will obfuscate and protect your .NET code, optimize your .NET assembly for better deployment, minimize distribution size, increase performance & add powerful post-deployment debugging capabilities.
Skater .NET Obfuscator
Skater .NET Obfuscator — Rustemsoft proposes Skater .NET Obfuscator, an obfuscation tool for .NET code protection. It implements all known software protection techniques and obfuscation algorithms.
String Encrypt
String Encrypt — Encrypt strings in source code & files using randomly generated algorithms, and generate the corresponding unique decryption code for any supported programming language.
Spices
Spices — Spices.Net Obfuscator is a .Net code obfuscation, protection and optimization tool that offers the wide range of technologies to completely protect your .Net code and secure your data.
❱ Installation
There are two ways of getting a working copy of Obfuscapk on your own computer: either
by or by
in a environment. In both cases, the first thing to do is to get a local
copy of this repository, so open up a terminal in the directory where you want to save
the project and clone the repository:
$ git clone https://github.com/ClaudiuGeorgiu/Obfuscapk.git
Docker image
Prerequisites
This is the suggested way of installing Obfuscapk, since the only requirement is to
have a recent version of Docker installed:
$ docker --version Docker version 19.03.0, build aeac949
Official Docker Hub image
$ # Download the Docker image. $ docker pull claudiugeorgiu/obfuscapk $ # Give it a shorter name. $ docker tag claudiugeorgiu/obfuscapk obfuscapk
Install
If you downloaded the official image from Docker Hub, you are ready to use the tool so
go ahead and check the , otherwise execute the following
command in the previously created directory (the folder containing the
) to build the Docker image:
$ # Make sure to run the command in Obfuscapk/src/ directory. $ # It will take some time to download and install all the dependencies. $ docker build -t obfuscapk .
When the Docker image is ready, make a quick test to check that everything was
installed correctly:
$ docker run --rm -it obfuscapk --help usage: python3 -m obfuscapk.cli -o OBFUSCATOR ...
Obfuscapk is now ready to be used, see the for more
information.
Prerequisites
$ apktool Apktool v2.5.0 - a tool for reengineering Android apk files ...
$ apksigner
Usage: apksigner <command>
apksigner --version
apksigner --help
...
$ zipalign Zip alignment utility Copyright (C) 2009 The Android Open Source Project ...
To install and use you need a recent version of Java.
and are included in the Android SDK. The location of the
executables can also be specified through the following environment variables:
, and (e.g., in Ubuntu, run
before running Obfuscapk in the same
terminal).
Apart from the above tools, the only requirement of this project is a working
(at least ) installation (along with its package manager ).
Install
Run the following commands in the main directory of the project () to
install the needed dependencies:
$ # Make sure to run the commands in Obfuscapk/ directory. $ # The usage of a virtual environment is highly recommended, e.g., virtualenv. $ # If not using virtualenv (https://virtualenv.pypa.io/), skip the next 2 lines. $ virtualenv -p python3 venv $ source venv/bin/activate $ # Install Obfuscapk's requirements. $ python3 -m pip install -r src/requirements.txt
After the requirements are installed, make a quick test to check that everything works
correctly:
$ cd src/ $ # The following command has to be executed always from Obfuscapk/src/ directory $ # or by adding Obfuscapk/src/ directory to PYTHONPATH environment variable. $ python3 -m obfuscapk.cli --help usage: python3 -m obfuscapk.cli -o OBFUSCATOR ...
Obfuscapk is now ready to be used, see the for more
information.