Quantcast
Channel: KitPloit - PenTest Tools!
Viewing all 5845 articles
Browse latest View live

Kemon - An Open-Source Pre And Post Callback-Based Framework For macOS Kernel Monitoring

$
0
0

An Open-Source Pre and Post Callback-Based Framework for macOS Kernel Monitoring.

What is Kemon?
An open-source Pre and Post callback-based framework for macOS kernel monitoring. With the power of Kemon, we can easily implement LPC communication monitoring, MAC policy filtering, kernel driver firewall, etc. In general, from an attacker's perspective, this framework can help achieve more powerful Rootkit. From the perspective of defense, Kemon can help construct more granular monitoring capabilities. I also implemented a kernel fuzzer through this framework, which helped me find many vulnerabilities, such as: CVE-2017-7155, CVE-2017-7163, CVE-2017-13883, etc.

Supported Features
Kemon's features include:
  • file operation monitoring
  • process creation monitoring
  • dynamic library and kernel extension monitoring
  • network traffic monitoring
  • Mandatory Access Control (MAC) policy monitoring, etc.
In addition, Kemon project can also extend the Pre and Post callback-based monitoring interfaces for any macOS kernel function.

Getting Started

How to build the Kemon driver
Please use Xcode project or makefile to build the Kemon kext driver

How to use the Kemon driver
  • Please turn off macOS System Integrity Protection (SIP) check if you don't have a valid kernel certificate
  • Use the command "sudo chown -R root:wheel kemon.kext" to change the owner of the Kemon driver
  • Use the command "sudo kextload kemon.kext" to install the Kemon driver
  • Use the command "sudo kextunload kemon.kext" to uninstall the Kemon driver


NodeXP - Detection and Exploitation Tool for Node.js Services

$
0
0

NodeXP is an intergrated tool, written in Python 2.7, capable of detecting possible vulnerabilities on Node.js services as well as exploiting them in an automated way, based on S(erver)S(ide)J(avascript)I(njection) attack!

Getting Started - Installation & Usage
Download NodeXP by cloning the Git repository:
git clone https://github.com/esmog/nodexp
To get a list of all options run:
python2.7 nodexp -h
Examples for POST and GET cases accordingly:
python2.7 nodexp.py --url="http://nodegoat.herokuapp.com/contributions" --pdata="preTax=[INJECT_HERE]" -c="connect.sid=s:i6fKU7kSLPX1l00WkOxDmEfncptcZP1v.fy9whjYW0fGAvbavzYSBz1C2ZhheDuQ1SU5qpgVzbTA"
python2.7 nodexp.py --url="http://nodegoat.herokuapp.com/contributions" --pdata="preTax=[INJECT_HERE]" -c="connect.sid=s:i6fKU7kSLPX1l00WkOxDmEfncptcZP1v.fy9whjYW0fGAvbavzYSBz1C2ZhheDuQ1SU5qpgVzbTA" --tech=blind

python2.7 nodexp.py --url="http://192.168.64.30/?name=[INJECT_HERE]" -c="connect.sid=s:i6fKU7kSLPX1l00WkOxDmEfncptcZP1v.fy9whjYW0fGAvbavzYSBz1C2ZhheDuQ1SU5qpgVzbTA"
python2.7 nodexp.py --url="http://192.168.64.30/?name=[INJECT_HERE]" -c="connect.sid=s:i6fKU7kSLPX1l00WkOxDmEfncptcZP1v.fy9whjYW0fGAvbavzYSBz1C2ZhheDuQ1SU5qpgVzbTA" --tech=blind

Disclaimer
The tool’s purpose is strictly academic and was developed in order to conduct my master's thesis. It could also be helpful during the process of a penetration test on Node.js services. Any other malicious or illegal usage of the tool is strongly not recommended and is clearly not a part of the purpose of this research.

Prerequisites
  • Python 2.7
  • Metasploit Framework
  • msfvenom
  • Kali Linux (or any other Linux distro with Metasploit Framework installed)

NodeXP Testbeds
  • Download and run the Node.js files for both GET and POST cases from here
  • Visit Nodegoat or install Nodegoat to your local machine!

Built With
  • Python 2.7

Versioning
NodeXP - Version 1.0.0

Authors
  • Dimitris Antonaropoulos - esmog


SubScraper - External Pentest Tool That Performs Subdomain Enumeration Through Various Techniques

$
0
0

SubScraper uses DNS brute force, Google & Bing scraping, and Virus Total to enumerate subdomains without an API. Written in Python3, SubScraper performs HTTP(S) requests and DNS "A" record lookups during the enumeration process to validate discovered subdomains. This provides further information to help prioritize targets and aid in potential next steps. Post-Enumeration, "CNAME" lookups are displayed to identify subdomain takeover opportunities. 

Usage
python3 subscraper.py example.com
python3 subscraper.py -t 5 -o csv example.com

Options
  -s              Only use internet to find subdomains
-b Only use DNS brute forcing to find subdomains
-o OUTFILE Define output file type: csv/txt (Default: None)
-t MAX_THREADS Max threads (Default: 10)
-w SUBLIST Custom subdomain wordlist


Gurp - Golang command-line interface to Burp Suite's REST API

$
0
0

Requirements
  • BurpSuite Professional v2.0.0beta or greater from PortSwigger

Dependencies
go get -u -v github.com/fatih/color
go get -u -v github.com/integrii/flaggy
go get -u -v github.com/tidwall/gjson
go get -u -v github.com/grokify/html-strip-tags-go

Binaries
Latest version available here.

Building
# macOS binary
make darwin

# Linux binary
make linux

# Windows binary
make windows

# Build releases
make all

Usage

$ go run Gurp.go -h
Gurp - Interact with Burp API Flags:
-h --help Displays help with available flag, subcommand, and positional value parameters.
-t --target Burp Address. Default 127.0.0.1
-p --port Burp API Port. Default 1337
-U --username Username for an authenticated scan
-P --password Password for an authenticated scan
-s --scan URLs to scan
-S --scan-id Scanned URL identifier
-M --metrics Provides metrics for a given task
-D --description Provides description for a given issue
-d --description-names Returns vulnerability names from PortSwigger
-I --issues Provides issues for a given task
-e --export Export issues json.
-k --key Api Key
-v --version Gurp version
  • Create a scan
go run Gurp.go -s "localhost.com/WebGoat/attack"
[+] SUCCESS: Found Burp API endpoint on 127.0.0.1:1337.
[i] INFO Setting up scanner...
[+] SUCCESS: Scanning localhost.com/WebGoat/attack over 8.
  • Get Scan Metrics
go run Gurp.go -S 8 -M
[+] SUCCESS: Found Burp API endpoint on 127.0.0.1:1337.
[!] ALERT Retrieving Metrics from task 8
[i] INFO: Scan status succeeded
[i] INFO: 181 Requests made
[i] INFO: 0 Requests queued
[i] INFO: 6 Audit items completed
[i] INFO: 0 Audit items waiting
[i] INFO: 20058 Audit requests made
[i] INFO: 2 Audit network errors
[i] INFO: 5 Issue events
  • Get Issues from scan
