GithubHelp home page GithubHelp logo

optionalg / hexa_payload_decoder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stratosphereips/hexa_payload_decoder

0.0 1.0 0.0 21 KB

A Bash script to automatically decode and translate any TCP hexa payload data form any language to english.

JavaScript 4.99% Python 5.98% Shell 89.03%

hexa_payload_decoder's Introduction

Hexa Payload Decoder

Arcane|Transmutation

Problem Statement

When analyzing malware traffic on the network sometimes we find ourselves spending several minutes decoding the data from the hexadecimal streams. In the best case scenario we can use some tools (like Wireshark) to see this hexadecimal streams already decoded, but sometimes the decoded characters are not supported by most of the networking analyzers.

The Solution

The idea is to develop a tool aimed to extract the TCP hexadecimal data from netwrok captures filtering by a specific port provided by the user, decode it from hexadecimal and translate it from any language to english.

The workflow of the tool is the following:

  • User runs the bash script with two parameters, the pcap file to analyze and some port.
  • The bash script extracts the hexadecimal data from the TCP flows filtering by the user provided port using Tshark command.
  • The extracted hexadecimal data is passed to CyberChef decoder which uses multiple decoding techniques to get the raw data in the language it had been written.
  • The decoded data is finally passed to Google Translate python library which automatically detects the language and translate it to english.
  • The decoded and translated data is written to an output file to see the results.
  • This flow repeats for every TCP flow found in the pcap.

Help:

  • Hexadecimal decoder and translator for network analysis. usage: payload_analyzer.sh [-h] [-d hexacode] [-p pcap] [-pp pcap port] where:
    • -h - show this help text
    • -d hexacode - to decode and translate given hexadecimal code and print the results in standard output
    • -p pcap - to decode and translate all TCP data in given pcap file and write the results in logfile payload_analyzer.log
    • -t pcap port - to decode and translate all TCP data in given pcap file filtering by giving port and write the results in logfile payload_analyzer.log
    • -l pcap port datalength - to decode and translate all TCP data in given pcap file filtering by giving port and data length and writes the results in logfile payload_analyzer.log
    • -c - clean all results in logfile payload_analyzer.log

Here is the script working with some example pcap:

Suspicious_payload_example


References:

hexa_payload_decoder's People

Contributors

agustinparmisano 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.