Archive for the ‘Penetration Testing’ Category

CVE-2013-6117 – Tool (Multithreaded and Extremely Fast)

July 23, 2018 Leave a comment

I wrote a simple script in Go to test if the target Dahua DVR device is vulnerable to authentication bypass flaw (CVE-2013-6117).

Dahua DVRs listen on TCP port 37777 by default.

If it is vulnerable, it will dump the credentials along with the dynamic dns name (DynDNS).

Some system administrators might use the same password for other systems. Therefore, a penetration tester might be able to use the credentials obtained from the DVR to gain further access into the network by accessing other systems or applications.

As the script is written in Go, it makes the tool extremely fast.

For more information regarding this vulnerability, you might want to check out

Screen Shot 2018-07-24 at 2.06.12 AM.png
The script can be downloaded from



Using IPv6 to Bypass Security (tool)

June 22, 2018 Leave a comment

John Anderson from Trustwave wrote an interesting post on Trustwave SpiderLabs blog (link at end of this post).

In the article, an attacker was able to use IPv6 to bypass security protections that was in place for iPv4 but not IPv6.

The number of open ports on the IPv6 and IPv4 addresses on the same host are different.

Below is a walkthrough of how to perform the technique.

1) Sends an ICMP echo request (ping6 ff02::1%eth0) to the broadcast address (ff02::1) , all IPv6 hosts in the local network will reply
2) Sends an ARP requests to all IPv4 hosts in the local network
3) Performs a port scan of all IPv4 and IPv6 hosts that are alive in the local network
4) Match the IPv6 address to the IPv4 address based on the MAC address information.
5) Checks to see if the scan against the IPv6 address on the host returns more open ports that the IPv4 address on the same host and outputs the difference in ports (if any)

I wrote a simple script to make the testing for this easier by automating these steps so that we can focus on more important testing.

Below is a screenshot of how the tool looks like when it runs.

In the screenshot below (in the last few lines), TCP ports 22, 111 and 8080 were accessible on the IPv6 interface of the host ( | fe80::250:56ff:fe97:7a3b) but not on the IPv4 interface.

The next step would be to fingerprint the services running on the IPv6 interface, test for default or weak accounts (SSH), look for vulnerabilities and so on. You might just get lucky.

You can find the tool in the below Github link


Below are some useful articles that are related—threats/weaponizing-ipv6-to-bypass-ipv4-security-/a/d-id/1331993

Jumping from Corporate to Compromising Semi-Isolated Network

September 21, 2017 1 comment

Finding and attacking hosts in Semi-Isolated networks
The new script ‘hopandhack‘ can be used by attackers to automatically find and hunt down hosts that are not directly accessible from the attacker’s machine.  In some organizations, IT administrators have to use something called a ‘jump box’ or VPN to access the secure data centre or PCI network where sensitive data are stored .

The ‘hopandhack’ script automates the process of finding hosts with the necessary routes to these secure network and compromises them.  The functionality of hopandhack will be incorporated into Portia in the next week or so.

hopandhack script can be found at under the filename ‘’.

Basic Workflow of how the attack works.

Below is a video demo as presented at Rootcon (2017).  In the video, the attacker is able to access one host (host A) but not the other host (host B) thats in the secure network.

Host A has an active route to host B.  In order to compromise host B, the attacker has to setup a relay from host A to host B and then use this relay to dump credentials/hashes from host B.

More functionalities will be added in future.

The tool is currently available as a standalone tool and its functionalities will be ported over to Portia in the following week.

The slides from Rootcon 2017 is available at

metasploitHelper and nmap2nessus released at Blackhat Asia Arsenal 2015

March 30, 2015 Leave a comment

@mgianarakis and me (@keith55) presented two new tools (metasploitHelper and nmap2nessus) at Blackhat Asia Arsenal in Singapore on 26th and 27th of March, 2015.

The tools were developed to help guys like us during vulnerability assessments and penetration tests.

Blog posts about the tools will be coming soon. Meanwhile, the information on the Github pages should be sufficient to get you started.
The tools are open source.  Feel free to contribute to the projects. Thank you



Pentesting Firebird Databases

January 9, 2015 Leave a comment

There seems to be limited information on pentesting Firebird databases on the Internet.
Firebird database server listens on TCP port 3050.

One good resource I found is

It seems like most people do not change the default SYSDBA credentials for their Firebird database. Below are the default credentials. 
Password: masterkey

I have encountered before that the access card database system was using Firebird database for its backend.
This python script requires pyfirebirdsql library from

Firebird requires you to supply the database name on the server you are trying to.
One way to get around it is to check for active connections on the Firebird database server.

What this tools does is to
1. Connect to the Firebird database server using the default credentials
2. List the connected databases
3. Dump the records from the Firebird database server

You can also use the -wordlist argument to supply it a wordlist of database names so that it can attempt to brute-force. That is useful if there aren’t any active connections (or databases not mounted) on the Firebird database that you are trying to access.

Below is a screenshot of the tool in action.

The common-tables.txt file from sqlmap is useful if you need a wordlist.

The tool can be downloaded from the below Github repo.

Test AS/400 for default credentials

December 7, 2014 Leave a comment

I wrote a simple script to test default credentials in AS/400. I made use of the library and sample code from  It currently only works with IBM AS/400 telnet servers for now.

You can pull the code from
You will have to supply the ip and port of the AS400 server in the command line

Help screen for AS/400 tool

Below is a screenshot of the tool in action.

Test AS/400 Default Credentials

Corelabs Impacket Scripts (Modded)

September 9, 2014 Leave a comment

I made some changes to script due to some anonyances I encountered during peneration tests.

The use case scenario for these modded scripts is that if the password contains special characters like @ or : and you can’t use it with the default scripts (maybe its just me who can’t figure out how to know how to use them :P)

These 3 scripts ( are the common tools that you can use if you want to get the remote host to execute a meterpreter exe file generated via Veil-Evasion.

Using the modded scripts, you can get a list of hosts to run a single command (eg ipconfig) using one line of command.

The source code for the modded scriptscan be found here

Special thanks for Corelabs for making these scripts. Impacket scripts can be found here

Screenshot of

Examples of how you can use the modded
python -d testdomain -u user -p pass -ip -command ipconfig
python -d testdomain -u user -p pass -ip -f ips.txt -command ipconfig


Screenshot of

Examples of how you can use the modded
python -d testdomain -u user -p pass -ip
python -d testdomain -u user -p pass -f ips.txt


Screenshot of
Examples of how you can use the modded
python -d testdomain -u user -p pass -ip -command ipconfig
python -d testdomain -u user -p pass -f ips.txt -command ipconfig