go run Gurp.go -S 8 -I
[+] SUCCESS: Found Burp API endpoint on 127.0.0.1:1337.
[!] ALERT: Retrieving Issues from task 8
[i] INFO: Frameable response (potential Clickjacking)
[*] HIGH: Cleartext submission of password
[*] LOW: Password field with autocomplete enabled
[*] MEDIUM: Host header poisoning
[i] INFO: Path-relative style sheet import
  • Export Issues' json
go run Gurp.go -S 8 -e /tmp
[+] SUCCESS: Found Burp API endpoint on 127.0.0.1:1337.
[!] ALERT: Retrieving Issues from task 8
[i] INFO: Frameable response (potential Clickjacking)
[*] HIGH: Cleartext submission of password
[*] LOW: Password field with autocomplete enabled
[*] MEDIUM: Host header poisoning
[i] INFO: Path-relative style sheet import
[!] ALERT: Exporting raw json to /tmp
  • Launch an authenticated scan with user/password
go run Gurp.go -s test.com -U admin -P 1234
[+] SUCCESS: Found Burp API endpoint on 127.0.0.1:1337.
[i] INFO Setting up scanner using credentials admin:1234
[+] SUCCESS: Scanning test.com over 13.
  • Connect to Burp using API Key
go run Gurp.go -k "APIKEY" -d | grep -i SQL
[2] SQL injection
[3] SQL injection (second order)
[35] Client-side SQL injection (DOM-based)
[36] Client-side SQL injection (reflected DOM-based)
[37] Client-side SQL injection (stored DOM-based)
[68] SQL statement in request parameter


pwnedOrNot v1.1.0 - Tool To Find Passwords For Compromised Email Accounts Using HaveIBeenPwned API

$
0
0

pwnedOrNot uses haveibeenpwned v2 api to test email accounts and tries to find the password in Pastebin Dumps.

Features
haveibeenpwned offers a lot of information about the compromised email, some useful information is displayed by this script:
  • Name of Breach
  • Domain Name
  • Date of Breach
  • Fabrication status
  • Verification Status
  • Retirement status
  • Spam Status
And with all this information pwnedOrNot can easily find passwords for compromised emails if the dump is accessible and it contains the password.

Tested on
  • Kali Linux 18.2
  • Ubuntu 18.04
  • Kali Nethunter
  • Termux

Installation
Ubuntu / Kali Linux / Nethunter / Termux
chmod 777 install.sh
./install.sh


Usage
python pwnedornot.py -h
usage: pwnedornot.py [-h] [-e EMAIL] [-f FILE]

optional arguments:
-h, --help show this help message and exit
-e EMAIL, --email EMAIL Email account you want to test
-f FILE, --file FILE Load a file with multiple email accounts


Demo



AES-Killer - Burp Plugin To Decrypt AES Encrypted Traffic Of Mobile Apps

$
0
0

Burpsuite Plugin to decrypt AES Encrypted mobile app traffic.

Requirements
  • Burpsuite
  • Java

Tested on
  • Burpsuite 1.7.36
  • Windows 10
  • xubuntu 18.04
  • Kali Linux 2018

What it does
  • Decrypt AES Encrypted traffic on proxy tab
  • Decrypt AES Encrypted traffic on proxy, scanner, repeater and intruder

How it works
  • Require AES Encryption Key (Can be obtained by reversing mobile app)
  • Require AES Encryption Initialize Vector (Can be obtained by reversing mobile app)
  • Request Parameter (Leave blank in case of whole request body)
  • Response Parameter (Leave blank in case of whole response body)
  • Character Separated with space for obfuscation on request/response
  • URL/Host of target to filter request and response

How to Install
Download jar file from Release and add in burpsuite


Original Request/Response


Decrypted Request/Response



XenoScan - Open Source Memory Scanner Written In C++

$
0
0

XenoScan is a memory scanner which can be used to scan the memory of processes to locate the specific locations of important values. These types of tools are typically used when hacking video games, as they allow one to locate the values representing the game's state in memory.
XenoScan is written in C++ with a Lua frontend, and I've been working on advanced functionality that goes beyond anything that has been in any other memory scanners I've seen. Notably, it has a way to enumerate and return all complex data structures (such as std::list and std::map) in the target's memory space, and it can even scan for any class instances and group the discovered instances by their underlying types.

Communication
If you need to get in touch with me, want a place to chat, or have a question, my Discord is the best place.

Sub-projects

XenoLua
XenoLua is a wrapper around Lua that provides a ton of functionality. Most notably, it provides a LuaVariant class which wraps the functionality of converting between C/C++ and Lua types. Additionally, it has helper functions for working with Lua in the LuaPrimitive class.

XenoScanEngine
XenoScanEngine is the meat of the project. It contains the code for the scanning, data structure detection, and everything else.

XenoScanLua
XenoScanLua ties XenoScanEngine to XenoLua to provide a Lua-scriptable frontend for the scanner. Currently, this is the only entry-point to the scanner.
Additionally, this project contains some test code that ensures everything is working properly. A test is a combination of a .cpp, a .h, and a .lua file. For examples on how to use the scanner, you can check out the .lua test files.

Compiling
XenoScan uses CMake, and has been tested with Visual Studio 2017. In theory, you should be able to build the code with any modernish compiler, as long as you use CMake to generate the project files. Before you can compile, you will need to make sure you've checked out the submodules. Once that's done, you'll also have to build the luajit submodule so XenoScan can link against the libraries.
If you're using Visual Studio, this should be easy. Simply run buildmsvc2017.bat from a Developer Command Prompt for VS. As an example, to build a project for Visual Studio 2017, I run
cd C:\path\to\XenoScan
buildmsvc2017.bat
Which would make a file named XenoScan.sln appear in my build directory (e.g. C:\path\to\XenoScan\build).
The main development of XenoScan is done on this version of Visual Studio.
If you're on another system or using another compiler or IDE, you'll have to build luajit on your own and run CMake manually.

Platform
The code is designed to be platform-agnostic. Theoretically, to compile on any other platform, you would need to
  1. Create project/make files for your target IDE/compiler.
  2. Remove the ScannerTargetWindows.cpp and ScannerTargetWindows.h files from the project.
  3. Implement the ScannerTarget interface for your platform.
  4. Add your implementation to the project.
  5. ???? profit

Features
Basic scanning functionality supports the following types:
  • Integral types*:
    • int8_t
    • uint8_t
    • int16_t
    • uint16_t
    • int32_t
    • uint32_t
    • int64_t
    • uint64_t
  • float
  • double
  • ascii strings
  • wide strings
  • Custom data structures (think C++struct)
    • Can consist of any combination integral and decimal types
