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

l0l - The Exploit Development Kit

$
0
0

l0l a exploit development kit. with C++ language scripting. Yet, are being developed. Then the beta version will be published.

Status
  • Shellcodes : 5
  • Injectors : 0
  • Encoders : 0
  • Backdoors : 6

Install

- Requirements : g++ and Python.
$ make
or, l0l.cpp compile the file..
Exp:
$ g++ -o l0l l0l.cpp
Run:
$ ./l0l
- Have fun (:


Contact
Please Report bugs (:
email : roissy@tuta.io
jabber : roissy@exploit.im

Usage

Usage Commands
===============
Commands Description
---------- --------------
help Help Menu
os Command directly ur computer
banner Show Banner
clear Clear the menu
show shellcodes Show Shellcodes of Current Database
show backdoors Show Backdoors of Current Database
show injectors Show Injectors(Shellcode,dll,so etc..
show encoders Show Encoders(Py,Ruby,PHP,Shellcode etc..
use Execute the specified module.
back A back goes into operation.
exit Close Application


Shellcode Commands
==================
Commands Description
---------- --------------
exit Close Application
set Set Value Of Options To Modules
unset Unset Value Of Options To Modules
help Help menu
back A back goes into operation.
os Command directly ur computer
clear Clear the menu
generate Generate shellcode
show options Show current options of selected module


Injector Commands
=================
Commands Description
---------- --------------
help Help Menu
os Command directly ur computer
back A back goes into operation.
exit Close Application


Encoder Commands
================
Commands Description
---------- --------------
help Help Menu
os Command directly ur computer
back A back goes into operation.
exit Close Application


Backdoor Commands
=================
Commands Description
---------- --------------
exit Close Application
set Set Value Of Options To Modules
unset Unset Value Of Options To Modules
help Help menu
back A back goes into operation.
os Command directly ur computer
clear Clear the menu
generate Generate backdoor
show options Show current options of selected module


Screenshots







LHF (Low Hanging Fruit) - A Modular Recon Tool For Pentesting

$
0
0

To install dependencies:
./Install.sh

To start:
./LHF.py
[+] Checking permissions
[-] Rockyou wordlist is missing trying to decompress...
[+] Rockyou wordlist is decompressed!
[-] Please enter the ip to scan (example 192.168.0.1 or www.target.com) : <target ip/url here>

A "results" folder will be created after inputting the target ip. This folder can be found in the LHF directory.
Example:
cd /opt/LHF/results

Highly, reccomended you clone this into your /opt folder in Kali until I fix the code...unless you feel like changing the code around to whatever directory you have it in. This is low priority at the moment.

The results output includes nmap files...arachni files...pretty much every fucking file from every scan the tools does can be found in this folder.

This tool is meant to be "modular" i.e. you can add a new tool in the Modules folder and then add it into the LHF.py file and it will be included in the scan.

This tool will only scan a single IP at a time for the moment. I did this for testing purposes and because I am lazy.

FYI, it will look like it's not doing anything but it actually is...I have nothing in place such as a progress bar. Output will stream as tasks are ran/completed.

To Do:
  • Test on other security distros
  • Implement "pip install"
  • Add new features
  • Implement ip range/domain scanning

New (08/22/2016):
  • Domain Scanning (Still working on ip range scanning aka /24 stuff.)
  • Load Balancer detector (note: Saw lots of false negatives when "www" is used before the url. Reccomend you skip using that.)
  • Got rid of Nikto it pumps out the same results as Arachni and slows things down.
  • We now have a beta-testing branch...I deffinitely don't reccomend cloning from that branch as it is highly unstable, unless of course you would like to help in the development of LHF. Once things in that branch are thoroughly tested we will push things out to the master branch.
Keep reporting issues they help. Thanks to everyone who has downloaded this.


HatDBG - Minimal WIN32 Debugger in Powershell

$
0
0


The HatDBG is A pure Powershell win32 debugging abstraction class. The goal of this project is to make a powershell debugger. It is intended to be used during internal penetration tests and red team engagements. This is exclusively for educational purposes.

The debugger objects implementing a number of features such as:
  • Soft (INT 3) breakpoints
  • Exception / event handling call backs
  • Process memory snapshotting
  • Function resolution
  • Memory manipulation
  • Threads enumerations

Method Summary

open_thread
open_thread(thread_id)
Convenience wrapper around OpenThread().

enumerate_threads
 enumerate_threads()
Using the CreateToolhelp32Snapshot() API enumerate all system threads returning a list of thread IDs that belong to the debuggee.

get_thread_context
get_thread_context(thread_id)
Convenience wrapper around GetThreadContext().

read_process_memory
read_process_memory(address, len)
Read from the debuggee process space.

write_process_memory
write_process_memory(address, data, len)
Write to the debuggee process space.

bp_set
bp_set(address)
Sets a breakpoint at the designated address.

func_resolve
func_resolve(dll, func)
Utility function that resolves the address of a given module / function name pair under the context of the debugger.

detach
detach()
Detach from debuggee.

attach
attach(dwpid)
Attach to the specified process by PID.

exception_handler_breakpoint
exception_handler_breakpoint()
This is the default EXCEPTION_BREAKPOINT handler, responsible for transparently restoring soft breakpoints and passing control to the registered user callback handler.

get_debug_event
get_debug_event()
Geth debugger event and responsible for callback handler.

run
run()
Enter the infinite debug event handling loop.

open_process
open_process(dwpid)
Convenience wrapper around OpenProcess().

load
load(path)
Load the specified executable and optional command line arguments into the debugger.

Example

Enumerate Threads
#Use PID for attach debugger
$result = attach -dwpid 5920
if([bool] $result)
{
$list = enumerate_threads
foreach ($thread in $list){
$thread_context = get_thread_context -thread_id $thread
write-host ("[+] Dumping register for thread ID: 0x{0,0:x}" -f $thread)
write-host ("[+] EIP: 0x{0,0:x}" -f $thread_context.Eip)
write-host ("[+] ESP: 0x{0,0:x}" -f $thread_context.Esp)
write-host ("[+] EBP: 0x{0,0:x}" -f $thread_context.Ebp)
write-host ("[+] EAX: 0x{0,0:x}" -f $thread_context.Eax)
write-host ("[+] EBX: 0x{0,0:x}" -f $thread_context.Ebx)
write-host ("[+] ECX: 0x{0,0:x}" -f $thread_context.Ecx)
write-host ("[+] EDX: 0x{0,0:x}" -f $thread_context.Edx)
write-host "[+] END DUMP"
}
$result = detach
}
Output
[*] Debugger Attached to PID 5920
[+] Dumping register for thread ID: 0xb14
[+] EIP: 0x75ca4d9c
[+] ESP: 0x53f610
[+] EBP: 0x53f628
[+] EAX: 0x4d3
[+] EBX: 0x0
[+] ECX: 0x0
[+] EDX: 0x0
[+] END DUMP
[+] Dumping register for thread ID: 0x1834
[+] EIP: 0x77e08c0c
[+] ESP: 0x31dfb70
[+] EBP: 0x31dfbe0
[+] EAX: 0xf5a280
[+] EBX: 0x2be8c7c
[+] ECX: 0x0
[+] EDX: 0x0
[+] END DUMP
[+] Dumping register for thread ID: 0x1770
[+] EIP: 0x77e0919c
[+] ESP: 0x32df5a8
[+] EBP: 0x32df738
[+] EAX: 0x0
[+] EBX: 0x0
[+] ECX: 0x0
[+] EDX: 0x0
[+] END DUMP
[+] Dumping register for thread ID: 0x1784
[+] EIP: 0x77e08c0c
[+] ESP: 0x4defc14
[+] EBP: 0x4defc84
[+] EAX: 0xf5a280
[+] EBX: 0x3e8
[+] ECX: 0x0
[+] EDX: 0x0
[+] END DUMP
[+] Dumping register for thread ID: 0x133c
[+] EIP: 0x77e0919c
[+] ESP: 0x500f7f0
[+] EBP: 0x500f980
[+] EAX: 0x103
[+] EBX: 0x0
[+] ECX: 0x0
[+] EDX: 0x0
[+] END DUMP
[+] Dumping register for thread ID: 0x1718
[+] EIP: 0x77e08c0c
[+] ESP: 0x778fb9c
[+] EBP: 0x778fc0c
[+] EAX: 0x0
[+] EBX: 0xcc0008
[+] ECX: 0x0
[+] EDX: 0x0
[+] END DUMP
[+] Dumping register for thread ID: 0x23b8
[+] EIP: 0x77e0aef0
[+] ESP: 0x2dcf850
[+] EBP: 0x0
[+] EAX: 0x77e41300
[+] EBX: 0x0
[+] ECX: 0x0
[+] EDX: 0x0
[+] END DUMP
[*] Finished debugging.

Get Debug Event Code
$dwpid = Read-Host "Enter the PID of the Process to attach to"
attach -dwpid $dwpid
run
detach
Output
Enter the PID of the Process to attach to: : 3168
[*] Debugger Attached to PID 3168
[+] Event Code: 3 Thread ID: 5056
[+] Event Code: 6 Thread ID: 5056
[+] Event Code: 2 Thread ID: 8340
[+] Event Code: 2 Thread ID: 10020
[+] Event Code: 2 Thread ID: 4788
[+] Event Code: 2 Thread ID: 7572
[+] Event Code: 2 Thread ID: 128
[+] Event Code: 2 Thread ID: 7760
[+] Event Code: 2 Thread ID: 9552
[+] Event Code: 2 Thread ID: 4676
[+] Event Code: 2 Thread ID: 4516
[+] Event Code: 2 Thread ID: 8704
[+] Event Code: 2 Thread ID: 6016
[+] Event Code: 2 Thread ID: 8556
[+] Event Code: 2 Thread ID: 8968
[+] Event Code: 2 Thread ID: 8204
[+] Event Code: 2 Thread ID: 5444

Set Breakpoint
$dwpid = Read-Host "Enter the PID of the Process to attach to"
attach -dwpid $dwpid
$address = func_resolve -dll "msvcrt.dll" -func "printf"
bp_set -address $address
run

detach
Output
Enter the PID of the Process to attach to: 4644
[*] Debugger Attached to PID 4644
[*] Set Breakpoint at 0x00116046
[+] Event Code: 3 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 2 Thread ID: 3268
[+] Event Code: 2 Thread ID: 9864
[+] Event Code: 2 Thread ID: 9700
[+] Event Code: 2 Thread ID: 6600
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 6 Thread ID: 7740
[+] Event Code: 2 Thread ID: 7288
[+] Event Code: 1 Thread ID: 7288
[+] Exception address: 0x00116046
[+] Event Code: 4 Thread ID: 7288


WiFi-Pumpkin v0.8.1 - Framework for Rogue Wi-Fi Access Point Attack

$
0
0

Framework for Rogue Wi-Fi Access Point Attack

Description
WiFi-Pumpkin is a open source security tool that provides the Rogue access point to Man-In-The-Middle and network attacks.

Installation
Kali 2.0/WifiSlax 4.11.1/Parrot 3.0.1/2.0.5
  • Python 2.7
 git clone https://github.com/P0cL4bs/WiFi-Pumpkin.git
cd WiFi-Pumpkin
./installer.sh --install
refer to the wiki for Installation

Features
  • Rogue Wi-Fi Access Point
  • Deauth Attack Clients AP
  • Probe Request Monitor
  • DHCP Starvation Attack
  • Credentials Monitor
  • Transparent Proxy
  • Windows Update Attack
  • Phishing Manager
  • Partial Bypass HSTS protocol
  • Support beef hook
  • Mac Changer
  • ARP Poison
  • DNS Spoof
  • Patch Binaries via MITM

Plugins
Plugin Description
net-creds Sniff passwords and hashes from an interface or pcap file
dns2proxy This tools offer a different features for post-explotation once you change the DNS server to a Victim.
sslstrip2 Sslstrip is a MITM tool that implements Moxie Marlinspike's SSL stripping attacks based version fork @LeonardoNve/@xtr4nge.
sergio-proxy Sergio Proxy (a Super Effective Recorder of Gathered Inputs and Outputs) is an HTTP proxy that was written in Python for the Twisted framework.
BDFProxy-ng Patch Binaries via MITM: BackdoorFactory + mitmProxy, bdfproxy-ng is a fork and review of the original BDFProxy @secretsquirrel.

Transparent Proxy
Transparent proxies that you can use to intercept and manipulate HTTP/HTTPS traffic modifying requests and responses, that allow to inject javascripts into the targets visited. You can easily implement a module to inject data into pages creating a python file in directory "Proxy" automatically will be listed on PumpProxy tab.

Plugins Example
The following is a sample module that injects some contents into the tag to set blur filter into body html page:
import logging
from Plugin import PluginProxy
from Core.Utils import setup_logger

class blurpage(PluginProxy):
''' this module proxy set blur into body page html response'''
_name = 'blur_page'
_activated = False
_instance = None
_requiresArgs = False

@staticmethod
def getInstance():
if blurpage._instance is None:
blurpage._instance = blurpage()
return blurpage._instance

def __init__(self):
self.injection_code = []

def LoggerInjector(self,session):
setup_logger('injectionPage', './Logs/AccessPoint/injectionPage.log',session)
self.logging = logging.getLogger('injectionPage')

def setInjectionCode(self, code,session):
self.injection_code.append(code)
self.LoggerInjector(session)

def inject(self, data, url):
injection_code = '''<head> <style type="text/css">
body{
filter: blur(2px);
-webkit-filter: blur(2px);}
</style>'''
self.logging.info("Injected: %s" % (url))
return data.replace('<head>',injection_code )

Screenshots

  • Kali Linux 2.0

  • kubuntu 15.10 

  • Parrot OS


FAQ
FAQ on the wiki


libenom - Make Fast and Easy Payloads with MSFvenom

$
0
0

Libenom is a tool created for make more easy and fast the creation of payloads with MSFvenom and get all the data generated ordered.

Requirements

  • A linux distribution for pentesting or Ubuntu, Debian, Mint
  • Recommended Kali Linux 2.0 sana or 2016.1 rolling, Parrot OS, Blackarch, Dracos ,Lionsec.

  • Getting Started

    git clone https://github.com/bounteous/libenom.git
    cd libenom
    chmod +x libenom.py

    How it works:

    Execute "./libenom.py" to show all the options. For example you can first create a profile named "profile1" with "-c" option and assign it to the msfvenom parameters


    After that you can execute it "./libenom.py -x profile1", delete it "-d" or read "-r"
    Also you have some pre created msfconsole listeners for a "reverse_tcp" conexion

    Read more here.

    sshhipot - High-Interaction MitM SSH Honeypot

    $
    0
    0

    High-interaction SSH honeypot (ok, it's really a logging ssh proxy).

    Still more or less a work-in-progress. Feel free to go install this repository if you'd like to try it. Run it with -h to see more options. In particular, logging is kinda rough.
    One of these days there'll be better documentation, really.

    The general idea is that sshlowpot runs somewhere between the attacker and the real SSH server such that the attacker logs into the honeypot, and the honeypot logs into the server.

    Installation
    go install github.com/magisterquis/sshhipot
    If you don't have go available, feel free to ask me (or someone who does) for compiled binaries. They can be made for a bunch of different platforms.

    Config
    Most of the options should be useable as-is. The ones I expect will need to be configured:
    Option Use
    -ck SSH identity file (i.e. id_rsa ) to use to authenticate to the server.
    -cs Server's address. Can be loopback, even.
    -cu Ok, maybe root wasn't a great default. test is probably better.
    -p Try 123456 or something more common than hunter2 . Also see the -pf flag.
    Please note by default the server listens on port 2222. You'll have to use pf or iptables or whatever other firewall to redirect the port. It's probably a really bad idea to run it as root. Don't do that.

    There is a general log which goes to stdout. More granular logs go in a directory named conns by default ( -d flag). At the moment, the granular logs also go to stderr.


    DyMerge - Dynamic Dictionary Merger

    $
    0
    0

    A simple, yet powerful tool - written purely in python - which takes given wordlists and merges them into one dynamic dictionary that can then be used as ammunition for a successful dictionary based (or bruteforce) attack.
    Compatible with Python 2.6+.
    Author: Nikolaos Kamarinakis ( nikolaskama.me )


    Installation
    Preferably, you can install DyMerge by cloning the Git Repo :
    $ git clone https://github.com/k4m4/dymerge.git
    Alternatively, you can install it from the Cheese Shop using the pip command:
    $ pip install dymerge

    Usage
    Usage: python dymerge.py {dictionaries} [options]
    To view all available options run:
    $ python dymerge.py -h

    Demo
    Here's a short demo:
    (For more demos click here )


    ARTLAS - Apache Real Time Logs Analyzer System

    $
    0
    0

    Real time Apache log analyzer, based on top 10 OWASP vulnerabilities, identifies attempts of exploration in your web application, and notify you or your incident team on Telegram, Zabbix and Syslog/SIEM.

    ARTLAS uses the regular expression from the PHP-IDS project, to identify the attempts of exploration, download link to the latest version of the file Download File


    ChangeLog
    -Added CEF for syslog and SIEM
    -Added option to connect in syslog servers or SIEM’s
    -Added Zabbix integration with differents triggers
    -Code review added class structure
    -Added vhost capability
    -Added verbose outup enabled
    -Zabbix Notifications bugs fixed

    Supported Output
    Zabbix Version 2.4 and 3.0
    SySlog
    SIEM
    Telegram

    Supported web servers
    Apache
    Apache vHost
    Nginx
    Nginx vHost

    Installation
    Clone project
    git clone https://github.com/mthbernardes/ARTLAS.git

    Install dependencies
    pip install -r dependencies.txt
    python version 2.7.11(lastet)

    Install screen
    sudo apt-get install screen #Debian Like
    sbopkg -i screen # Slackware 14.*
    yum install screen # CentOS/RHEL
    dnf install screeen # Fedora

    screen tutorial [pt_Br]

    Configuration
    All your configurations will be made in etc/artlas.conf file.

    TELEGRAM INTEGRATION
    [Telegram]
    api = Your Token API
    group_id = Group/User ID that will receive the notifications
    enable = True to send notificantions or False to not send.

    ZABBIX CONFIGURATION
    [Zabbix]
    server_name = hostname of the server in zabbix
    agentd_config = Zabbix agent configuration file
    enable_advantage_keys = True or False to use advanced triggers
    notifications = true to enable or false to disable triggers notifications
    enable = true to enable or false to disable

    SYSLOG/SIEM CONFIGURATION
    [CEF_Syslog]
    server_name = IP or Hostname SySlog/SIEM server
    enable = True or False to enable

    GENERAL CONFIGURATION
    [General]
    apache_log = Full path apache access.log
    apache_mask = Mask to identify the fields in the apache access log
    vhost_enable = True to enable or False to disable vhosts
    rules = etc/default_filter.json It's the file that contains the OWASP filter [Do not Change]

    How to start
    screen -S artlas
    python artlas.py
    CTRL+A+D

    Team
    Matheus Bernardes a.k.a. G4mbler
    Henrique Gonçalves a.k.a. Kamus Hadenes
    André Déo



    LazyMap - Automate NMAP Scans and Generate Custom Nessus Policies Automatically

    $
    0
    0


    Automate NMAP scans and custom Nessus polices.

    Installing
    git clone https://github.com/commonexploits/port-scan-automation.git

    How To Use
    ./lazymap.sh

    Features
    • Discovers live devices
    • Auto launches port scans on only the discoverd live devices
    • Can run mulitple instances on multiple adaptors at once
    • Creates client Ref directory for each scan
    • Outputs all unique open ports in a Nessus ready format. Much faster to scan in Nessus.
    • Runs as default a T4 speed scan. If you find this too slow, you can press CTRL C in the scan window and it will cleanup and relaunch that one scan with T5 speed option.
    • Logs all start/stop times, live hosts, hosts down, unique ports.
    • Auto creates a custom Nessus policy with only the discovered ports, must faster to scan. *
    • Read the script header carefully, in order for the auto Nessus policy creater you must first save a default template to the same directory as the script. The script will detect the default template and create you a unique Nessus policy after each scan for just the unique ports. Then simply import the policy into Nessus and scan just the live devices that the script found. This will save a massive amount of time scanning, plus will give you more accurate findings.
    • By Default it will scan a full TCP, Quick UDP, Common ports and a Safe Script scan. You can turn these on and off in the header.

    Requirements
    Tested on Backtrack 5 and Kali.

    Screen Shot






    Change Log
    • Version 2.5 - Improved interface detection for new O/S versions. Replaced legacy Nmap commands
    • Version 2.2 - Added auto exclude own source address from scans. Also ability to feed exclusion list of IPs or ranges
    • Version 2.1 - Few minor bug fixes and resolved issue if input list contains numbers in the file name
    • Version 2.0 - New look. Now works with Kali and Nessus 4 & 5 Policies. New percent progress for live host discovery.
    • Version 1.8 - Official release.


    Kali Linux 2016.2 - The Best Penetration Testing Distribution

    $
    0
    0

    This release brings a whole bunch of interesting news and updates into the world of Kali.

    New KDE, MATE, LXDE, e17, and Xfce Builds

    Although users are able to build and customize their Kali Linux ISOs however they wish, we often hear people comment about how they would love to see Kali with $desktop_environment instead of GNOME. We then engage with those people passionately, about how they can use live-build to customize not only their desktop environment but pretty much every aspect of their ISO, together with the ability to run scripted hooks at every stage of the ISO creation process – but more often than not, our argument is quickly lost in random conversation. As such, we’ve decided to expand our “full” 64bit releases with additional Desktop Environment flavored ISOs, specifically KDE, Mate, LXDE and Enlightenment. These can now be downloaded via our Kali Download page. For those curious to see what the various Desktop Environments look like, we’ve taken some screenshots for you:

    Gnome

    E17

    KDE

    LXDE

    Mate

    Xfce

    Kali Linux Weekly ISOs

    Constantly keeping Kali on the bleeding edge means frequent updates to packages on an ongoing basis. Since our last release several months ago, there’s a few hundred new or updated packages which have been pushed to the Kali repos. This means that anyone downloading an ISO even 3 months old has somewhat of a long “apt-get dist-upgrade” ahead of them. To help avoid this situation, from this release onwards, we’ll be publishing updated weekly builds of Kali that will be available to download via our mirrors. Speaking of mirrors, we are always in need of support in this area – if you’re capable of running a high-bandwidth mirror and would like to support our project, please check out our Kali Mirrors page.

    Bug Fixes and OS Improvements

    During these past few months, we’ve been busy adding new relevant tools to Kali as well as fixing various bugs and implementing OS enhancements. For example, something as simple as adding HTTPS support in busybox now allows us to preseed Kali installations securely over SSL. This is a quick and cool feature to speed up your installations and make them (almost) unattended, even if you don’t have a custom built ISO.


    To set a preseed file during an install process, choose the “install” option, then hit “tab” and enter the preseed directive, together with a URL pointing to your actual preseed file.
    preseed/url=https://www.kali.org/dojo/preseed.cfg

    Read more here.

    SSMA - Simple Static Malware Analyzer

    $
    0
    0

    SSMA is a simple malware analyzer written in Python 3.

    Features:
    • Searches for websites, e-mail addresses, IP addresses in the strings of the file.
    • Looks for Windows functions commonly used by malware.
    • Get results from VirusTotal and/or upload files.
    • Malware detection based on Yara-rules - https://virustotal.github.io/yara/
    • Detect well-known software packers.
    • Detect the existence of cryptographic algorithms.
    • Detect anti-debug and anti-virtualization techniques used by malware to evade automated analysis.
    • Find if documents have been crafted to leverage malicious code.

    Usage
    git clone https://github.com/secrary/SSMA

    cd SSMA

    sudo pip3 install -r requirements.txt

    python3 ssma.py -h
    Additional: ssdeep - Installation
    More: Simple Static Malware Analyzer


    winfsp - Windows File System Proxy

    $
    0
    0


    WinFsp is a set of software components for Windows computers that allows the creation of user mode file systems. In this sense it is similar to FUSE (Filesystem in Userspace), which provides the same functionality on UNIX-like computers.
    Some of the benefits and features of using WinFsp are listed below:
    • Allows for easy development of file systems in user mode. There are no restrictions on what a process can do in order to implement a file system (other than respond in a timely manner to file system requests).
    • Support for disk and network based file systems.
    • Support for NTFS level security and access control.
    • Support for memory mapped files, cached files and the NT cache manager.
    • Support for file change notifications.
    • Support for file locking.
    • Correct NT semantics with respect to file sharing, file deletion and renaming.
    To learn more about WinFsp, please visit its website: http://www.secfs.net/winfsp/

    Project Organization
    WinFsp consists of a kernel mode FSD (File System Driver) and a user mode DLL (Dynamic Link Library). The FSD interfaces with NTOS (the Windows kernel) and handles all interactions necessary to present itself as a file system driver to NTOS. The DLL interfaces with the FSD and presents an easy to use API for creating user mode file systems.
    The project source code is organized as follows:
    • build/VStudio: WinFsp solution and project files.
    • doc: WinFsp license, contributor agreement and additional documentation. The WinFsp design documents can be found here.
    • ext/tlib: A small test library originally from the secfs (Secure Cloud File System) project.
    • ext/test: Submodule pointing to the secfs.test project, which contains a number of tools for testing Windows and POSIX file systems.
    • inc/winfsp: Public headers for the WinFsp API.
    • inc/fuse: Public headers for the FUSE compatibility layer.
    • src/dll: Source code to the WinFsp DLL.
    • src/dll/fuse: Source code to the FUSE compatibility layer.
    • src/launcher: Source code to the launcher service and the launchctl utility.
    • src/sys: Source code to the WinFsp FSD.
    • opt/cygfuse: Source code for the Cygwin FUSE package.
    • tst/memfs: Source code to an example file system written in C++ (memfs).
    • tst/winfsp-tests: WinFsp test suite.

    Building and Running
    In order to build WinFsp you will need the following:
    • Windows 10
    • Visual Studio 2015
    • Windows Driver Kit (WDK) 10
    • Wix toolset
    If you build the driver yourself it will not be signed and Windows will refuse to load it unless you enable "testsigning". You can enable "testsigning" using the command bcdedit.exe -set testsigning . For more information see this document .
    WinFsp is designed to run on Vista and above. It has been tested on the following platforms so far:
    • Windows 7 Enterprise
    • Windows 8 Pro
    • Windows 10 Pro
    • Windows Server 2012

    How to Help
    I am looking for help in the following areas:
    • If you have a file system that runs on FUSE please consider porting it to WinFsp. WinFsp has a native API, but it also has a FUSE (high-level) API.
    • If you are working with a language other than C/C++ (e.g. Delphi, C#, etc.) and you are interested in porting/wrapping WinFsp I would love to hear from you.
    • There are a number of outstanding issues listed in the GitHub repository BitBucket repository . Many of these require knowledge of Windows kernel-mode and an understanding of the internals of WinFsp so they are not for the faint of heart. If you decide to tackle any of those please coordinate with me as I am actively working on that issue list.
    In all cases I can provide ideas and/or support.

    Where to Discuss
    If you wish to discuss WinFsp there are now two options:


    dhcpoptinj - DHCP Option Injector

    $
    0
    0

    Have you ever wanted to intercept DHCP requests and squeeze in a few extra DHCP options, unbeknownst to the sender? Probably not. However, should the need ever come, dhcpoptinj will (hopefully) help you.

    Why
    There can be many a reason to mangle DHCP requests, although chances are you ought to look for a much better method for solving your problem. Perhaps you do not have access to the DHCP server/clients and need to modify their DHCP options, perhaps the DHCP software is difficult to configure (or does not support what you want to do), perhaps you have a very complex and/or odd setup, or perhaps you just want to experiment sending exotic or malformed options? There is a small chance that dhcoptinj might actually be of some use.

    How
    dhcpoptinj waits for packets to arrive in a netfilter queue. It will ensure that a packet is in fact a BOOTP/DHCP packet, and if so proceed to inject options. It will recalculate the IPv4 header checksum, disable the UDP checksum (for a simpler implementation) and then give the packet back to netfilter.
    You need an iptables rule in order to intercept packets and send them to dhcpoptinj. Let us say you have two interfaces bridged together, eth0 and eth1 . Let us say you want to intercept all BOOTP requests coming from eth0 and inject the relay agent information option (82/0x52). Let us make up a silly payload: An agent circuit ID sub-option with the value "Fjas".
    Add a rule to the iptables mangle table: sudo iptables -t mangle -A PREROUTING -m physdev --physdev-in eth0 -p udp --dport 67 -j NFQUEUE --queue-num 42 .
    Then run dhcpoptinj (let us run it in the foreground with extra debug output): sudo dhcpoptinj -d -f -q 42 -o'52 01 04 46 6A 61 73' . Note that dhcpoptinj must be run by a user with the CAP_NET_ADMIN capability. You do not need to, and you really should not run dhcpoptinj as root. Instead, you can for instance grant the CAP_NET_ADMIN capability to the binary (using setcap ) and limit execution rights to only a specific user or group. This is a method used for running wireshark as non-root, so you will find several guides helping you accomplish this.
    Now send a DHCP packet to the eth0 interface and watch it (using a tool like wireshark ) having been modified when it reaches the bridged interface. It should have the injected option at the end of the option list. If you capture the incoming DHCP packet with Wireshark, it will appear unmodified although it will in fact be mangled.
    Note the format of the argument to the -o option: It should be a hexadecimal string starting with the DHCP option code followed by the option payload. The option length (the byte that normally follows the option code) is automatically calculated and must not be specified. The hex string can be delimited by non-hexadecimal characters for readability. All options must have a payload, except for the special pad option (code 0).
    The layout of the nonsensical option used in this example (first the DHCP option layout , then the specific relay agent information option sub-option layout ) is as follows:
    Code Length Data
    52 (auto) 01 04 46 6A 61 73 ("Fjas")
    Sub-opt. Length Data
    01 4 46 6A 61 73 ("Fjas")
    Note that dhcpoptinj does not care about what you write in the option payloads, neither does it check whether your option code exists. It does however forbid you to use the option code 255 (the terminating end option). dhcpoptinj inserts this option as the last option automatically.

    Installing
    dhcoptinj is quite a simple program and should be unproblematic to build.

    Prerequisites
    You need cmake and libnetfilter_queue (and a C compiler that supports C99). Hopefully, you are using a Debian-like system, in which case you can run the following to install them: sudo apt-get install cmake libnetfilter-queue-dev .

    Build
    1. Download or clone the source: git clone git://github.com/misje/dhcpoptinj
    2. Enter the directory: cd dhcpoptinj   
    3. Run cmake: cmake . (or cmake -DCMAKE_BUILD_TYPE=Debug . if you want a debug build)
    4. Run make: make -j4
    5. Install (optional, but you will benefit from having dhcpoptinj in your PATH): sudo make install

    Demolish
    1. Run sudo make uninstall from your build directory
    The build directory with all its contents can be safely removed. If you did not use a build directory, you can get rid of all the cmake rubbish by running git clean -dfx . Note, however, that this removes everything in the project directory that is not under source control.

    Help
    This readme should have got you started. There is no man page for dhcpoptinj, but the help ( dhcpoptinj -h ) should cover everything the utility has to offer.
    For bugs and suggestions please create an issue.

    Limitations
    dhcpoptinj is simple and will hopefully stay that way. Nonetheless, the following are missing features that hopefully will be added some day:
    1. Remove options instead of having to replace them
    2. Filter incoming packets by their DHCP message type (code 53) before mangling them

    Troubleshooting
    1. Failed to bind queue handler to AF_INET: Operation not permitted
      Most likely you do not have CAP_NET_ADMIN capability or there is another process (perhaps another dhcpoptinj instance?) bound to the same netfilter queue number.

    Known issues
    I am not experienced in the netfilter library. There may be (although I cannot promise) bugs.
    1. Syscall param socketcall.sendto(msg) points to uninitialised byte(s) valgrind error
      This issue is not fully investigated yet.
    2. Memory leak on non-normal exit.
      This is not considered a leak. However, there should be no memory leak on a normal exit (catching SIGTERM, SIGINT or SIGHUP).

    Useful information
    When creating iptables rules to use with dhcpoptinj, the following options can be useful:
    • --queue-bypass
      Do not drop packets, but let them pass through if dhcpoptinj is not running (or not listening on the correct queue number).

    Contributing
    If you have any suggestions please leave an issue, and I will come back to you. You are welcome to contribute and pull requests are much appreciated.
    If you find dhcpoptinj useful I would love to hear what you are using it for. Update the wiki page and describe your use.


    DMitry - Deepmagic Information Gathering Tool

    $
    0
    0

    DMitry (Deepmagic Information Gathering Tool) is a UNIX/(GNU)Linux Command Line Application coded in C language.
    DMitry has the ability to gather as much information as possible about a host. Base functionality is able to gather possible subdomains, email addresses, uptime information, tcp port scan, whois lookups, and more. The information are gathered with following methods:
    • Perform an Internet Number whois lookup.
    • Retrieve possible uptime data, system and server data.
    • Perform a SubDomain search on a target host.
    • Perform an E-Mail address search on a target host.
    • Perform a TCP Portscan on the host target.
    • A Modular program allowing user specified modules

    Download and installation

    DMitry can be downloaded by issuing following commands:
    $ cd /data/src/
    $ wget http://pkgs.fedoraproject.org/repo/pkgs/DMitry/DMitry-1.3a.tar.gz/8d578ba16de34b5cbebf6b767181b00d/DMitry-1.3a.tar.gz
    For installation, issue following commands:
    $ tar xzvf DMitry-1.3a.tar.gz
    $ cd DMitry-1.3a/
    $ ./configure
    $ make
    $ sudo make install
    Then optionally create a symbolic link to your /pentest/ directory:
    $ mkdir -p /pentest/enumeration/dmitry/
    $ ln -s /usr/local/bin/dmitry /pentest/enumeration/dmitry/dmitry

    Use

    help

    DMitry help can be displayed by issuing:
    $ dmitry --help
    or, for a more complete documentation:
    $ man dmitry

    options

    The options are detailed below:
    -o filename
    Create an ascii text output of the results to the "filename"
    specified. If no output filename is specified then output will
    be saved to "target.txt". If this option is not specified in
    any form output will be sent to the standard output (STDOUT) by
    default. This option MUST trail all other options, i.e.
    "./dmitry -winseo target".

    -i Perform an Internet Number whois lookup on the target. This
    requires that the target be in the form of a 4 part Internet
    Number with each octal seperated using the ‘.’ notation. For
    example, "./dmitry -i 255.255.255.255".

    -w Perform a whois lookup on the ’host’ target. This requires that
    the target be in a named character format. For example,
    "./dmitry -w target" will perform a standard named whois lookup.

    -n Retrieve netcraft.com data concerning the host, this includes
    Operating System, Web Server release and UpTime information
    where available.

    -s Perform a SubDomain search on the specified target. This will
    use serveral search engines to attempt to locate sub-domains in
    the form of sub.target. There is no set limit to the level of
    sub-domain that can be located, however, there is a maximum
    string length of 40 characters (NCOL 40) to limit memory usage.
    Possible subdomains are then reversed to an IP address, if this
    comes back positive then the resulting subdomain is listed.
    However, if the host uses an asterisk in their DNS records all
    resolve subdomains will come back positive.

    -e Perform an EmailAddress search on the specified target. This
    modules works using the same concept as the SubDomain search by
    attempting to locate possible e-mail addresses for a target
    host. The e-mail addresses may also be for possible sub-domains
    of the target host. There is a limit to the length of the e-
    mail address set to 50 characters (NCOL 50) to limit memory
    usage.

    -p Perform a TCP Portscan on the host target. This is a pretty
    basic module at the moment, and we do advise users to use some‐
    thing like nmap (www.insecure.org/nmap/) instead. This module
    will list open, closed and filtered ports within a specific
    range. There will probably be little advancement upon this mod‐
    ule, though there will be some alterations to make it a little
    more user friendly. There are also other options for this mod‐
    ule that can affect the scan and its relative output.

    -f This option will cause the TCP Portscan module to report/display
    output of filtered ports. These are usually ports that have
    been filtered and/or closed by a firewall at the specified
    host/target. This option requires that the ’-p’ option be
    passed as a previous option. For example, "./dmitry -pf tar‐
    get".

    -b This option will cause the TCP Portscan module to output Banners
    if they are received when scanning TCP Ports. This option
    requres that the ’-p’ option be passed as a previous option.
    For example, "./dmitry -pb target".

    -t This sets the Time To Live (TTL) of the Portscan module when
    scanning individual ports. This is set to 2 seconds by default.
    This is usually required when scanning a host that has a fire‐
    wall and/or has filtered ports which can slow a scan down.

    Example

    The following command:
    $ dmitry -iwns -o example.out google.com
    creates a report named example.out, that looks like this:
    HostIP:209.85.227.99
    HostName:google.com

    Gathered Inet-whois information for 209.85.227.99
    ---------------------------------

    OrgName: Google Inc.
    OrgID: GOGL
    Address: 1600 Amphitheatre Parkway
    City: Mountain View
    StateProv: CA
    PostalCode: 94043
    Country: US

    NetRange: 209.85.128.0 - 209.85.255.255
    CIDR: 209.85.128.0/17
    NetName: GOOGLE
    NetHandle: NET-209-85-128-0-1
    Parent: NET-209-0-0-0-0
    NetType: Direct Allocation
    NameServer: NS1.GOOGLE.COM
    NameServer: NS2.GOOGLE.COM
    NameServer: NS3.GOOGLE.COM
    NameServer: NS4.GOOGLE.COM
    Comment:
    RegDate: 2006-01-13
    Updated: 2006-06-01

    OrgTechHandle: ZG39-ARIN
    OrgTechName: Google Inc.
    OrgTechPhone: +1-650-318-0200
    OrgTechEmail: arin-contact@google.com

    # ARIN WHOIS database, last updated 2010-02-06 20:00
    # Enter ? for additional hints on searching ARIN's WHOIS database.
    #
    # ARIN WHOIS data and services are subject to the Terms of Use
    # available at https://www.arin.net/whois_tou.html

    Gathered Inic-whois information for google.com
    ---------------------------------

    Domain Name: GOOGLE.COM
    Registrar: MARKMONITOR INC.
    Whois Server: whois.markmonitor.com
    Referral URL: http://www.markmonitor.com
    Name Server: NS1.GOOGLE.COM
    Name Server: NS2.GOOGLE.COM
    Name Server: NS3.GOOGLE.COM
    Name Server: NS4.GOOGLE.COM
    Status: clientDeleteProhibited
    Status: clientTransferProhibited
    Status: clientUpdateProhibited
    Status: serverDeleteProhibited
    Status: serverTransferProhibited
    Status: serverUpdateProhibited
    Updated Date: 18-nov-2008
    Creation Date: 15-sep-1997
    Expiration Date: 14-sep-2011

    >>> Last update of whois database: Sun, 07 Feb 2010 08:06:53 UTC <<<

    NOTICE: The expiration date displayed in this record is the date the
    registrar's sponsorship of the domain name registration in the registry is
    currently set to expire. This date does not necessarily reflect the expiration
    date of the domain name registrant's agreement with the sponsoring
    registrar. Users may consult the sponsoring registrar's Whois database to
    view the registrar's reported date of expiration for this registration.

    TERMS OF USE: You are not authorized to access or query our Whois
    database through the use of electronic processes that are high-volume and
    automated except as reasonably necessary to register domain names or
    modify existing registrations; the Data in VeriSign Global Registry
    Services' ("VeriSign") Whois database is provided by VeriSign for
    information purposes only, and to assist persons in obtaining information
    about or related to a domain name registration record. VeriSign does not
    guarantee its accuracy. By submitting a Whois query, you agree to abide
    by the following terms of use: You agree that you may use this Data only
    for lawful purposes and that under no circumstances will you use this Data
    to: (1) allow, enable, or otherwise support the transmission of mass
    unsolicited, commercial advertising or solicitations via e-mail, telephone,
    or facsimile; or (2) enable high volume, automated, electronic processes
    that apply to VeriSign (or its computer systems). The compilation,
    repackaging, dissemination or other use of this Data is expressly
    prohibited without the prior written consent of VeriSign. You agree not to
    use electronic processes that are automated and high-volume to access or
    query the Whois database except as reasonably necessary to register
    domain names or modify existing registrations. VeriSign reserves the right
    to restrict your access to the Whois database in its sole discretion to ensure
    operational stability. VeriSign may restrict or terminate your access to the
    Whois database for failure to abide by these terms of use. VeriSign
    reserves the right to modify these terms at any time.

    The Registry database contains ONLY .COM, .NET, .EDU domains and

    Gathered Netcraft information for google.com
    ---------------------------------

    Retrieving Netcraft.com information for google.com
    Netcraft.com Information gathered

    Gathered Subdomain information for google.com
    ---------------------------------
    Searching Google.com:80...
    HostName:www.google.com
    HostIP:209.85.227.99
    Searching Altavista.com:80...
    Found 1 possible subdomain(s) for host google.com, Searched 0 pages containing 0 results

    Read More here.

    CodeWarrior - Just Another Manual Code Analysis Tool And Static Analysis Tool

    $
    0
    0

    Just another manual code analysis tool and static analysis tool Codewarrior runs at HTTPd with TLS, uses KISS principle( https://en.wikipedia.org/wiki/KISS_principle )

    Directories:
    web/ = local of javascripts and html and css sources
    src/ = C source code, this code talking with web socket
    eggs/ = external modules to search codes using regex
    conf/whitelist.conf = list of IPs that have access in HTTPd server
    bin/ = file to execute...
    doc/ = at construction...
    Don't need install, just compile and run, don't have external libs... runs at Linux, BSD and MacOS.
    • git clone ttps://github.com/CoolerVoid/codewarrior/; cd codewarrior
    • $ make
    • $ cd cert; openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt
    • $ cat certificate.crt privateKey.key > certkey.pem
    • $ cd ..
    • $ /bin/warrior
    Open browser at https://localhost:1345/index.html

    Notes:
    • if screen stock you reflesh browser with F5...
    • If return error, port already in use... close it with...
    • $ fuser -k -n tcp 1345
    • If you want use at network, Whitelist to access server you can edit at "config/whitelist.conf".

    Tested at path:
    https://github.com/joostvanveen/php-security-pitfalls

    Tricks:
    • if you want change cert "cert/certpem.pem" generate with openssl cartificate and key and concatenate both...
    • all html code and web sockets + javascript code you can view at path "web/"
    • if you change the default port you need edit port in web/ at web sockets connection.

    TODO:
    • Add external Automatons for each language case
    • Add load module with dlopen()
    • Add ReDOS validator at regex calls
    • Machine learning so try use bag of Words with KNN

    Author: CoolerVoid



    Choronzon - An Evolutionary Knowledge-Based Fuzzer

    $
    0
    0

    An evolutionary knowledge-based fuzzer

    Introduction
    This document aims to explain in brief the theory behind Choronzon . Moreover, it provides details about its internals and how one can extend Choronzon to meet new requirements. An overview of the architecture of Choronzon was initially presented at the ZeroNights 2015 Conference . A recording of the presentation and the slide deck are also available.
    Choronzon is an evolutionary fuzzer. It tries to imitate the evolutionary process in order to keep producing better results. To achieve this, it has an evaluation system to classify which of the fuzzed files are interesting and which should be dropped.
    Moreover, Choronzon is a knowledge-based fuzzer. It uses user-defined information to read and write files of the targeted file format. To become familiar with Choronzon's terminology, you should consider that each file is represented by a chromosome . Users should describe the elementary structure of the file format under consideration. A high level overview of the file format is preferred instead of describing every detail and aspect of it. Each one of those user-defined elementary structures is considered a gene . Each chromosome contains a tree of genes and it is able to build the corresponding file from it.
    Choronzon is divided into three subsystems, the Tracer module, the Chromosome module and the fuzzer.
    Briefly, the Chromosome component is used to describe the target file format. Users are able to write their own modules to support new or custom formats. As a test-case, a PNG module is provided with Choronzon .
    On the other hand, the Tracer component is responsible to monitor the target application and collect various information about its execution. This version of Choronzon uses Intel's Pin binary instrumentation tool in order to log the basic blocks that were visited during the execution. However, Choronzon is able to support other tracing backends as well. Also keep in mind that in the next version of Choronzon, Pin is going to be replaced due to its staggering performance impact.
    Lastly, the fuzzer component is used to alter the contents of the files to be tested. The module contains a corpus of Mutators and Recombinators . Mutators , simply, are changing the file like common fuzzers do. For example, they perform byte flipping, byte swapping, random byte mutation and so on. But Choronzon has another feature that is not that common across fuzzers. Recombinators are using the information about the structure of the file format, provided by the Chromosome module, in order to perform intelligent fuzzing.

    Chromosome
    In the directory chromosome/parsers you can find the file PNG.py . This Python module describes the PNG file format to the fuzzer. You may add your custom modules for other file formats in this directory.
    The fundamental idea behind the Chromosome subsystem is to convert the initial seed files using a Deserializer into a tree of Genes . At some point, the (fuzzed) Genes will be written into a file, using a Serializer .
    Consider that in Choronzon the aim of the parser module is to provide the elementary structure of the file format, instead of every minor detail. This will help the fuzzer to construct files that are mostly sane, avoiding early exiting from the target application. Additionally, this approach saves time, because describing every aspect of the file format is time consuming and introduces significant development overhead.

    How to write a custom parser
    A new parser module must import:
    • chromosome.gene.AbstractGene
    • chromosome.serializer.BaseSerializer
    • chromosome.deserializer.BaseDeserializer
    and it must implement
    • a Gene class derived from chromosome.gene.AbstractGene ,
    • a Serializer class derived from chromosome.serializer.BaseSerializer ,
    • and a Deserializer class derived from chromosome.deserializer.BaseDeserializer .
    In the example shipped with Choronzon , each PNGGene corresponds to a PNG chunk. Generally, you may think of a Gene as an elementary data structure of the target format. Each Chromosome is comprised from a tree of Genes , and represents a unique file. Each Gene must be able to produce a byte string that contains its data combined with the data of the lower Genes in the tree.
    The PNGSerializer must be able to produce (a mostly sane) file from when a list of Genes is given to it. On the other hand, PNGDeserializer must be a able to parse a valid file of the target format and deserialize it to a tree of Genes .
    Check chromosome/parsers/PNG.py for a commented example for the PNG format.

    Tracer
    The Tracer module is used to disassemble the target application (and/or one or more of its libraries). In this version of Choronzon this is achieved with IDA. We used this approach because we can correlate any interesting information from the fuzzing campaign with our IDBs. However, we may drop the dependency on IDA in the near future in order to make Choronzon more portable and accessible.
    A file is tested against an application with the help of a Pin utility. In the analyzer/coverage directory there's the source code of this Pin tool, which injects hooks in the beginning of each basic block at the target application. When the execution is finished, we correlate the basic block that was hit, with the basic block from the binary. Thus, we're able to calculate metrics that are valuable for us (coverage etc).

    Fuzzer
    The Fuzzer component is using the Chromosome representation to fuzz a file. As mentioned earlier, there are two fuzzing methods in Choronzon .
    For the first method, Choronzon gets the content from one or more genes and applies one of the Mutators . Mutators implement common but effective fuzzing methods like random byte mutation, high bit set, byte swapping and many more. You may also write your own custom mutators and add them in fuzzers/mutators.py .
    The second fuzzing method is called recombination. Recombinators are used to change the structure of the file. Here's an example with the PNG format.
    PNG files are comprised by consecutive chunks that contain four fields,
    • length,
    • chunk's type,
    • chunk's data,
    • and a CRC.
    Let's assume we have a PNG file that only has IHDR, IDAT and IEND chunks. Its structure would look like the following:
    [ PNG signature ] [ IHDR ] [ IDAT ] [ IEND ]
    Since Choronzon is aware of the basic structures (i.e the PNG chunks), it is able to alter their sequence. After a successful recombination the fuzzed PNG output file can look like this:
    [ PNG signature ] [ IDAT ] [ IHDR ] [ IEND ]
    Choronzon contains many more recombination strategies that make it able to cope even with complicated file formats.

    Installation
    Choronzon has been tested with Python 2.7, Pin 3, IDA Pro 6.6 to 6.9, on Ubuntu 16.04 LTS (Linux kernel 4.4) and Windows 10.
    In order to run it you'll need to install the sortedcontainers Python package. You may find it here or install it via pip.
    Moreover, Choronzon needs IDA Pro (actually, its terminal version). The path of IDA Pro should be specified in your configuration file like this:
    DisassemblerPath = 'C:\\Program Files (x86)\\IDA 6.6'
    It has been tested successfully with IDA Pro 6.6, 6.7, 6.8 and 6.9.
    Choronzon's coverage Pin tool is located at analyzer/coverage and must be compiled. You may want to check Pin's documentation for details, or you can perform the following steps:
    1. Copy the coverage.cpp and makefile.rules file to /path/to/pin/source/tools/MyPinTool
    2. Run make . If you're on Windows you should run the Visual Studio command line, and use the make utility and its dependencies from Cygwin
    3. Copy back to /path/to/choronzon/analysis/coverage the newly created obj-intel64 directory (or obj-ia32 for 32 bit systems)

    Configuration
    In order to fuzz with Choronzon , you must provide a configuration file. In the settings directory there is an example of Choronzon's configuration.


    PassTrust - A Ruby-Based Tool That Converts A Simple Passphrase Into A Secure Password

    $
    0
    0

    Ruby-based tool which allows you to have secure passwords that you can use anywhere, only by remembering simple passphrases.
    PassTrust is able to convert any simple string into a secure password between 16 and 64 characters. This allows you to have easy-to-remember passphrases but strong & secure passwords.
    PassTrust is not a password manager, it's a generator. It uses a variety of hashing algorithms to create your password, and the process is not reversible. (So nobody will know what your passphrase was unless it was really easy to begin with)
    The generated passwords are very hard to brute-force, especially on the longer password settings.

    Installation
    Installing passtrust for Linux is easy.
    (#) : Run as root
    ($) : Run as normal user
    For Debian, Ubuntu and derivatives:
    $ git clone https://github.com/xorond/passtrust
    $ cd passtrust
    # apt-get install ruby bundler
    $ bundler install
    $ ./passtrust
    For Archlinux:
    $ git clone https://github.com/xorond/passtrust
    $ cd passtrust
    # pacman -S ruby ruby-bundler
    $ bundler install
    $ ./passtrust
    Alternatively, you can use the install script for a system-wide install:
    # ./install
    $ passtrust

    Usage
    Usage is pretty straightforward:
    $ passtrust -h
    PassTrust Password Generator

    Usage: passtrust [options]
    -v, --verify Ask the keyword twice
    -l, --length [LENGTH] Change password length (default is 16, max is 64)
    -t, --timeout [SECONDS] Change the amount of seconds the password will be on screen (default is 10)
    -c, --clipboard Copy the password to the clipboard
    -s, --secret Don't show any character when typing
    -r, --random Don't ask for a passphrase, use a random one.
    -h, --help Show this message
    To use the default options, run passtrust without arguments.
    $ passtrust
    Password will be 16 characters long
    Enter passphrase:
    To make passtrust ask the passphrase twice (useful if you don't want to risk mistyping and losing your password in the future)
    $ passtrust -v
    Password will be 16 characters long
    Verification is on
    Enter passphrase:
    The default timeout is 10 seconds, this can be changed with the -t flag
    $ passtrust -t 30
    Password will be 16 characters long
    Enter passphrase: [something]
    Your generated password is: [something]
    The screen will clear in 30 seconds.
    The password length can be changed with -l, maximum is 64 and minimum is 16.
    $ passtrust -l 32
    Password will be 32 characters long
    Enter passphrase:
    As you type in your password, the characters will show up as * . You can disable that with the -s flag
    $ passtrust -s
    Password will be 16 characters long
    Secret mode is activated
    Enter passphrase:
    If you have the clipboard gem installed, you can use the clipboard options. When you pass the -c flag, the generated password will be copied to your clipboard. It will then be replaced with a fake one when the timer reaches zero.
    $ passtrust -c
    Password will be 16 characters long
    Enter passphrase: [something]
    Your generated password is: [something]
    Password has been copied to your clipboard.
    Text in clipboard will be replaced with a fake after timer.
    The screen will clear in 10 seconds.
    If you don't want to think of a passphrase, passtrust can generate a random passphrase as well.
    $ passtrust -r
    Password will be 16 characters long
    Your random passphrase is:
    "[something]"
    Your generated password is: [something]
    The screen will clear in 10 seconds.

    About
    A big inspiration for this project was passera .
    PassTrust has been tested under the following distributions:
    Archlinux
    Debian Jessie


    swarm - A Modular Distributed Penetration Testing Tool

    $
    0
    0

    Swarm is an open source modular distributed penetration testing Tool that use distributed task queue to implement communication in the master-slave mode system and use MongoDB for data storage. It consists of a distributed framework and function modules. The function module can be an entirely new implement of some penetration functions or it can be a simple wrap of an existing tool to implement distributed functionality. Because of the modularity architecture it is easy to customize and extend new features under the distributed framework.

    Now in this version 0.6.0 it has five modules:
    • Subdomain name scan module
    • Directories and files scan module
    • Nmap extension module
    • Sitemap crawler module
    • Intruder module
    If you want to write your own module, you can read this .

    Install
    Zipball can be download here . You can also use git to get swarm:
    git clone git@github.com:Arvin-X/swarm.git
    then use setup.py to install swarm:
    python setup.py install
    Swarm works with Python 2.6.x or 2.7.x and it need MongoDB support on master host.
    If you do not have MongoDB yet, you can use apt-get to install it:
    apt-get install mongodb

    Usage
    Run swarm on master host to distribute tasks and run swarm-s with '-p' option on slave host to finish the subtask from master.
    swarm-s -p 9090
    You can also establish a listener on target port of slave host to receive command to waken swarm-s by specify '--waken' option when you run swarm. Otherwise you should leave '--waken' null. To create a listener, you can use nc or socat like:
    nc -e /bin/sh -l 9191
    And use waken command like:
    swarm-s ARGS
    You need to leave "ARGS" in your command and ensure it will be cli args passed to swarm for swarm to replace it with some necessary arguments like '-p'.
    Basic usage of swarm:
    usage: swarm [-h] -m MODULE [-v] [-c] [-o PATH] [-t [TARGET [TARGET ...]]]
    [-T PATH] [-s [SWARM [SWARM ...]]] [-S PATH] [--waken CMD]
    [--timeout TIME] [--m-addr ADDR] [--m-port PORT] [--s-port PORT]
    [--authkey KEY] [--db-addr ADDR] [--db-port PORT] [--process NUM]
    [--thread NUM] [--taskg NUM] [--dom-compbrute] [--dom-dict PATH]
    [--dom-maxlevel NUM] [--dom-charset SET] [--dom-levellen LEN]
    [--dom-timeout TIME] [--dir-http-port PORT]
    [--dir-https-port PORT] [--dir-compbrute] [--dir-charset SET]
    [--dir-len LEN] [--dir-dict PATH] [--dir-maxdepth NUM]
    [--dir-timeout TIME] [--dir-not-exist FLAG] [--dir-quick-scan]
    [--nmap-ports PORTS] [--nmap-top-ports NUM] [--nmap-ops ...]
    [--int-target [URLS [URLS ...]]] [--int-method METHOD]
    [--int-headers JSON] [--int-cookies COOKIES] [--int-body BODY]
    [--int-payload PAYLOAD] [--int-flag FLAGS] [--int-timeout TIME]
    [--map-seed SEED] [--map-http-port PORT] [--map-https-port PORT]
    [--map-cookies COOKIES] [--map-interval TIME]
    [--map-timeout TIME]

    optional arguments:
    -h, --help show this help message and exit
    -m MODULE Use module name in ./modules/ to enable it

    Output:
    These option can be used to control output

    -v Output more verbose
    -c Disable colorful log output
    -o PATH Record log in target file

    Target:
    At least one of these options has to be provided to define target unless
    there is another special option for defining target in the module

    -t [TARGET [TARGET ...]]
    Separated by blank (eg: github.com 127.0.0.0/24
    192.168.1.5)
    -T PATH File that contains target list, one target per line

    Swarm:
    Use these options to customize swarm connection. At least one of slave
    host has to be provided.

    -s [SWARM [SWARM ...]]
    Address of slave hosts with port if you need waken
    them (eg: 192.168.1.2:9090 192.18.1.3:9191). No port
    if swarm-s on slave host has already run
    -S PATH File that contains slave list, one host per line
    --waken CMD Command to waken up slave hosts, null if swarm-s on
    slave host has already run
    --timeout TIME Seconds to wait before request to swarm getting
    response
    --m-addr ADDR Master address which is reachable by all slave hosts
    --m-port PORT Listen port on master host to distribute task
    --s-port PORT Listen port on slave host to receive command from
    master
    --authkey KEY Auth key between master and slave hosts

    Database:
    These option can be used to access MongoDB server

    --db-addr ADDR Address of MongoDB server
    --db-port PORT Listening port of MongoDB server

    Common:
    These option can be used to customize common configuration of slave host

    --process NUM Max number of concurrent process on slave host
    --thread NUM Max number of concurrent threads on slave host
    --taskg NUM Granularity of subtasks from 1 to 3

    Domain Scan:
    Thes option can be used to customize swarm action of subdomain name scan

    --dom-compbrute Use complete brute force without dictionary on target
    --dom-dict PATH Path to dictionary used for subdomain name scan
    --dom-maxlevel NUM Max level of subdomain name to scan
    --dom-charset SET Charset used for complete brute foce
    --dom-levellen LEN Length interval of subdomain name each level
    --dom-timeout TIME Timeout option for subdomain name scan

    Directory Scan:
    These option can be used to customize swarm action of directory scan

    --dir-http-port PORT Separated by comma if you need multiple ports
    --dir-https-port PORT
    Separated by comma if you need multiple ports
    --dir-compbrute Use complete brute force without dictionary on target
    --dir-charset SET Charset used for complete brute foce
    --dir-len LEN Length interval of directory name or file name
    --dir-dict PATH Path to dictionary used for directory scan
    --dir-maxdepth NUM Max depth in directory and file scan
    --dir-timeout TIME Timeout option for directory scan
    --dir-not-exist FLAG Separated by double comma if you need multiple flags
    --dir-quick-scan Use HEAD method instead of GET in scan

    Nmap Module:
    These options can be used customize nmap action on slave hosts

    --nmap-ports PORTS Support format like '80,443,3306,1024-2048'
    --nmap-top-ports NUM Scan <number> most common ports
    --nmap-ops ... Nmap options list in nmap’s man pages, this should
    be the last in cli args

    Intruder:
    Use indicator symbol '@n@' where 'n' should be a number, like '@0@','@1@'
    etc to specify attack point in option 'int_target' and 'int_body'. Use
    'int_payload' option to specify payload used on these attack point to
    complete this attack.

    --int-target [URLS [URLS ...]]
    Use this option instead of '-t' or '-T' options to
    specify targets,separated by comma
    --int-method METHOD Http method used in this attack
    --int-headers JSON A JSON format data.(eg: {"User-
    Agent":"Mozilla/5.0","Origin":"XXX"})
    --int-cookies COOKIES
    Separated by comma. (eg: PHPSESSIONID:XX,token:XX)
    --int-body BODY HTTP or HTTPS body. You can use indicator symbol in
    this option
    --int-payload PAYLOAD
    The format should follow '@0@:PATH,@1@:NUM-
    NUM:CHARSET'
    --int-flag FLAGS Separated by double comma if you have multiple flags
    --int-timeout TIME Timeout option for intruder module

    Sitemap Crawler:
    These options can be used to customize sitemap crawler, not support js
    parse yet

    --map-seed SEED Separated by comma if you have multiple seeds
    --map-http-port PORT Separated by comma if you need multiple ports
    --map-https-port PORT
    Separated by comma if you need multiple ports
    --map-cookies COOKIES
    Separated by comma if you have multiple cookies
    --map-interval TIME Interval time between two request
    --map-timeout TIME Timeout option for sitemap crawler
    It is recommended that to use configuration file to configure swarm instead of using cli arguments if your requirement is high. The configuration files locate in /etc/swarm/.


    Cloakify - Data Exfiltration In Plain Sight; Evade DLP/MLS Devices; Social Engineering of Analysts; Evade AV Detection

    $
    0
    0
    Cloakify Toolset - Data Exfiltration In Plain Sight; Evade DLP/MLS Devices; Social Engineering of Analysts; Defeat Data Whitelisting Controls; Evade AV Detection. Text-based steganography usings lists. Convert any file type (e.g. executables, Office, Zip, images) into a list of everyday strings. Very simple tools, powerful concept, limited only by your imagination.

    Author
    Joe Gervais (TryCatchHCF)

    Why
    DLP systems, MLS devices, and SecOps analysts know what data to look for: 
    So transform that data into something they're not looking for:

    Description
    Python scripts to cloak / uncloak any file type using list-based ciphers (text-based steganography). Allows you to transfer data across a secure network’s perimeter without triggering alerts, defeating data whitelisting controls, and derailing analyst’s review via social engineering attacks against their workflows. As a bonus, cloaked files defeat signature-based malware detection tools.
    Cloakify first Base64-encodes the payload, then applies a cipher to generate a list of strings that encodes the Base64 payload. Once exfiltrated, use Decloakify with the same cipher to decode the payload.
    Not a secure encryption scheme (vulnerable to frequency analysis attacks, use 'noiseTools' scripts to add entropy). Encrypt data separately prior to processing to keep secure (if needed).
    Very small, simple, clean, portable - written in Python. Can quickly type into a target’s local shell session if needed.
    Use py2exe if Windows target lacks Python. ( http://www.py2exe.org/ )
    Prepackaged ciphers include lists of:
    • Desserts in English, Arabic, Thai, Russian, Hindi, Chinese, Persian, and Muppet (Swedish Chef)
    • IPv4 Addresses of Popular Websites
    • GeoCoords World Capitals (Lat/Lon)
    • PokemonGo Monsters
    • MD5 Password Hashes
    • Emoji
    • World Cup Teams
    • Belgian Beers
    • Ski Resorts
    • World Beaches
    • Amphibians (scientific names)
    • GeoCaching Coordinates (w/ Site Names)
    • Star Trek characters
    • evadeAV (smallest cipher space - x3 payload size - purely to evade AV detection)
    Prepackaged scripts for adding noise / entropy to your cloaked payloads:
    • prependID.py: Adds a randomized ID tag to front of each line
    • prependLatLonCoords.py: Adds randomized LatLong coordinates to front of each line
    • prependTimestamps.py: Adds timestamps (log file style) to front of each line
    See script comments for details on how to tailor the output for your own needs

    To create your own cipher
    • Generate a list of at least 66 unique words / phrases / symbols (Unicode accepted)
    • Randomize the list order
    • Remove all duplicate entries and all blank lines
    Pass the new file as the cipher argument to cloakify / decloakify

    Cloakify Example


    Decloakify Example


    Adding Entropy
    Add noise to degrade frequency analysis attacks against your cloaked payloads. Here we use the 'pokemonGo' cipher, then use the 'prependLatLonCoords.py' script to generate random geocoords in a 10x10 mile grid. (Strip noise from file before decloaking.)

    Sample Cipher Gallery




    Cartero - Social Engineering Framework

    $
    0
    0


    A robust Phishing Framework with a full featured CLI interface. The project was born out necessity through of years of engagements with tools that just didn't do the job. Even though there are many projects out there, we were not able to find a suitable solution that gave us both easy of use and customizability.

    Cartero is a modular project divided into commands that perform independent tasks (i.e. Mailer, Cloner, Listener, AdminConsole, etc...). In addition each sub-command has repeatable configuration options to configure and automate your work.
    For example, if we wanted to clone gmail.com, we simply have to perform the following commands.
    ❯❯❯ ./cartero Cloner --url https://gmail.com --path /tmp --webserver gmail_com
    ❯❯❯ ./cartero Listener --webserver /tmp/gmail_com -p 80
    Launching mongodb
    Puma starting in single mode...
    * Version 2.8.2 (ruby 2.1.1-p76), codename: Sir Edmund Percival Hillary
    * Min threads: 4, max threads: 16
    * Environment: production
    * Listening on tcp://0.0.0.0:80
    Use Ctrl-C to stop
    Once we have a site up and running we can simply use the Mailer command to send templated emails to our victims:
    ❯❯❯ ./cartero Mailer --data victims.json --server gmail_com --subject "Internal Memo" --htmlbody email_html.html --attachment payload.pdf --from "John Doe <jdoe@company.com>"
    Sending victim1@company.com
    Sending victim2@company.com
    Sending victim3@company.com

    Community
    Join our Slack Community on https://carteroslack.herokuapp.com/

    Installation

    Automated Installation
    Using brew 2.1.5 ruby as default ruby library
    ❯❯❯ curl -L https://raw.githubusercontent.com/Section9Labs/Cartero/master/data/scripts/setup.sh | bash
    Using RVM 2.1.5 ruby installation
    ❯❯❯ curl -L https://raw.githubusercontent.com/Section9Labs/Cartero/master/data/scripts/setup.sh | bash -s -- -r

    Dependencies

    Ruby
    ❯❯❯ \curl -sSL https://get.rvm.io | bash -s stable --ruby

    MongoDB
    Cartero makes use of MongoDB to store data on the Listener and Admin side of things. Because of the version of MongoMapper being used, MongoDB 3.0 is recommended/required.
    On OSX:
    ❯❯❯ brew install mongodb
    On Ubuntu / Kali / Debian
    ❯❯❯ apt-get install mongodb
    On Arch Linux
    ❯❯❯ pacman -Syu mongodb

    Framework
    ❯❯❯ git clone https://github.com/section9labs/Cartero
    ❯❯❯ cd Cartero
    ❯❯❯ gem install bundle
    ❯❯❯ bundle install
    ❯❯❯ cd bin

    Usage

    Commands
    Cartero is a very powerful easy to use CLI.
    ❯❯❯ ./cartero
    Usage: cartero [options]

    List of Commands:
    AdminConsole, AdminWeb, Mailer, Cloner, Listener, Servers, Templates

    Global options:
    --proxy [HOST:PORT] Sets TCPSocket Proxy server
    -c, --config [CONFIG_FILE] Provide a different cartero config file
    -v, --[no-]verbose Run verbosely
    -p [PORT_1,PORT_2,..,PORT_N], Global Flag fo Mailer and Webserver ports
    --ports
    -m, --mongodb [HOST:PORT] Global Flag fo Mailer and Webserver ports
    -d, --debug Sets debug flag on/off
    --editor [EDITOR] Edit Server


    Common options:
    -h, --help [COMMAND] Show this message
    --list-commands Prints list of commands for bash completion
    --version Shows cartero CLI version

    Basic Commands

    Mongo
    This is a simple Wrapper for MongoDB that allows us to start stop the database with the corresponding commands and on the correct ~/.cartero path.
    ❯❯❯ ./cartero Mongo
    Usage: Cartero Mongo [options]
    -s, --start Start MongoDB
    -k, --stop Stop MongoDB
    -r, --restart Restart MongoDB
    -b, --bind [HOST:PORT] Set MongoDB bind_ip and port

    Common options:
    -h, --help Show this message
    --list-options Show list of available options

    Cloner
    A WebSite Cloner that allows us to download and convert a website into a Cartero WebServer application. We can quickly and easily customize the website to Harvest Credentials, Server Payloads, or fully modify the site for any number of purposes.
    ❯❯❯ ./cartero Cloner
    Usage: Cartero Cloner [options]
    -U, --url [URL_PATH] Full Path of site to clone
    -W, --webserver [SERVER_NAME] Sets WebServer name to use
    -p, --path [PATH] Sets path to save webserver
    -P, --payload [PAYLOAD_PATH] Sets payload path
    --useragent [UA_STRING] Sets user agent for cloning
    --wget Use wget to clone url
    --apache Generate Apache Proxy conf

    Common options:
    -h, --help Show this message
    --list-options Show list of available options
    By default the command uses our Ruby implementation to download and convert links to render, but we also support a --wget option that will use the local wget system command.

    Listener
    The listener is responsible for running the WebServer created through Cloner or a manually created site. By default we present a very simple website if none is provided.
    ❯❯❯ ./cartero Listener
    Usage: Cartero Listener [options]
    -i, --ip [1.1.1.1] Sets IP interface, default is 0.0.0.0
    -p [PORT_1,PORT_2,..,PORT_N], Sets Email Payload Ports to scan
    --ports
    -s, --ssl Run over SSL. [this also requires --sslcert and --sslkey]
    -C, --sslcert [CERT_PATH] Sets Email Payload Ports to scan
    -K, --sslkey [KEY_PATH] Sets SSL key to use for Listener.
    -V, --views [VIEWS_FOLDER] Sets SSL Certificate to use for Listener.
    -P, --public [PUBLIC_FOLDER] Sets a Sinatra public_folder
    -W [WEBSERVER_FOLDER], Sets the sinatra full path from cloner.
    --webserver
    --payload [PAYLOAD] Sets a payload download to serve on /download
    --customapp [CUSTOM_SINATRA] Sets a custom Sinatra::Base WebApp. Important, WebApp name should be camelized of filename

    Common options:
    -h, --help Show this message
    --list-options Show list of available options
    The WebServers support ssl keys and virtual hosts across multiple IP, Hostnames, and Ports.

    Servers
    In order to send emails campaigns we need to setup email servers and this command allows Cartero to create, store and list servers. All data is stored in the ~/.cartero configuration directory.
    ./cartero Servers
    Usage: Cartero Servers [options]
    -a, --add [NAME] Add Server
    -e, --edit [NAME] Edit Server
    -d, --delete [NAME] Edit Server
    -l, --list List servers

    Configuration options:
    -T, --type [TYPE] Set the type
    -U, --url [DOMAIN] Set the Mail or WebMail url/address
    -M, --method [METHOD] Sets the WebMail Request Method to use [GET|POST]
    --api-access [API_KEY] Sets the Linkedin API Access Key
    --api-secret [API_SECRET] Sets the Linkedin API Secret Key
    --oauth-token [OAUTH_TOKEN] Sets the Linkedin OAuth Token Key
    --oauth-secret [OAUTH_SECRET]
    Sets the Linkedin OAuth Secret Key

    Common options:
    -h, --help Show this message
    --list-options Show list of available options

    Templates
    Just like Servers, email campaigns also need a pre-defined Template for sending content to the victims. This module allows the attacker to keep track, create, list, and edit templates being used in their campaign.
    Note: Setting templates here is not necessary and Mailer accepts a direct path to emails templates from the CLI.
    ❯❯❯ ./cartero Templates
    Usage: Cartero Templates [options]
    -a, --add [NAME] Add Template
    -e, --edit [NAME] Edit Template
    -d, --delete [NAME] Edit Template
    -l, --list List Templates
    -h, --help Show this message

    Mailer
    THe main command and component in the Cartero Framework -- It allows Cartero to send custom templated emails to one or more email addresses.
    Each email can be customized using the powerful erb Template engine, allowing users to create complex programmatic rules within the templates to send massive amounts of very targeted emails.
    For more information on how to build custom templates, please refer to our Examples.
    ❯❯❯ ./cartero Mailer
    Usage: Cartero Mailer [options]
    -D, --data [DATA_FILE] File containing template data sets
    -S, --server [SERVER_NAME] Sets Email server to use
    -s, --subject [EMAIL_SUBJECT] Sets Email subject
    -f, --from [EMAIL_FROM] Sets Email from
    -r, --reply-to [EMAIL_REPLY_TO] Sets Email from
    -b, --body [FILE_PATH] Sets Email Text Body
    -B, --htmlbody [FILE_PATH] Sets Email HTML Body
    -c, --charset [CHARSET] Sets Email charset
    -C [CONTENT_TYPE], Sets Email content type
    --content-type
    -a [FILE_1,FILE_2,..,FILE_N], Sets Email Attachments
    --attachment
    -p [PORT_1,PORT_2,..,PORT_N], Sets Email Payload Ports to scan
    --ports

    Common options:
    -h, --help Show this message
    --list-options Show list of available options

    WebMailer
    This command supports an alternative to SMTP / IMAP servers through send messages using known vulnerable or anonymous webmail services via web requests.
    ❯❯❯ ./cartero WebMailer
    Usage: Cartero WebMailer [options]
    -R, --raw [RAW_REQUEST_FILE] Sets WebMail Raw Request
    -S, --server [SERVER_NAME] Sets WebMail server to use
    -U, --url [URL:PORT] Sets WebMail server url to use
    -H [HEADER:VAL\nHEADER:VAL], Sets WebMail Headers to use
    --headers
    -C, --cookies [COOKIES] Sets WebMail Cookies to use
    -D, --data [DATA_FILE] File containing template data sets
    -s, --subject [EMAIL_SUBJECT] Sets Email subject
    -f, --from [EMAIL_FROM] Sets Email from
    -r, --reply-to [EMAIL_REPLY_TO] Sets Email reply-to
    -b, --body [REQUEST_FILE_PATH] Sets Email Text request query Body
    -p [PORT_1,PORT_2,..,PORT_N], Sets Email Payload Ports to scan
    --ports

    Common options:
    -h, --help Show this message
    --list-options Show list of available options
    The Command can be used in two main ways. One using a raw command such as the one we get from Intercepting traffic with a web proxy (i.e. Burp Proxy) and or using the servers command available on Cartero.

    Example of webmail server for send-mail.org
    {
    "name": "send-email",
    "type": "webmail",
    "options": {
    "url": "http://send-email.org/send",
    "method": "POST",
    "cookies": "",
    "headers": {
    "Host": "send-email.org",
    "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0",
    "Accept": "application/json, text/javascript, */*; q=0.01",
    "Accept-Language": "en-US,en;q=0.5",
    "Accept-Encoding": "gzip, deflate",
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    "X-Requested-With": "XMLHttpRequest",
    "Referer": "http://send-email.org/",
    "Content-Length": "126",
    "Connection": "keep-alive",
    "Pragma": "no-cache"
    }
    },
    "confirmation" : "Your message was sent!"
    }
    Using this pre-configured request, we can easily send message using the same datasets for Mailer and using the same type of templates. An example is available in /templates/mail/sample.web

    Sample Command:
    ❯❯❯ ./cartero WebMailer -S webmail -D ~/sample.json -b ../templates/mail/sample.web -r cartero@gmail.com

    LinkedIn
    The LinkedIn command is the first Social Network addition to the Cartero Framework. This plugin allows attackers to use the social platform to send messages and attack users all from within LinkedIn.
    ❯❯❯ ./cartero LinkedIn
    Usage: Cartero LinkedIn [options]
    -D, --data [DATA_FILE] File containing template data sets
    -S, --server [SERVER_NAME] Sets Email server to use
    -s, --subject [MESSAGE_SUBJECT] Sets LinkedIn Message subject
    -b, --body [FILE_PATH] Sets LinkedIn Message Body
    -l, --list [CONNECTIONS|GROUPS] List json of (connections or groups)
    --send [MESSAGE|GROUP_UPDATE]
    Send one or more (message/s or group/s updates)
    -o, --save [FILE_PATH] Sets LinkedIn Message Body

    Common options:
    -h, --help Show this message
    --list-options Show list of available options
    The command requires a developer API and oauth key on the attackers profile. This can be easily obtained in https://www.linkedin.com/secure/developer . and a new server template can be created with the Server command.

    IMessage
    Allows Cartero, on OS X, to send iMessages to victims addresses just like emails, but these will show up on every iDevice they have registered with apple.
    Background: After reading some news on how Chinese spammers are abusing the fact that iMessage messages will be displayed on all devices linked to the account/s, a quick command was developer to allow Cartero users to also have this feature available to the Framework.
    Important: This will only work on OSX, for now
    ❯❯❯ ./cartero IMessage
    Usage: Cartero IMessage [options]
    IMPORTANT: This command only works on OSX

    -D, --data [DATA_FILE] File containing template data sets
    -A, --attachment [ATTACHMENT] Sets iMessage file path to send
    -b, --body [BODY_FILE] Sets iMessage message
    -m, --message [MESSAGE] Sets iMessage message

    Common options:
    -h, --help Show this message
    --list-options Show list of available options
    iMessage does not allow sending a single message containing both text and attachments, but when both are provided the message will be split and sent as two individual messages.

    Sample command
    ❯❯❯ ./cartero IMessage --data /Users/cartero/Desktop/test.json -b ../templates/mail/sample.imsg -a /Users/cartero/Downloads/jon.jpg

    GoogleVoice
    If you have a GoogleVoice account and want to automatically send SMS this might be a nice way to do it. It follows the same infrastructure as all other commands.
    ❯❯❯ ./cartero GoogleVoice
    Usage: Cartero GoogleVoice [options]
    -D, --data [DATA_FILE] File containing template data sets
    -S, --server [SERVER_NAME] Sets SMS server to use
    -b, --body [FILE_PATH] Sets SMS Text Body
    -m, --message [MESSAGE] Sets SMS message
    -u, --username [USER] Sets Google Voice Username
    -p, --password [PWD] Sets Google Voice password

    Common options:
    -h, --help Show this message
    --list-options Show list of available options

    Twilio
    If you have a Twilio account and want to automatically send SMS this might yet another way to send SMS. It is worth noting this is a paid service and it requires a valid access token (sid) and secret (secret_token). For more information please refer to Twilio's website at https://www.twilio.com/sms/api
    ❯❯❯ ./cartero Twilio
    Usage: Cartero Twilio [options]
    -D, --data [DATA_FILE] File containing template data sets
    -S, --server [SERVER_NAME] Sets SMS server to use
    -f, --from [NUMBER] Sets SMS from number to use
    -b, --body [FILE_PATH] Sets SMS Text Body
    -m, --message [MESSAGE] Sets SMS message
    -u, --sid [SID] Sets Twilio Username
    -p, --token [TOKEN] Sets Twilio password
    -A, --attachment [PATH_1||PATH_2||PATH_3] Sets Twilio MMS URL image paths to send

    Common options:
    -h, --help Show this message
    --list-options Show list of available options

    AdminWeb
    The Admin Web interface is a simple Web-Application that allows the attacker to retrieve information about all Campaigns.
    ❯❯❯ ./cartero AdminConsole
    Usage: Cartero AdminConsole [options]
    -i, --ip [1.1.1.1] Sets IP interface, default is 0.0.0.0
    -p [PORT_1,PORT_2,..,PORT_N], Sets Email Payload Ports to scan
    --ports
    -s, --ssl Run over SSL. [this also requires --sslcert and --sslkey]
    -C, --sslcert [CERT_PATH] Sets Email Payload Ports to scan
    -K, --sslkey [KEY_PATH] Sets Email Payload Ports to scan

    Common options:
    -h, --help Show this message
    --list-options Show list of available options

    AdminConsole
    The Admin Console is CLI tool that allows to list information about Persons, Campaigns, Hits and Credentials gathered.
    ❯❯❯ ./cartero AdminConsole
    Usage: Cartero AdminConsole [options]
    -p, --persons [LATEST_N] Display the list of persons that responded
    -i, --hits [LATEST_N] Display the list of hits
    -c, --creds [LATEST_N] Display the list of Credentials
    -a, --all Sets Email Payload Ports to scan
    -f, --filter flag to search by parameters
    --email [EMAIL] Display the list of hits
    --campaign [CAMPAIGN] Display the list of hits
    --ip [IP_ADDRESS] Display the list of hits

    Common options:
    -h, --help Show this message
    --list-options Show list of available options

    Building Commands
    Commands have a fairly simple framework. Example Framework commands are stored in Cartero/lib/cartero/commands/*.rb and ~/.cartero/commands/*.rb .
    module Cartero
    module Commands
    class CommandName < ::Cartero::Command

    description(
    name: "Long Command Name Here",
    description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
    author: ["Author Name <noname [©] cartero.com>"],
    type:"General",
    license: "LGPL",
    references: [
    "https://section9labs.github.io/Cartero",
    "https://section9labs.github.io/Cartero"
    ]
    )

    def initialize
    super do |opts|
    #OptionsParser options available here.
    opts.on("-x", "--xoption [DATA_FILE]", String,
    "Description of command option") do |data|
    @options.xoption = data
    end
    opts.on("-y", "--yoption [DATA_FILE]", String,
    "Description of command option") do |data|
    @options.xoption = data
    end
    # help() option already provided.
    # --list-options for auto-complete automatic.
    end
    end

    def setup
    # This will be hooked and run before run().
    # It is meant as a method so the commands can run everything before that.
    end

    def run
    # Everything that will run.
    end

    def after
    # This is the place to run clean-up code.
    end
    end
    end
    end

    Mailer Templates
    Emails are simple txt files or limited HTML files, depending on the format being used. Cartero allows complex templating through the erb ruby library and a CLI interface to help build and template both formats.
    Files can be extensively customized for the campaign through erb which provides dynamic substitution and programmatic decisions at run time.
    Another important feature is the encrypted self[:payload] that should be added in each email template which allows Cartero to identify the source entity regardless of multiple forwards or clicks. This small payload is encrypted using a randomly generated key allowing attackers to keep their source data secure and away from detection.
    SAMPLE DATA FILE
    [{
    "email": "johndoe@gmail.com",
    "name": "John Doe"
    }, {
    "email": "gh@gmail.com",
    "name": "Gas Hill"
    }, {
    "email": "johndoe@hotmail.com",
    "name": "John Doe 2"
    }, {
    "email": "janedoe@hotmail.com",
    "name": "Jane Doe - Hotmail",
    "subject": "Hotmail Test 123"
    }]
    HTML SAMPLE TEMPLATE
    <html>
    <body>
    <h3> Hello Spear Phishing World <%= self[:name] %>,</h3>
    <p> This is an automated email to your email <%= self[:email] %>.<p>
    <% if self[:ports] %>
    <% self[:ports].each do |port| %>
    <img alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" src="http://localhost:<%= port %>/image?key=<%= self[:payload] %>">
    <% end %>
    <% end %>
    </body>
    </html>
    TEXT SAMPLE TEMPLATE
    Hola <%= self[:name] %>,  This email needs to be displayed as HTML.  This is an automated email to your email<%= self[:email] %>.  In addition, this email can also be displayed securely  on http://192.168.1.216:8080/click?key=<%= self[:payload] %>    cheers,    <%= self[:from_name] %>    

    Servers
    Servers can be managed using the Servers command, which provides the ability to add, edit and delete servers. Note: Servers can be manually edited in ~/.cartero/servers/*.json

    smtp
    Hola <%= self[:name] %>,
    This email needs to be displayed as HTML.
    This is an automated email to your email<%= self[:email] %>.
    In addition, this email can also be displayed securely
    on http://192.168.1.216:8080/click?key=<%= self[:payload] %>

    cheers,

    <%= self[:from_name] %>

    linkedin
    {
    "name": "gmail",
    "type": "smtp",
    "options": {
    "address": "smtp.yourserver.com",
    "port": 25,
    "user_name": "user",
    "password": "password",
    "authentication": "plain",
    "domain": "localhost.localdomain"
    }
    }

    webmail
    {
    "name": "linkedin",
    "type": "linkedin",
    "options": {
    "api_access": "api_access",
    "api_secret": "api_secret",
    "oauth_token": "oauth_token",
    "oauth_secret": "oauth_secret"
    }
    }
    .

    Viewing all 5816 articles
    Browse latest View live


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