Cyber security

Todesstern – The Advanced Mutator Engine For Injection Vulnerability Discovery

Todesstern (in english: Death Star) is a simple mutator engine which focuses on finding unknown classes of injection vulnerabilities.

The script generates tons of mutated payloads from a user-given string, which are used to find anomalies. 

Note: While this tool helps you on finding anomalies, it is your job to further analyze the output which might lead to vulnerabilities.

It is highly recommended to practice this tool with the Portswigger Labs before going on real-targets to understand what is going on.

Engine Setup

Make sure to configure the engine by making changes to config.ini to your liking before using it.

The default values are what I recommend for standard Web application testing, however adjustements can be made.

The following are the options which can be customized:

canary – (Default: canary): a value used to grep the output for analysis, this is added before and after the mutated string. For example: canaryhelloworldcanary
input_string – the string which will be mutated, can be a simple string or a custom payload you want to further test fuzzer_engine – (options: essential/all): the option to generate the mutated payloads.

If set to essential (default), the engine generates fewer but more precise mutated payloads.

This option is highly recommended for webapp pentesting. If set to all, the engine generates more payloads suitable for testing againts buffer overflow, resource-intensive-task handling or any crash-related bugs (such as DOS).

payload_complexity: (options: low/high): If set to low, the engine mutates the raw input once. Else if set to high, the engine takes mutated payloads and send them to another mutation-cycle.

mutation_rate: (Default: 0.2): The value can be from 0 to 1, where 0 is a barely mutated payload and 1 is highly mutated payload. Payloads might get longer when mutation_rate is set to a large value.
max_mutations: (Default: 20): Ammount of mutated strings generated per mutation rules.

Usage

Todesstern doesn’t require any dependency. Once you finish configuring the config.ini file, you can execute the script by running python3 todesstern.py.

The engine will save the mutated payloads in mutations.txt. It is recommended to run the script more than one time (no worries, the output is overwritten in the file) to get a good variety of mutations.

On Burp Suite, send your desired HTTP Request to Intruder, go to Positions tab and mark the payload which is going to be replaced by the mutated ones.

Then go to Settings tab, scroll down to Grep – Ectract and click on Add button. On the right side of the popped-up tab, paste the following regex (make sure canary matches your canary).:

canary(.*?)canary

It should look like the following image:

Click OK and you should have a grep item added:

Go to Payloads tab and load the file mutations.txt. If everything went fine, you will have the payloads loaded:

Go back to Positions tab and start the attack. On the results’ table, focus on Payloads and canary(.*?)canary columns and compare the data with eachother:

Demo

Here is a SSTI’s anomaly on Ruby (<% is removed):

Varshini

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

ModTask – Task Scheduler Attack Tool

ModTask is an advanced C# tool designed for red teaming operations, focusing on manipulating scheduled…

9 hours ago

HellBunny : Advanced Shellcode Loader For EDR Evasio

HellBunny is a malleable shellcode loader written in C and Assembly utilizing direct and indirect…

9 hours ago

SharpRedirect : A Lightweight And Efficient .NET-Based TCP Redirector

SharpRedirect is a simple .NET Framework-based redirector from a specified local port to a destination…

10 hours ago

Flyphish : Mastering Cloud-Based Phishing Simulations For Security Assessments

Flyphish is an Ansible playbook allowing cyber security consultants to deploy a phishing server in…

1 day ago

DeLink : Decrypting D-Link Firmware Across Devices With A Rust-Based Library

A crypto library to decrypt various encrypted D-Link firmware images. Confirmed to work on the…

1 day ago

LLM Lies : Hallucinations Are Not Bugs, But Features As Adversarial Examples

LLMs (e.g., GPT-3.5, LLaMA, and PaLM) suffer from hallucination—fabricating non-existent facts to cheat users without…

1 day ago