* Lua frontend may choke on 64-bit integers, but the scanner library supports them.
Scanning supports the following types of matching:
  • Equal to
  • Greater than
  • Greater than or equal to
  • Less than
  • Less than or equal to
  • Ranges (min <= check <= max)
Additionally, there is functionality to detect all instances of the following types:
  • std::map
  • std::list
  • Any class with a virtual-function table


DarkSpiritz - A Penetration Testing Framework For UNIX Systems

$
0
0

What is DarkSpiritz?

Created by the SecTel Team it was a project of one of the owners to update and clean-up an older pentesting framework he had created to something updated and modern. DarkSpiritz is a re-vamp of the very popular framework known as "Roxysploit". You may be familiar with this framework and if you are then it will help you with DarkSpiritz. DarkSpiritz also works like another pentesting framework known as Metasploit. If you know how to use metasploit setting up and working with DarkSpiritz will be a breeze. Inside the program itself you will find a lot of help and documentation on plugins or you can head to our wiki here. If you need any help feel free to contact us at sectel.team@protonmail.com.

Getting Started
Clone the repository with git:
git clone https://github.com/DarkSpiritz/DarkSpiritz.git
DarkSpiritz wiki available here
To install DarkSpiritz clone the github repo and run:
sudo python installer.py
This will download all necessary modules for DarkSpiritz. Once you run this you will be able to run:
python main.py
from within the same directory as DarkSpiritz.
You will see a start-up screen. This screen will display things like commands and configuration settings. You can set configuration settings inside the config.xml file itself or through commands in the DarkSpiritz shell.

Features:
These are features that DarkSpiritz Team prides themself on based on this program:
  • Real Time Updating of Configuration
  • Never a need to restart the program even when adding plugins or editing them.
  • Easy to use UX
  • Multi-functionality

Screenshots:





Malwoverview - Tool To Perform An Initial And Quick Triage On Either A Directory Containing Malware Samples Or A Specific Malware Sample

$
0
0

Malwoverview.py is a simple tool to perform an initial and quick triage on a directory containing malware samples (not zipped).
This tool aims to :
  1. Determining similar executable malware samples (PE/PE+) according to the import table (imphash) and group them by different colors (pay attention to the second column from output). Thus, colors matter!
  2. Determining whether executable malware samples are packed or not packed according to the following rules:
         2a. Two or more sections with Entropy > 7.0 or < 1.0 ==> Packed.

    2b. One one section with Entropy > 7.0 or two sections with SizeOfRawData ==> Likely packed.

    2c. None section with Entropy > 7.0 or SizeOfRawData ==> not packed.
  3. Determining whether the malware samples contain overlay.
  4. Determining the .text section entropy.
         Malwoverview.py only examines PE/PE+ files, skipping everything else.  
  5. Checking each malware sample against Virus Total.

REQUERIMENTS
This tool was tested on a Kali Linux 2018 system. Therefore, it will be necessary to install:
  1. Python version 2.7.x.
    $ apt-get install python
  2. Python-magic.
    To install python-magic package you can execute the following command:
    $ pip install python-magic
    Or compiling it from the github repository:
    $ git clone https://github.com/ahupp/python-magic
    $ cd python-magic/
    $ python setup.py build
    $ python setup.py install
    As there are serious problems about existing two versions of python-magic package, my recommendation is to install it from github (second procedure above) and copy the magic.py file to the SAME directory of malwoverview tool.
  3. Pefile and colorama packages:
    $ pip install pefile
    $ pip install colorama
    $ pip install simple-json
    $ pip install requests

USAGE
To use the malwoverview, execute the command as shown below:
  $ python malwoverview -d <directory> -f <fullpath> -i <0|1> -b <0|1> -v <0|1> -a <0|1> -p <0|1> -s <0|1> -x <0|1>
where:
<directory> -d is the folder containing malware samples. 
<fullpath> -f specifies the full path to a file. Shows general information about the file (any filetype).
(optional) -b 1 forces light gray background (for black terminals). It does not work with -f option.
(optional) -i 1 show imports and exports (it is used with -f option).
(optional) -x 1 extracts overlay (it is used with -f option).
(optional) -v 1 queries Virus Total database for positives and totals (any filetype).
(optional) -a 1 (optional) query Hybrid Analysis database for general report.Thus, you need to edit the
malwoverview.py and insert your HA API and respective secret.
(optional) -s 1 shows antivirus reports from the main players. This option is used with
-f option (any filetype).
(optional) -p 1 use this option if you have a public Virus Total API. It forces a one minute wait
every 4 malware samples, but allows obtaining a complete evaluation of the malware repository..


If you use Virus Total option, so it is necessary to edit the malwoverview.py and insert your VT API.

Remember that public VT API only allows 4 searches per second (as shown at the image above). Therefore, if you
are willing to wait some minutes, so you can use the -p option, which forces a one minute wait every 4 malware
samples, but allows obtaining a complete evaluation of the repository.


*ATENTION: if the directory contains many malware samples, so malwoverview.py could take some time. :)

HISTORY
Version 1.4:
  This version:

* Adds the -a option for getting the Hybrid Analysis summary report.
* Adds the -i option for listing imported and exported functions. Therefore, imported/exported function
report was decoupled for a separated option.
Version 1.3:
  This version:

* Adds the -p option for public Virus Total API.
Version 1.2:
  This version includes:

* evaluates a single file (any filetype)
* shows PE sessions.
* shows imported functions.
* shows exported function.
* extracts overlay.
* shows AV report from the main players. (any filetype)
Version 1.1:
  This version:

* Adds the VT checking feature.
Version 1.0:
  Malwoverview is a tool to perform a first triage of malware samples in a directory and group them according 
to their import functions (imphash) using colors. This version:

* Shows the imphash information classified by color.
* Checks whether malware samples are packed.
* Checks whether malware samples have overlay.
* Shows the entropy of the malware samples.

Screenshots





Important aspect: Malwoverview does NOT submit samples to VT. It submits only hashes, so respecting Non-Disclosure Agreements (NDAs).


DbgShell - A PowerShell Front-End For The Windows Debugger Engine

$
0
0

A PowerShell front-end for the Windows debugger engine.
Ready to tab your way to glory? For a quicker intro, take a look at Getting Started.

Disclaimers
  1. This project is not produced, endorsed, or monitored by the Windows debugger team. While the debugger team welcomes feedback about their API and front ends (windbg, kd, et al), they have no connection with this project. Do not file bugs or feedback to the debugger team concerning this project.
  2. This is not a funded project: it has no official resources allocated to it, and is only worked on by volunteers. Do not take any production dependency on this project unless you are willing to support it completely yourself. Feel free to file Issues and submit Pull Requests, but understand that with the limited volunteer resources, it may be a while before your submissions are handled.
  3. This is an experimental project: it is not fully baked, and you should expect breaking changes to be made often.
Corollary of above disclaimers: I would avoid attaching DbgShell to live targets of high value.

