Flerken : Obfuscated Command Detection Tool

Flerken is an Open-source obfuscated command detection tool. Command line obfuscation has been proved to be a non-negligible factor in file-less malware or malicious actors that are “living off the land”.

To bypass signature-based detection, dedicated obfuscation techniques are shown to be used by red-team penetrations and even APT activities.

Meanwhile, numerous obfuscators (namely tools perform syntax transformation) are open sourced, thus making obfuscating given commands increasingly effortless.

However, the number of suitable defenses remains to be few. For Linux command line obfuscation,we can barely find any detection tools.

Concerning defenses against Windows command obfuscation, existing schemes turn out to either lack of toolization, or only partially resolve the entire problem, sometimes even inaccurately.

To better facilitate obfuscation detection, we have proposed Flerken, a toolized platform that can be used to detect both Windows (CMD and Powershell) and Linux (Bash) commands.

The name of Flerken is inspired by a cat-like yet extremely powerful creature from Marvel world. Flerken is build on the basis of carefully collection of black/white samples, and can be divided into two sub-schemes, namely Kindle (Windows obfuscation detector) and Octopus (Linux obfuscation detector).

To help optimize Flerken’s classification performance, we adopt techniques such as machine learning, bi-directional feature filter ring, script sandboxing.

Also Read : NAXSI : WAF For NGINX

Quick start : Installation

  • Step 1: Ensure you have installed python 3.x on your server, you can use the following command to check it.

[root@server:~$] python -V

  • Step 2: Install the required components, all the prerequisite components have been declared in requirement.txt.

[root@server:~$] pip install -r requirement.txt

  • Step 3: Login in your MySQL console, and import database

source /your path/Flerken/flerken/lib/flerken.sql

  • Step4: Custom your Flerken APP config as you want.

Path: flerken/config/global_config.py

  • Step5: Now you can run it!

[root@server:~$] python runApp.py

  • Step 6(Optional): You can build your own whitelists for reducing false positive rate.

Path: flerken/config/whitelists/

How to use

It’s very easy to use as shown in the following picture, and we will also release API interfaces as soon.\

Build-in 3rd parties

  • Flask
  • Flask-WTF
  • Flask-Limiter
  • frankie-huang/pythonMySQL
  • jQuery
  • Swiper

Credits: Yao Zhang, Zhiyang Zeng

R K

Recent Posts

Bomber : Navigating Security Vulnerabilities In SBOMs

bomber is an application that scans SBOMs for security vulnerabilities. So you've asked a vendor…

12 hours ago

EmbedPayloadInPng : A Guide To Embedding And Extracting Encrypted Payloads In PNG Files

Embed a payload within a PNG file by splitting the payload across multiple IDAT sections.…

12 hours ago

Exploit Street – Navigating The New Terrain Of Windows LPEs

Exploit-Street, where we dive into the ever-evolving world of cybersecurity with a focus on Local…

3 days ago

ShadowDumper – Advanced Techniques For LSASS Memory Extraction

Shadow Dumper is a powerful tool used to dump LSASS (Local Security Authority Subsystem Service)…

3 days ago

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

2 weeks ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

3 weeks ago