GithubHelp home page GithubHelp logo

ykankaya / avsignseek Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hegusung/avsignseek

0.0 1.0 0.0 16 KB

Tool written in python3 to determine where the AV signature is located in a binary/payload

License: MIT License

Python 100.00%

avsignseek's Introduction

AVSignSeek

Tool written in python3 to determine where the AV signature is located in a binary/payload

Usage

Zip (with a password) your binary/payload caught by an AV so it won't be detected when placed in an environment protected by an AntiVirus. Launch the tool and specify the zip password and filename in the zip with the -p and -f options (infected/infected.bin by default)

This tool won't work for complex signatures

./avsignseek.py zipfile.zip

The tool will drop multiple files on the disk to determine on which pattern the signature is based on. It will obviously generate a lot of AV alerts, might be a good idea to run this on an host with no internet connection.

Once done, the result will be printed in stdout and a file (output.txt by default) containing the result will be generated.

If you know approximatly where your signature is located, you can specify one or more range in the payload to be analysed using the -r option. In the following example AVSignSeek will only try to find a signature in the following ranges:

  • 0-256
  • 336-416
  • 432-endofpayload

Syntax:

./avsignseek.py zipfile.zip -r :0x100,0x150:0x1a0,0x1b0:

Help

Automatically detects AV Signatures

positional arguments:
  zip_file

optional arguments:
  -h, --help          show this help message and exit
  -s SLEEP            waiting time between 2 tests (default: 20)
  -p ZIP_PASSWORD     zip password (default: infected)
  -f FILENAME         file name contained in the zip (default: infected.bin)
  -l LIMIT_SIGN       signature limit (default: 64)
  -d TEST_DIR         directory where testfiles will be placed (default: .)
  --subdiv SUBDIV     subdiv per step (default: 4)
  -o OUTPUT_FILE      output_file (default: output.txt)
  -r RANGES_STR       range (default: ":")
  -b REPLACING_VALUE  character or byte used as a replacing value (default: "0x00")
  --manual            wait for a manual input instead of a specific time (default: false)

Output example

Reflective DLL caught by Kaspersky AV, the signature based on the exported dll function name "ReflectiveLoader"

=== AVSignSeek ===
[+] Signature between bytes 88220 and 88284
[+] Bytes:
4d 61 6c 77 61 72 65 54 65 73 74 2e 64 6c 6c 00 	MalwareTest.dll.
52 65 66 6c 65 63 74 69 76 65 4c 6f 61 64 65 72 	ReflectiveLoader
00 66 75 6e 63 5f 74 65 73 74 00 00 00 00 00 00 	.func_test......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 	................
[+] Strings:
> MalwareTest.dll
> ReflectiveLoader
> func_test

Troubleshooting

False Positives due to binary header

While trying to locate the AV signature, the AVSignSeek might break a header or another way used by the AV to determine the file type, and the AV won't detect the file as malicious anymore, resulting in a false positive. It can be prevented by using the start byte and end byte option (-s and -e) to remove the "header" from the analysis

Unable to locate the signature

If there is multiple signature in a single payload, AVSignSeek won't be able to locate them

Future developments

  • Multiple signature detection
  • PE-specific signature detection (it will detect in which section/exported function/... the signature is located)

avsignseek's People

Contributors

hegusung avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.