Binaries
https://aka.ms/dbgshell-latest

Motivation
Have you ever tried automating anything in the debugger? (cdb/ntsd/kd/windbg) How did that go for you?
The main impetus for DbgShell is that it's just waaaay too hard to automate anything in the debugger. There are facilities today to assist in automating the debugger, of course. But in my opinion they are not meeting people's needs.
  • Using the built-in scripting language is arcane, limited, difficult to get right, and difficult to get help with.
  • DScript is kind of neat, but virtually unknown, and it lacks a REPL, and it's too low-level.
  • Writing a full-blown debugger extension DLL is very powerful, but it's a significant investment—way too expensive for solving quick, "one-off" problems as you debug random, real-world problems. Despite the cost, there are a large number of debugger extensions in existence. I think there should not be nearly so many; I think the only reason there are so many is because there aren't viable alternatives.
  • Existing attempts at providing a better interface (such as PowerDbg) are based on "scraping" and text parsing, which is hugely limiting (not to mention idealogically annoying) and thus are not able to fulfill the promise of a truly better interface (they are only marginally better, at best).
  • Existing attempts to provide an easier way to write a debugger extension are merely a stop-gap addressing the pain of developing a debugger extension; they don't really solve the larger problem. (for instance, two major shortcomings are: they are still too low-level (you have to deal with the dbgeng COM API), and there's no REPL)
  • The debugger team has recently introduce Javascript scripting. Javascript is a much better (and more well-defined) language than the old windbg scripting language, but I think that PowerShell has some advantages, the largest of which is that nobody really uses a Javascript shell--PowerShell is much better as a combined shell and scripting language.
The goal of the DbgShell project is to bring the goodness of the object-based PowerShell world to the debugging world. When you do 'dt' to dump an 'object', you should get an actual object. Scripting should be as easy as writing a PowerShell script.
The DbgShell project provides a PowerShell front-end for dbgeng.dll, including:
  • a managed "object model" (usable from C# if you wished), which is higher-level than the dbgeng COM API,
  • a PowerShell "navigation provider", which exposes aspects of a debugging target as a hierarchical namespace (so you can "cd" to a particular thread, type "dir" to see the stack, "cd" into a frame, do another "dir" to see locals/registers/etc.),
  • cmdlets for manipulating the target,
  • a custom PowerShell host which allows better control of the debugger CLI experience, as well as providing features not available in the standard powershell.exe host (namely, support for text colorization using ANSI escape codes (a la ISO/IEC 6429))
The custom host is still a command-line (conhost.exe-based) program (analogous to ntsd/cdb/kd), but it can be invoked from windbg (!DbgShell).
In addition to making automation much easier and more powerful, it will address other concerns as well, such as ease of use for people who don't have to use the debuggers so often. (one complaint I've heard is that "when I end up needing to use windbg, I spend all my time in the .CHM")
For seasoned windbg users, on the other hand, another goal is to make the transition as seamless as possible. So, for instance, the namespace provider is not the only way to access data; you can still use traditional commands like "~3 s", "k", etc.

Screenshots





Notable Features
  • Color: support for text colorization using ANSI escape codes (a la ISO/IEC 6429)
  • Custom formatting engine: Don't like .ps1xml stuff? Me neither. In addition to standard table, list, and custom views, you can define "single-line" views which are very handy for customizing symbol value displays.
  • Custom symbol value conversion: For most variables, the default conversion and display are good. But sometimes, you'd like the debugger to do a little more work for you. The symbol value conversion feature allows, for instance, STL collection objects to be transformed into .NET collection objects that are much easier to deal with.
  • Derived type detection: For when your variable is an IFoo, but the actual object is a FooImpl.
  • Rich type information: exposed for your programmatic pleasure.
  • Q: Does it work in WinDbg? I will only use WinDbg. A: Yes--load up the DbgShellExt.dll extension DLL, and then run "!dbgshell" to pop open a DbgShell console.

Other topics
You can find a short (3 minute) video introduction here: https://youtu.be/ynbg2zZ1Igc


HeapHopper - A Bounded Model Checking Framework For Heap-implementations

$
0
0

HeapHopper is a bounded model checking framework for Heap-implementations.

Setup
sudo apt update && sudo apt install build-essential python-dev virtualenvwrapper
git clone https://github.com/angr/heaphopper.git && cd ./heaphopper
mkvirtualenv -ppython2 heaphopper
pip install -e .

Required Packages
build-essential python-dev virtualenvwrapper

Required Python-Packages
ana angr cle claripy IPython psutil pyelftools pyyaml

Examples
# Gen zoo of permutations
heaphopper.py gen -c analysis.yaml

# Trace instance
make -C tests
heaphopper.py trace -c tests/how2heap_fastbin_dup/analysis.yaml -b tests/how2heap_fastbin_dup/fastbin_dup.bin

# Gen PoC
heaphopper.py poc -c tests/how2heap_fastbin_dup/analysis.yaml -r tests/how2heap_fastbin_dup/fastbin_dup.bin-result.yaml -d tests/how2heap_fastbin_dup/fastbin_dup.bin-desc.yaml -s tests/how2heap_fastbin_dup/fastbin_dup.c -b tests/how2heap_fastbin_dup/fastbin_dup.bin

# Tests
cd tests
# Show source
cat how2heap_fastbin_dup/fastbin_dup.c
# Run tests
./run_tests.py
# Show PoC source
cat pocs/malloc_non_heap/fastbin_dup.bin/poc_0_0.c
# Run PoC
./run_poc.sh pocs/malloc_non_heap/fastbin_dup.bin/bin/poc_0_0.bin

