Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Anti-Tamper detection #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mp-ssi
Copy link

@mp-ssi mp-ssi commented Jul 11, 2017

Hi !

Working on confused samples with ConfuserEx v1.0.0, I noticed the anti-tamper detection didn't catch some cases. This PR offers some slight edition to catch the case described below.

Here is an example of a dummy .NET executable being confused:

Before confusion with anti-tamper:

[*]   SimpleDotNet_anti-tamper.exe
+-------+---------+-------------+------------------+-------------+-------------------+----+---+---+---+---+----------------------------------+---------+--------+------+-----+
| Name  | RVA     | VirtualSize | PointerToRawData | RawDataSize | Entropy           | EP | R | W | X | S | MD5                              | # Reloc | Relocs | # LN | LN  |
+-------+---------+-------------+------------------+-------------+-------------------+----+---+---+---+---+----------------------------------+---------+--------+------+-----+
| .text | 0x2000  | 0x1b39c     | 512              | 111616      | 7.960411437897488 |    | x |   | x |   | 12509d05d1577976180724ec32d03683 | 0x0     | 0x0    | 0x0  | 0x0 |
| .rsrc | 0x1e000 | 0x5fc       | 112128           | 1536        | 4.187690645126408 |    | x |   |   |   | d22b900f12aa137621868ea1b2e0e107 | 0x0     | 0x0    | 0x0  | 0x0 |
+-------+---------+-------------+------------------+-------------+-------------------+----+---+---+---+---+----------------------------------+---------+--------+------+-----+

After confusion with anti-tamper only:

[*]   Confused/SimpleDotNet_anti-tamper.exe
+----------+---------+-------------+------------------+-------------+-------------------+----+---+---+---+---+----------------------------------+---------+--------+------+-----+
| Name     | RVA     | VirtualSize | PointerToRawData | RawDataSize | Entropy           | EP | R | W | X | S | MD5                              | # Reloc | Relocs | # LN | LN  |
+----------+---------+-------------+------------------+-------------+-------------------+----+---+---+---+---+----------------------------------+---------+--------+------+-----+
| rIK�f4lx | 0x2000  | 0x198       | 512              | 512         | 7.60673719754518  |    | x | x | x |   | 914997f6ca6a979068f1c52ca49d8fff | 0x0     | 0x0    | 0x0  | 0x0 |
| .text    | 0x4000  | 0x1b700     | 1024             | 112640      | 7.961884587098321 |    | x |   | x |   | a14b15520ce026e50637ee8901de5314 | 0x0     | 0x0    | 0x0  | 0x0 |
| .rsrc    | 0x20000 | 0x5f8       | 113664           | 1536        | 4.176861570230687 |    | x |   |   |   | 8ca34402811171785fe108ea004092e2 | 0x0     | 0x0    | 0x0  | 0x0 |
+----------+---------+-------------+------------------+-------------+-------------------+----+---+---+---+---+----------------------------------+---------+--------+------+-----+

In this case, current NoFuserEx on the master branch will think there is no protection, but it actually is there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant