Sponsor

Security Videos
In this video kevin talk about Mobisec and this full video is all about OWASP Mobisec. The MobiSec Live Environment Mobile Testing Framework project is a live environment for testing mobile environments, including devices, applications, and supporting infrastructure. The purpose is to provide attackers and defenders the ability to test their mobile environments to identify design weaknesses and vulnerabilities. The MobiSec Live Environment provides a single environment for testers to leverage the best of all available open source mobile testing tools, as well as the ability to install additional tools and platforms, that will aid the penetration tester through the testing process as the environment is structured and organized based on an industry­‐proven testing framework. Using a live environment provides penetration testers the ability to boot the MobiSec Live Environment on any Intel-­based system from a DVD or USB flash drive, or run the test environment within a virtual machine. https://www.owasp.org/index.php/Projects/OWASP_Mobile_Security_Project_-_MobiSec
In this video you will learn how to secure Android Application using GoatDroid Using This tool we will also look at on Memory Analysis, Intercepting Layer 7 Traffic, Reverse Engineering Android Application and SQlite Database Analysis etc .. About GoatDroid : https://www.owasp.org/index.php/OWASP_Mobile_Security_Project
In this video you will learn how to detect a Rogue DHCP Server using Wireshark server. Rogue DHCP server are becoming more common these days and DHCP Rogue is easy to create and compromise a network.
This Research covers 7 Major areas to evaluate the security of internet banking provided by banks in India 1. Access Control 2. Security of Data in Motion 3. System Design 4. Security on Hostile Platform 5. Enforcement of best practices 6. Handling Hostility or DDOS attacks 7. Security as a Responsibility
This video is all about Web Application hacking and you will learn how to upload a shell using SQL Injection.

Entries from May 1, 2013 - May 31, 2013

Tuesday
May212013

Automater updates

So as many of you have may have noticed, I have updated Automater a few times over the last couple of months to address some specific issues and add some functionality. The changelog is as follows:

Changelog:
1.2.4
[+] Modifed Robtex data pull to match sites new formatting
[+] Added Virustotal search for the hash function
1.2.3
[+] Added HTTP Proxy support. Will pull OS default proxy settings.
[+] Modified some variables for consistency 
[+] Added comments
[-] Removed JoeBox from hash search
1.2.2
[+] Fixed FortiGuard rating https://github.com/1aN0rmus/TekDefense/issues/10
[+] Display help when no arguments are given https://github.com/1aN0rmus/TekDefense/issues/8
[+] Added Hash Search functionality https://github.com/1aN0rmus/TekDefense/issues/7
[+] Sources for Hash search are VxVault, ThreatExpert, JoeSandBox, and Minotaur
1.2.1
[+] Modified regex in Robtex function to pick up "A" records that were being missed.
[+] Alienvault reputation data added by guillermogrande.  Thank you!
1.2
[+] Changed output style to @ViolentPython style
[+] Fixed IPVoid and URLVoid result for new regexes
[+] Fixed form submit for IP's and URLs that were not previously scanned

So in short, it now has proxy support, pulls data from a few new places and will now take hashes as well. Don't worry we are not done with Automater though, I have a lot more planned.

Automater was the tool I wrote to learn basic python. As this was my first python project I made a lot of rookie mistakes. The code works and does what it is supposed to do, but it is sloppy and not optimized in the least. With that in mind, I plan to work on the next mjor release which will be a complete re-write of Automater from the ground up. Doing this should hopefully give us a more stable and extensible product.

See usage, installation, and download instructions at http://www.tekdefense.com/automater/

Sunday
May192013

TekTip ep29 - Collect and track hashes with hashMonitor

In this episode of TekTip we take a look at a new tool I created called hashMonitor. hashMonitor will monitor specific twitter and web resources for database dumps that include MD5, SHA1, or SHA256 hashes. Once found, hashMonitor will store the hashes in a local database which can then be used for cracking purposes.

To learn more about the tool usage and installation go to http://www.tekdefense.com/hashmonitor/

ProTip: hashMonitor + cronjob = Profit!  *Set to run every 30 minutes or so*

Tuesday
May072013

Honeywords like method for detecting site cloning and phishing