Publication
This work has been published at the 27th USENIX Security Symposium.
You can read the paper here.
Cite:
@inproceedings {heaphopper,
author = {Eckert, Moritz and Bianchi, Antonio and Wang, Ruoyu and Shoshitaishvili, Yan and Kruegel, Christopher and Vigna, Giovanni},
title = {HeapHopper: Bringing Bounded Model Checking to Heap Implementation Security},
booktitle = {27th {USENIX} Security Symposium ({USENIX} Security 18)},
year = {2018},
address = {Baltimore, MD},
url = {https://www.usenix.org/conference/usenixsecurity18/presentation/eckert},
publisher = {{USENIX} Association},
}


Dex2Jar - Tools To Work With Android .Dex And Java .Class Files

$
0
0

dex2jar Tools to work with android .dex and java .class files
  1. dex-reader/writer: Read/write the Dalvik Executable (.dex) file. It has a light weight API similar with ASM.
  2. d2j-dex2jar: Convert .dex file to .class files (zipped as jar)
  3. smali/baksmali: disassemble dex to smali files and assemble dex from smali files. different implementation to smali/baksmali, same syntax, but we support escape in type desc "Lcom/dex2jar\t\u1234;"
  4. other tools: d2j-decrypt-string

Usage
sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk
And the output file will be apk_to_decompile-dex2jar.jar.

Need help ?
send email to dex2jar@googlegroups.com
or post on issue trackers list above.


TakeOver v1 - Extracts CNAME Record Of All Subdomains At Once

$
0
0

What is Subdomain Takeover?
Subdomain takeover is a class of vulnerability where subdomain points to an external service that has been deleted. The external services are Github, Heroku, Gitlab, Tumblr and so on. Let’s assume we have a subdomain sub.example.com that points to an external service such as GitHub. If the Github page is removed by its owner and forgot to remove the DNS entry that points to GitHub service. An attacker can simply takeover subdomain by adding CNAME file containing the sub.example.com.
Here is the command that checks CNAME record of a subdomain.
$dig CNAME apt.shopify.com --> apt.shopify.com.s3-website-us-east-1.amazonaws.com.

How Can Takeover script help bug bounty hunters?
There are a lot of sites having thousands of subdomain and it’s really hard to check each subdomain. Here we got a script that shows CNAME record for each domain. It takes a file name as an input and perform some action and finally produce it output, which shows CNAME record for each domain. The input file should contain a list of subdomains.

How can I recognise if the subdomain is vulnerable to subdomain takeover?
There are some fingerprints should be analysed when service is deleted and DNS entry remains as it is. The attacker get this error when visiting vulnerable subdomain such as “There isn’t a Github Pages site here.” or view below image for more detail.



Security researcher @edoverflow has listed all services and their fingerprints. For more detail visit https://github.com/EdOverflow/can-i-take-over-xyz

Youtube



Atlas - Quick SQLMap Tamper Suggester

$
0
0

Atlas is an open source tool that can suggest sqlmap tampers to bypass WAF/IDS/IPS, the tool is based on returned status code.

Screen



Installation
$ git clone https://github.com/m4ll0k/Atlas.git atlas
$ cd atlas
$ python atlas.py

Usage
$ python atlas.py --url http://site.com/index.php?id=Price_ASC --payload="-1234 AND 4321=4321-- AAAA" --dbms=mysql --random-agent -v

Example
  1. Run SQLMap:
$ python sqlmap.py -u 'http://site.com/index.php?id=Price_ASC' --dbs --random-agent -v 3


Price_ASC') AND 8716=4837 AND ('yajr'='yajr is blocked by WAF/IDS/IPS, now trying with Atlas:
$ python atlas.py --url 'http://site.com/index.php?id=Price_ASC' --payload="') AND 8716=4837 AND ('yajr'='yajr" --random-agent -v


At this point:
$ python sqlmap.py -u 'http://site.com/index.php?id=Price_ASC' --dbs --random-agent -v 3 --tamper=versionedkeywords,...


DNSDiag - DNS Diagnostics And Performance Measurement Tools

$
0
0

Ever been wondering if your ISP is hijacking your DNS traffic? Ever observed any misbehavior with your DNS responses? Ever been redirected to wrong address and suspected something is wrong with your DNS? Here we have a set of tools to perform basic audits on your DNS requests and responses to make sure your DNS is working as you expect.
You can measure the response time of any given DNS server for arbitrary requests using dnsping. Just like traditional ping utility, it gives you similar functionality for DNS requests.
You can also trace the path your DNS request takes to destination to make sure it is not being redirected or hijacked. This can be done by comparing different DNS queries being sent to the same DNS server using dnstraceroute and observe if there is any difference between the path.
dnseval evaluates multiple DNS resolvers and helps you choose the best DNS server for your network. While it is highly recommended to use your own DNS resolver and never trust any third-party DNS server, but in case you need to choose the best DNS forwarder for your network, dnseval lets you compare different DNS servers from performance (latency) and reliability (loss) point of view.

Prerequisites
This script requires python3 as well as latest dnspython and cymruwhois.

Installation
There are several ways that you can use this toolset. However using the sourcecode is always recommended.

From Source Code
  1. You can checkout this git repo and its submodules
git clone https://github.com/farrokhi/dnsdiag.git
cd dnsdiag
pip3 install -r requirements.txt
  1. You can alternatively install the package using pip:
pip3 install dnsdiag

From Binary
From time to time, binary version will be released for Windows, Mac OS X and Linux platforms. You can grab the latest release from releases page.

dnsping
dnsping pings a DNS resolver by sending an arbitrary DNS query for given number of times:
% ./dnsping.py -c 3 -t AAAA -s 8.8.8.8 dnsdiag.org
dnsping.py DNS: 8.8.8.8:53, hostname: dnsdiag.org, rdatatype: AAAA
4 bytes from 8.8.8.8: seq=0 time=123.509 ms
4 bytes from 8.8.8.8: seq=1 time=115.726 ms
4 bytes from 8.8.8.8: seq=2 time=117.351 ms

--- 8.8.8.8 dnsping statistics ---
3 requests transmitted, 3 responses received, 0% lost
min=115.726 ms, avg=118.862 ms, max=123.509 ms, stddev=4.105 ms
This script calculates minimum, maximum and average response time as well as jitter (stddev)

dnstraceroute
dnstraceroute is a traceroute utility to figure out the path that your DNS request is passing through to get to its destination. You may want to compare it to your actual network traceroute and make sure your DNS traffic is not routed to any unwanted path.
% ./dnstraceroute.py --expert -C -t A -s 8.8.4.4 facebook.com
dnstraceroute.py DNS: 8.8.4.4:53, hostname: facebook.com, rdatatype: A
1 192.168.0.1 (192.168.0.1) 1 ms
2 192.168.28.177 (192.168.28.177) 4 ms
3 192.168.0.1 (192.168.0.1) 693 ms
4 172.19.4.17 (172.19.4.17) 3 ms
5 google-public-dns-b.google.com (8.8.4.4) 8 ms

=== Expert Hints ===
[*] public DNS server is next to a private IP address (possible hijacking)
Using --expert will instruct dnstraceroute to print expert hints (such as warnings of possible DNS traffic hijacking).

dnseval
dnseval is a bulk ping utility that sends an arbitrary DNS query to a give list of DNS servers. This script is meant for comparing response time of multiple DNS servers at once:
% ./dnseval.py -t AAAA -f public-servers.txt -c10 yahoo.com
server avg(ms) min(ms) max(ms) stddev(ms) lost(%) ttl flags
------------------------------------------------------------------------------------------------------
8.8.8.8 270.791 215.599 307.498 40.630 %0 298 QR -- -- RD RA -- --
8.8.4.4 222.955 171.753 307.251 60.481 %10 291 QR -- -- RD RA -- --
ns.ripe.net 174.855 160.949 187.458 10.099 %0 289 QR -- -- RD RA -- --
4.2.2.1 172.798 163.892 189.918 7.823 %0 287 QR -- -- RD RA -- --
4.2.2.2 178.594 169.158 184.696 5.067 %0 285 QR -- -- RD RA -- --
4.2.2.3 153.574 138.509 173.439 12.015 %0 284 QR -- -- RD RA -- --
4.2.2.4 153.182 141.023 162.323 6.700 %0 282 QR -- -- RD RA -- --
4.2.2.5 154.840 141.557 163.889 7.195 %0 281 QR -- -- RD RA -- --
209.244.0.3 156.270 147.320 161.365 3.958 %0 279 QR -- -- RD RA -- --
209.244.0.4 159.329 151.283 163.726 3.958 %0 278 QR -- -- RD RA -- --
195.46.39.39 171.098 163.612 181.147 5.067 %0 276 QR -- -- RD RA -- --
195.46.39.40 175.335 160.920 185.618 8.726 %0 274 QR -- -- RD RA -- --

Author
Babak Farrokhi


ANDRAX - The First And Unique Penetration Testing Platform For Android Smartphones

$
0
0

ANDRAX The first and unique Penetration Testing platform for Android smartphones

What is ANDRAX

ANDRAX is a penetration testing platform developed specifically for Android smartphones, ANDRAX has the ability to run natively on Android so it behaves like a common Linux distribution, But more powerful than a common distribution!

Why is Android so powerful?

Simple, everyone has a smartphone and spends all the time with it! We have the possibility to camouflage easily in the middle of everyone, the processor architecture of most Android smartphones is ARM a modern and robust architecture extremely superior to the rest, With touch screens we can run the tools with great agility and take advantage of the graphical interface of Android, we can get in almost anywhere with our smartphones...

In technical terms, ANDRAX and NetHunter should never be compared, ANDRAX is a penetration testing platform for Android smartphones and NetHunter is just a Debian emulator running with chroot.

Termux is not our enemy, Termux is an application that allows installation of many Linux packages using a Debian environment running natively on Android.
ANDRAX and Termux have a similar development, ANDRAX and Termux share many libs and GNU/Linux resources.

But Termux is not a penetration testing platform, it's software to bring basic tools found in a Debian environment. Penetration tests are not something basic! But advanced techniques that involve advanced tools and a advanced environment to conduct good tests!

So you can install many tools manually in Termux but it would be extremely difficult to optimize and configure them to take 100% of the required potential for penetration testing.

Termux runs without root privileges and this makes it very difficult to use advanced tools. 

Features and Tools

Tool list

Information Gathering

  • Whois
  • Bind DNS tools
  • Dnsrecon
  • Raccoon
  • DNS-Cracker
  • Firewalk


Scanning

  • Nmap - Network Mapper
  • Masscan
  • SSLScan
  • Amap


Packet Crafting

  • Hping3
  • Nping
  • Scapy
  • Hexinject
  • Ncat
  • Socat


Network Hacking

  • ARPSpoof
  • Bettercap
  • MITMProxy
  • EvilGINX2


WebSite Hacking

  • 0d1n
  • Wapiti3
  • Recon-NG
  • PHPSploit
  • Photon
  • XSSer
  • Commix
  • SQLMap
  • Payloadmask
  • AbernathY-XSS


Password Hacking

  • Hydra
  • Ncrack
  • John The Ripper
  • CRUNCH


Wireless Hacking

  • VMP Evil AP
  • Aircrack-NG Tools
  • Cowpatty
  • MDK3
  • Reaver


Exploitation

  • MetaSploit Framework
  • RouterSploit Framework
  • Getsploit
  • OWASP ZSC
  • Rop-TOOL


More...

Advanced Terminal

Advanced and Professional terminal emulator for Hacking!




Dynamic Categories Overlay (DCO)

Beautiful tools category system 





Advanced IDE

Complete support for many programming languages




Information Gathering

Tools for initial informations about the target







Scanning

Tools for second stage: Scanning





Packet Crafting

Tools to craft network packets







Network Hacking

Tools for network hacking





WebSite Hacking

Tools for WebSite and WebApps Hacking












Password Hacking

Tools to break passwords





Wireless Hacking

Tools for Wireless Hacking






Exploitation

Tools for Dev and launch exploits








More info in official site.


Docker TOR Hidden Service - Easily Setup A Hidden Service Inside The Tor Network

$
0
0
Easily run a hidden service inside the Tor network with this container
Generate the skeleton configuration for you hidden service, replace for your hidden service pattern name. Example, if you want to your hidden service contain the word 'boss', just use this word as argument. You can use regular expressions, like ^boss, will generate an address wich will start with 'boss'. Be aware that bigger the pattern, more time it will take to generate it.
docker run -it --rm -v $(pwd)/web:/web \
strm/tor-hiddenservice-nginx generate <pattern>
Create an container named 'hiddensite' to serve your generated hidden service
docker run -d --restart=always --name hiddensite -v $(pwd)/web:/web \
strm/tor-hiddenservice-nginx

Example
Let's create a hidden service with the name beginning with strm.
docker pull strm/tor-hiddenservice-nginx
Wait to the container image be downloaded. And them we can generate our site skeleton:
$docker run -it --rm -v $(pwd)/web:/web strm/tor-hiddenservice-nginx generate ^strm
[+] Generating the address with mask: ^strm
[+] Found matching domain after 137072 tries: strmfyygjp5st54g.onion
[+] Generating nginx configuration for site strmfyygjp5st54g.onion
[+] Creating www folder
[+] Generating index.html template
Now we have our skeleton generated, we can run the container with:
docker run -d --restart=always --name hiddensite \
-v $(pwd)/web:/web strm/tor-hiddenservice-nginx
And you have the service running ! :)


