Tuesday, January 15, 2013

How to hack a targeted website

Hello ALLL.
Since lot of you are new to this section i'm gonna show you how to hack your targeted website.
This is not easy to do but i will try to explain as much as i can.

Things we will need:

1) Target website
2) PHP shell (I use WSO)
3) Symlink script (I will provide that at the end)
4) MySQL manager

Chapter I


Now, when you checked your site and it has no vulnerable points you are pretty much screwed, right?

There is one thing left.
We can hack into the same website on the same server (I know that this sounds wierd to you but you will see why in a minute)

So we have our target website URL and now we must find out the IP.
We go to the Start -> CMD and type:

Code:
Code: (Select All)
ping www.target.com



[Image: regionxw.png]
Image has been scaled down 10% (907x378). Click this bar to view original image (1002x417). Click image to open in new window.
[Image: regionsh.png]


Spoiler (Click to View)


Now when we have our servers IP it's time to find vulnerable websites.

Go to http://bing.com and enter:

Code:
Code: (Select All)
IP:IPyougotbypingingthesite ".php?*="


Image has been scaled down 7% (907x399). Click this bar to view original image (965x424). Click image to open in new window.
[Image: regionhe.png]


Now let's search for an website vulnerable to SQLi. (It can be any site, any vulnerability)

After few minutes i have found my vulnerable website.
I have admin info and i shelled it.



So i'm in my shell now and it's time to access our target site.
Chapter II


First thing you need to find is a full path of your website.
It is usually like:

Code:
Code: (Select All)
/home/username/public_html/



Now go to your shell and execute this command:

Code:
Code: (Select All)
cat /etc/passwd


Image has been scaled down 12% (907x306). Click this bar to view original image (1023x345). Click image to open in new window.
[Image: regioni.png]

[Image: regionkn.png]

Now copy all text you got and paste it into your notepad.
That file contains all users that use that server so your target will be there.

My target has "cube" in it's URL so i will search for "cube" in the notepad.
You got the point, right?

[Image: regiongd.png]

Now i know my targets full path:

Code:
Code: (Select All)
/home/softcube/public_html/


Chapter III


When you have full path it should be easy from now.
My website is Joomla and i know where is the file that contains MySQL connection info.

Code:
Code: (Select All)
/home/softcube/public_html/configuration.php



Just browse around your site and you will figure out what software it runs.
For wordpress is

Code:
Code: (Select All)
/home/softcube/public_html/wp-config.php



So upload our symlink file and mysql editor file.
Open symlink file and enter your websites path and file you want to view.
In my case it's:

Code:
Code: (Select All)
/home/softcube/public_html/configuration.php



[Image: regioncn.png]
[Image: regiontf.png]

Now click on the "symlink" and now we have our targets mysql info.
Image has been scaled down 13% (907x304). Click this bar to view original image (1033x346). Click image to open in new window.
[Image: mozillafirefoxr.png]


Copy all that in a Notepad++ 
(It's better because you can easily find password and username)
Find username and password and open mysql.php file.
Enter the credentials and now we can edit the database.

[Image: regionvw.png]
Image has been scaled down 7% (907x195). Click this bar to view original image (972x208). Click image to open in new window.
[Image: regionpw.png]

[Image: regionfv.png]

Now click "Tables" and find admin table.
It can be users, staff and replace admin hash. 
(Remember to note down original hash so that way your hack stays undetected if you want access)

[Image: regionsc.png]

Now, i've changed the hash and logged into the Joomla panel.
Image has been scaled down 9% (907x387). Click this bar to view original image (989x421). Click image to open in new window.
[Image: wholescreenh.png]


And now i just have to shell it.

That's all for now.
I know i did bad on explanation but if you want you can PM me or post here and i will awswer all of your questions. Wink

1) Symlink script -> http://pastebin.com/yYJ4Urhr
2) MySQL script -> http://pastebin.com/wBg5qeMX
3) WSO shell -> http://pastebin.com/M8b2t3BD (Change the hash! Default password is 123)
surce :HF

0 Comments:

Post a Comment