After reading various articles today on honeywords, I thought this would be the perfect time to talk about a technique that I came up with last year that is very similar in nature. Honeywords is the act of seeding your user databases with false usernames and/or passwords, and then monitoring for any activity involving those accounts. If activity is seen on those accounts, it can be assumed that there has been some sort of compromise as these accounts would not have been used otherwise.

The Problem:

Similar methods can be used to detect another common attack that plagues the industry, phishing and site cloning. As I displayed in TekTip episode 7, using tools like the Social Engineering Toolkit (SET) one can easily clone a site for use of delivering exploits, or credential harvesting. The basic idea behind tools like this is they clone the site of the attackers choosing, inject some code to enable exploit deliver or credential harvesting, then the attacker waits for shells or credentials to roll in.

In organizations I have worked with, we would see attacks like this used. One particular scenario we often saw was attackers would clone the webmail site for the organization (http://webmail.example.com). The clone would look like an exact copy of the actual webmail site. The attacker would sometimes register a domain name that looked very similar to the actual domain name such as:

- webmail.examp1e.com

- webmail.example.com.co.uk

Once cloned the attacker using a list of email targets probably gained with The Harvester or Recon-ng would send out an email to as many users as possible. The email would look something like this:

Hello example.com webmail user,

Example.com has recently undergone security updates. Please login and reset your password at the following link: http://webmail.examp1e.com.

Thank you,

Example.com Security Team

As you can probably imagine, many users would click on this link and would be brought to what seemed to be the webmail system they were familiar with. Once the user attempted to login, the cloned site would send the username and password to the attacker. The attacker now with credentials could login to that email account and collect intelligence, get more email addresses, and various other items of malicious intent.

This happened several times in many organizations I have worked with. The solution I came up with for this scenario was a very simple one much like honeywords is.

The solution:

To combat this problem, we had to understand what did we have control over in this scenario. Could we detect someone cloning the site? Could we detect collection of email addresses? Could we detect someone registering domain names similar to the organizations? The answer to most of these questions was, not with any regularity. For instance we could detect site cloning if they used a specific useragent each time (python-urllib2). We could also look for similar domains being registerd with tools like URLcrazy. These were not very reliable solutions though. What we settled on is this:

Step one: Inject a tracking code on the website you want to protect. This tracking code can be anything as long as it is unique and discrete. You would not want to call it "Hacker Tracker UNIQUE CODE" as that may give away what you are doing to attackers. Instead go with something like "Analytics cookie: abcdefgh12345678"

Step two: Write a signature for your IDS to alert on that cookie if it is seen from an internal user going to an external address. The logic here is you would expect to see this unique code from external users going to the webmail server in your DMZ, and you may also expect to see this traffic from internal users attempting to use webmail in your DMZ, but you should NEVER see this tracking code in any traffic from your internal network to an external address. If that is seen you can assume someone has cloned your site and has tricked a user to going to it somehow. Your signature may look something like this:

alert $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg: "Cloned site detected"; content: "abcdefgh12345678")

*This is a very simple example used for readability, you will want your signature to be as specific as possible here.

Step three: Monitor for activity. If detected, using a protected method investigate the site to determine if it is a credential harvester or if it is delivering exploits. If it is a credential harvester give it some fake credentials and then monitor your webmail system to see who attempts to login with the fake account.

Limitations:

This approach will not work in every situation. Some of the obvious limitations with a technique like this is:

- You will only detect this if internal users attempt to go to the cloned site. If they were to go to the cloned site from a network you do not monitor, you would not be able to detect.

- Attackers could attempt to detect these tracking codes and delete them.

- If attackers manually clone the site instead, they may not take the tracking code.

Improvements:

Like any solution, this could be done better depending on the resources available

- If you have an endpoint Intrusion Prevention System (HIPS) the signature could be implemented there as well. This would help detect attacks if the victim is not on the organizations network.

- A more contreversial method I considered was instead of using a tracking code, include a small javascript link in the webmail site that would collect some client side information on the users. I figured I could do something similiar to the way Google Analytics works. Using this type of technique I might be able to get better attribution on the attacker while also detecting who went to the cloned site regardless of what network they were on. I ultimatley decided against this idea as there were too many privacy and legal items to consider.

Conclusion:

Too often I think security professionals rely on techniques and tools that are given to us. In my opinion there is not enough creativity being applied to security problems. I hope techniques like this will help security teams realize that if they try to understand the problem, they may be able to come up with creative solutions that don't require purchasing a new product.