Troubleshoot
  • 403 error on nginx, check your directory permissions and folder permissions. Nginx run as "hidden" user, his UID is 666, just check if you give this user access to the /web/www folder (in the case the folder mapped to it).

Build
docker build -t strm/tor-hiddenservice-nginx .

Run
docker run -d --restart=always --name hiddensite
-v $(pwd)/web:/web strm/tor-hiddenservice-nginx

Shell
docker run -it --rm -v $(pwd)/web:/web
--entrypoint /bin/bash strm/tor-hiddenservice-nginx


Sandsifter - The X86 Processor Fuzzer

$
0
0
The sandsifter audits x86 processors for hidden instructions and hardware bugs, by systematically generating machine code to search through a processor's instruction set, and monitoring execution for anomalies. Sandsifter has uncovered secret processor instructions from every major vendor; ubiquitous software bugs in disassemblers, assemblers, and emulators; flaws in enterprise hypervisors; and both benign and security-critical hardware bugs in x86 chips.
With the multitude of x86 processors in existence, the goal of the tool is to enable users to check their own systems for hidden instructions and bugs.

To run a basic audit against your processor:
sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t


The computer is systematically scanned for anomalous instructions. In the upper half, you can view the instructions that the sandsifter is currently testing on the processor. In the bottom half, the sandsifter reports anomalies it finds.
The search will take from a few hours to a few days, depending on the speed of and complexity of your processor. When it is complete, summarize the results:
./summarize.py data/log


Typically, several million undocumented instructions on your processor will be found, but these generally fall into a small number of different groups. After binning the anomalies, the summarize tool attempts to assign each instruction to an issue category:
  • Software bug (for example, a bug in your hypervisor or disassembler),
  • Hardware bug (a bug in your CPU), or
  • Undocumented instruction (an instruction that exists in the processor, but is not acknowledged by the manufacturer)
Press 'Q' to quit and obtain a text based summary of the system scan:
The results of a scan can sometimes be difficult for the tools to automatically classify, and may require manual analysis. For help analyzing your results, feel free to send the ./data/log file to xoreaxeaxeax@gmail.com. No personal information, other than the processor make, model, and revision (from /proc/cpuinfo) are included in this log.

Results
Scanning with the sandsifter has uncovered undocumented processor features across dozens of opcode categories, flaws in enterprise hypervisors, bugs in nearly every major disassembly and emulation tool, and critical hardware bugs opening security vulnerabilities in the processor itself.
Details of the results can be found in the project whitepaper.
(TODO: detailed results enumeration here)

Building
Sandsifter requires first installing the Capstone disassembler: http://www.capstone-engine.org/. Capstone can typically be installed with:
sudo apt-get install libcapstone3 libcapstone-dev
sudo pip install capstone
Sandsifter can be built with:
make
and is then run with
sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t

Flags
Flags are passed to the sifter with --flag, and to the injector with -- -f.
Example:
sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t
Sifter flags:
--len
search for length differences in all instructions (instructions that
executed differently than the disassembler expected, or did not
exist when the disassembler expected them to

--dis
search for length differences in valid instructions (instructions that
executed differently than the disassembler expected)

--unk
search for unknown instructions (instructions that the disassembler doesn't
know about but successfully execute)

--ill
the inverse of --unk, search for invalid disassemblies (instructions that do
not successfully execute but that the disassembler acknowledges)

--tick
periodically write the current instruction to disk

--save
save search progress on exit

--resume
resume search from last saved state

--sync
write search results to disk as they are found

--low-mem
do not store results in memory
Injector flags:
-b
mode: brute force

-r
mode: randomized fuzzing

-t
mode: tunneled fuzzing

-d
mode: externally directed fuzzing

-R
raw output mode

-T
text output mode

-x
write periodic progress to stderr

-0
allow null dereference (requires sudo)

-D
allow duplicate prefixes

-N
no nx bit support

-s seed
in random search, seed value

-B brute_depth
in brute search, maximum search depth

-P max_prefix
maximum number of prefixes to search

-i instruction
instruction at which to start search (inclusive)

-e instruction
instruction at which to end search (exclusive)

-c core
core on which to perform search

-X blacklist
blacklist the specified instruction

-j jobs
number of simultaneous jobs to run

-l range_bytes
number of base instruction bytes in each sub range

Keys
m: Mode - change the search mode (brute force, random, or tunnel) for the sifter
q: Quit - exit the sifter
p: Pause - pause or unpause the search

Algorithms
The scanning supports four different search algorithms, which can be set at the command line, or cycled via hotkeys.
  • Random searching generates random instructions to test; it generally produces results quickly, but is unable to find complex hidden instructions and bugs.
  • Brute force searching tries instructions incrementally, up to a user-specified length; in almost all situations, it performs worse than random searching.
  • Driven or mutation driven searching is designed to create new, increasingly complex instructions through genetic algorithms; while promising, this approach was never fully realized, and is left as a stub for future research.
  • Tunneling is the approach described in the presentation and white paper, and in almost all cases provides the best trade-off between thoroughness and speed.

Tips
  • sudo
    For best results, the tool should be run as the root user. This is necessary so that the process can map into memory a page at address 0, which requires root permissions. This page prevents many instructions from seg-faulting on memory accesses, which allows a more accurate fault analysis.
  • Prefixes
    The primary limitation for the depth of an instruction search is the number of prefix bytes to explore, with each additional prefix byte increasing the search space by around a factor of 10. Limit prefix bytes with the -P flag.
  • Colors
    The interface for the sifter is designed for a 256 color terminal. While the details vary greatly depending on your terminal, this can roughly be accomplished with:
     export TERM='xterm-256color'
  • GUI
    The interface assumes the terminal is of at least a certain size; if the interface is not rendering properly, try increasing the terminal size; this can often be accomplished by decreasing the terminal font size.
    In some cases, it may be desirable or necessary to run the tool without the graphical front end. This can be done by running the injector directly:
     sudo ./injector -P1 -t -0
    To filter the results of a direct injector invocation, grep can be used. For example,
     sudo ./injector -P1 -r -0 | grep '\.r' | grep -v sigill
    searches for instructions for which the processor and disassembler disagreed on the instruction length (grep '.r'), but the instruction successfully executed (grep -v sigill).
  • Targeted fuzzing
    In many cases, it is valuable to direct the fuzzer to a specific target. For example, if you suspect that an emulator has flaws around repeated 'lock' prefixes (0xf0), you could direct the fuzzer to search this region of the instruction space with the -i and -e flags:
     sudo ./sifter.py --unk --dis --len --sync --tick -- -t -i f0f0 -e f0f1 -D -P15
  • Legacy systems
    For scanning much older systems (i586 class processors, low memory systems), pass the --low-mem flag to the sifter and the -N flag to the injector:
     sudo ./sifter.py --unk --dis --len --sync --tick --low-mem -- -P1 -t -N
    If you observe your scans completing too quickly (for example, a scan completes in seconds), it is typically because these flags are required for the processor you are scanning.
  • 32 vs. 64 bit
    By default, sandsifter is built to target the bitness of the host operating system. However, some instructions have different behaviors when run in a 32 bit process compared to when run in a 64 bit process. To explore these scenarios, it is sometimes valuable to run a 32 bit sandsifter on a 64 bit system.
    To build a 32 bit sandsifter on a 64 bit system, Capstone must be installed as 32 bit; the instructions for this can be found at http://www.capstone-engine.org/.
    Then sandsifter must be built for a 32 bit architecture:
     make CFLAGS=-m32
    With this, the 32 bit instruction space can be explored on a 64 bit system.

References
  • A discussion of the techniques and results can be found in the Black Hat presentation.
  • Technical details are described in the whitepaper.
  • Slides from the Black Hat presentation are here.

Author
sandsifter is a research effort from Christopher Domas (@xoreaxeaxeax).


Clrinject - Injects C# EXE Or DLL Assembly Into Every CLR Runtime And AppDomain Of Another Process

$
0
0

Injects C# EXE or DLL Assembly into any CLR runtime and AppDomain of another process. The injected assembly can then access static instances of the injectee process's classes and therefore affect it's internal state.

Usage
clrinject-cli.exe -p <processId/processName> -a <assemblyFile>
Opens process with id <processId> or name <processName>, inject <assemblyFile> EXE and execute Main method.

Additional options
  • -e Enumerates all loaded CLR Runtimes and created AppDomains.
  • -d <#> Inject only into <#>-th AppDomain. If no number or zero is specified, assembly is injected into every AppDomain.
  • -i <namespace>.<className> Create an instance of class <className> from namespace <namespace>.

Examples

Usage examples
  • clrinject-cli.exe -p victim.exe -e
    (Enumerate Runtimes and AppDomains from victim.exe)
  • clrinject-cli.exe -p 1234 -a "C:\Path\To\invader.exe" -d 2
    (Inject invader.exe into second AppDomain from process with id 1234)
  • clrinject-cli.exe -p victim.exe -a "C:\Path\To\invader.dll" -i "Invader.Invader"
    (Create instance of Invader inside every AppDomain in victim.exe)
  • clrinject-cli64.exe -p victim64.exe -a "C:\Path\To\invader64.exe"
    (Inject x64 assembly into x64 process)

Injectable assembly example
Following code can be compiled as C# executable and then injected into a PowerShell process. This code accessees static instances of internal PowerShell classes to change console text color to green.
using System;
using System.Reflection;

using Microsoft.PowerShell;
using System.Management.Automation.Host;

namespace Invader
{
class Invader
{
static void Main(string[] args)
{
try
{
var powerShellAssembly = typeof(ConsoleShell).Assembly;
var consoleHostType = powerShellAssembly.GetType("Microsoft.PowerShell.ConsoleHost");
var consoleHost = consoleHostType.GetProperty("SingletonInstance", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);

var ui = (PSHostUserInterface)consoleHostType.GetProperty("UI").GetValue(consoleHost);
ui.RawUI.ForegroundColor = ConsoleColor.Green;
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
}
Injection command:
clrinject-cli64.exe -p powershell.exe -a "C:\Path\To\invader64.exe"

Result:



EKFiddle v.0.8.2 - A Framework Based On The Fiddler Web Debugger To Study Exploit Kits, Malvertising And Malicious Traffic In General

$
0
0

A framework based on the Fiddler web debugger to study Exploit Kits, malvertising and malicious traffic in general.

Installation

Download and install the latest version of Fiddler
https://www.telerik.com/fiddler
Special instructions for Linux and Mac here:
https://www.telerik.com/blogs/fiddler-for-linux-beta-is-here
https://www.telerik.com/blogs/introducing-fiddler-for-os-x-beta-1

Enable C# scripting (Windows only)
Launch Fiddler, and go to Tools -> Options
In the Scripting tab, change the default (JScript.NET) to C#.

Change default text editor (optional)
In the same Tools -> Options menu, click on the Tools tab.
  • Windows: notepad.exe or notepad++.exe
  • Linux: gedit
  • Mac: /Applications/TextEdit.app or /Applications/TextWrangler.app
Close Fiddler

Download or clone CustomRules.cs into the appropriate folder based on your operating system:
  • Windows (7/10) C:\Users\[username]\Documents\Fiddler2\Scripts\
  • Ubuntu /home/[username]/Fiddler2/Scripts/
  • Mac /Users/[username]/Fiddler2/Scripts/

Finish up the installation
Start Fiddler to complete the installation of EKFiddle. That's it, you're all set!

Features

Toolbar buttons
The added toolbar buttons give you quick shortcuts to some of the main features:


QuickSave
Dumps current web sessions into a SAZ named (QuickSave-"MM-dd-yyyy-HH-mm-ss".saz) to EKFiddle\Captures.

UI mode
Toggle between the default column view or extra columns with additional information (includes time stamp, server IP and type, method, etc.).

VPN
VPN GUI directly built into Fiddler. It uses the OpenVPN client on Windows and Linux with ovpn files (sigining up with commercial VPN provider may be required). It will open up a new terminal/xterm whenever it connects to a new server via the selected .ovpn config file, killing the previous to ensure only one TAP adapter is used at any given time.
  • Windows
Download and install OpenVPN in default directory
Place your .ovpn files inside OpenVPN's config folder.
  • Linux (tested on Ubuntu 16.04)
sudo apt-get install openvpn
Place your .ovpn files in /etc/openvpn.

Proxy
Allows you to connect to an upstream proxy (HTTP/s or SOCKS).

Import SAZ/PCAP
A shortcut to load SAZ (Fiddler's native format) or PCAP (i.e. from Wireshark) captures.

View/Edit Regexes
View and create your custom regular expressions. Note: a master list is provided with auto-updates via GitHub. Additionally the custom list lets you create your own rules.
There are 4 types of indicators to match on:
  • URI (full or partial URI match)
  • IP (Single IP address or IP range)
  • SourceCode (Response Body)
  • Headers (any value within a Response's Headers)
Syntax:
Important! Fields are TAB delimited
URI My_URI_rule [a-z0-9]{2} Match URI
IP My_IP_address_rule 5\.154\.191\.67 Match static IP address
IP My_IP_address_rule 5\.154\.191\.(6[0-9]|70) Match an IP range
SourceCode My_sourcecode_rule vml=1 Look for specific string
Headers My_headers_rule nginx Look for specific string

Run Regexes
Run the master and custom regular expressions against current web sessions.

Clear Markings
Clear any comment and colour highlighting in the currently loaded sessions.

ContextAction menu
The ContextAction menu (accessed by right-clicking on any session(s) allows you to perform additional commands on selected sections. This can be very helpful to do quick lookups, compute hashes or extract IOCs.

Hostname or IP address (Google Search, RiskIQ, URLQuery, RiskIQ)
Query the hostname for the currently selected session.

URI

Build Regex
Create a regular expression from the currently selected URI. This action opens up a regex website and the URI is already in the clipboard, ready to be pasted into the query field.

Open in... Internet Explorer, Chrome, Firefox, Edge
This opens up the URI with the browser you selected.

Response Body

Remove encoding
Decodes the currently selected sessions (from their basic encoding).

Build Regex
Create a regular expression from the currently selected session's source code. This action opens up a regex website and the URI is already in the clipboard, ready to be pasted into the query field.

Calculate MD5/SHA256 hash
Get the current session's body and computes its hash.

Hybrid Analysis / VirusTotal lookup
Checks the current session's body for hash, then look up that hash.

Extract to Disk
Downloads the currently selection session(s)'s body to disk, into the 'Artifacts' folder.

Extract IOCs
Copies into memory basic information from selected sessions so that they can be shared as IOCs. Extract Coinhive site keys

Connect-the-dots
Allows you to identify the sequence of events between sessions. Right-clik on the session you are interested in retracing your steps to and simply 'connect the dots'. It will label the sequence of events from 01, to n within the comments column. You can reorder that column to have a condensed view of the sequence.


Crawler (experimental)
Load a list of URLs from a text file and let the browser automically visit them. Tools -> Crawler (experimental) -> Start crawler May require some tweaks in your browser's settings, in particular with regards to crash recovery.

Uninstalling EKFiddle
Delete CustomRules.cs


Viewing all 5845 articles
Browse latest View live