Showing posts with label Hacking. Show all posts
Showing posts with label Hacking. Show all posts

Wednesday, 8 May 2013

How to Change anyones Password using CSRF Vulnerability

---------------------------------------------------
CSRF Vulnerability Exploitation
(Cross Site Request Forgery)
---------------------------------------------------

Hello, After a long time it's my Second Post on CSRF Vulnerability Exploitation, CSRF is one of mine favorite website Vulnerability and comes into OWASP Top 10 Vulnerabilities List. And today, I thought to share this skill and knowledge with you all readers.

------------------------------------------------------------------------------------------------------------------------
# What is CSRF (Cross Site Request Forgery) {XSRF} ?
------------------------------------------------------------------------------------------------------------------------
                               CSRF is also called XSRF and full form is Cross Site Request Forgery - is a type of Web Vulnerability and flaw in Web pages mostly in Login pages, Password Changing Box and Input Box of web pages, that allows an attacker to force browser's to send HTTP Request to Server and Perform many types of Web attacks. Mostly CSRF is used in Sending and Tranfering Money and Funds from one Account to another Bank account without any knowledge to Victim and Second is CSRF is widely used in Password Changing method without any knowledge to victim so an attacker can easily gain access to any normal users Account. For example : Suppose an attacker discover CSRF Vulnerability in Facebook Password Changing box, then that attacker can change any normal users Password, and even Admin can get hack and this leads to Website Defacement. CSRF is very dangerous attack in Web Hacking methods. CSRF discovered in 2000 in many login pages and Passwords Input box of Social Websites, that allows an attacker to Hack and Hijack Accounts of Bank users and also send funds from one account to another account, This is called CSRF
------------------------------------------------------------------------------------------------------------------------
# What can an attacker do with CSRF Vulnerability ? 
------------------------------------------------------------------------------------------------------------------------
  • Change any users : username, ID, Password, E-mail
  • Hack Website Admin Account
  • Completely Deface website
  • Tranfer Money and Funds to any account
  • Credit Card Frauding and Stealing
  • Can Also create more vulnerabilities like :-
            1. SQL Injection
            2. XSS (Cross Site Scripting)
            3. Buffer Overflow
            5. Brute Force Attack
------------------------------------------------------------------------------------------------------------------------
# How to Exploit CSRF Vulnerability ?
------------------------------------------------------------------------------------------------------------------------
                        So, here is your main question ? well now I'll teach you how can you Explode CSRF Vulnerability, Simply I m using DVWA Pen-testing Lab to show you CSRF tutorial, Note: If you also want to learn this Attack then you'll need CSRF Vulnerable website or DVWA Penetration Testing Lab in your System. So you can learn this attack without doing any Crime. Simply here, I won't show you how to transfer funds from bank to another bank a/c, I'll show you how an attacker can change password and Hack website.  And here we go... :D
------------------------------------------------------------------------------------------------------------------------
# Requirements :
------------------------------------------------------------------------------------------------------------------------
# Steps to Exploit CSRF Vulnerability

                                       Suppose I found a Vulnerability in a website that can change Password of any user just on one click that's we call CSRF attack, here we'll do same and hack website admin password or any users password to learn CSRF Attack.

2. Start your XAMPP Server and Pen-test lab.

Click on Image to ENLARGE it.
3. Well, after all choose CSRF Column and Get Started.
4. There, you'll see it give us an option to Change Password.
5. First of all, Suppose you're an attacker and you want to Change the Admin password of DVWA Website, without any knowledge to Admin. How will you do ? ..!Yes we'll  use CSRF attack here, Okay.! then start your both browser's Chrome as Victim and Mozilla Firefox as an attacker. Start DVWA in Chrome and login as Admin with the username = Admin and Password = password. and in Firefox login as a normal user like :- Username: gordonb & Password: abc123.
------------------------------------------------------------------------------------------------------------------------
Make Sure you did all above Process and Method Correctly

6. So, now you're an attacker and you're also the Victim. & always remember to put Security Level at = "LOW" in this Tutorial
7. Small test before attacking to Victim. Select CSRF Column in DVWA Page (Use Chrome here) & change password from abc123 to 123456.


Click on Image to Enlarge it
8. Click on Change Password, & Just Look at URL (Link)


Click on Image to Enlarge it
9. Now, Just Observe the URL.


Click on Image to Enlarge it

10. So, This is called CSRF Vulnerability. You know a what an attacker can force victim's browser to send request to HTTP Server and Change anyone's password. Now I'll show you how an attacker Exploit CSRF Vulnerability and Change Password
11. Okay, let's start our attack - Open chrome start DVWA login as Victim with the username: Admin & Password: password. Also Start Firefox as an attacker with username: gordonb & Password: abc123. 
12. Take Firefox, Gordon as an attacker and the victim is Chrome user Admin, the task is to hack and Change Admin password using CSRF Exploitation Code.
13. Simply, we've to force victim's browser to send request to Server through HTTP of Changing password, we'll do it using HTML and Javascript.
14. Now, an attacker will create a HTML scripted page and host it on any free hosting server like 00webhost.com. here we're penetesting so we'll use our own XAMPP Server to host our own files. 
15. Start notepad, Copy below Script & save it on this location C:\xampp\htdocs as Attack.html.
------------------------------------------------------------------------------------------------------------------------
<html>
<body onload=�document.frames[0].submit()�>
<form action=�http://127.0.0.1/dvwa/vulnerabilities/csrf/?password_new=654321&password_conf=654321&Change=Change#� method=�POST�>
<input name=�field1� value=�foo�>
<input name=�field2� value=�bar�>
</form>
</body>
</html>
------------------------------------------------------------------------------------------------------------------------


16. After saving it, now come into Chrome browser as Victim, login as admin,  and Suppose a Firefox attacker sends you mail with the link of Attack.html that is crafted into a Text file and Suppose the victim or admin Click on it. Then Victim will be redirected to the link http://127.0.0.1/dvwa/vulnerabilities/csrf/?password_new=654321&password_conf=654321&Change=Change# That means now the password of the admin is changed to 654321, so this is called CSRF Vulnerability Exploitation.
17. Let's do test on yourself, Just Copy this "http://127.0.0.1/Attack.html" link in your Chrome browser but remember you must be login in DVWA as Admin with the Security Level = "LOW".
18. That Attack.html file will change admin's password and an attacker can easily get access to admin a/c and deface website Completely. When your victim will visit and just click on your link of attack.html file he will redirected to this page :-

19. And you're done :D......! Now admin password is changed with your password 654321. That's it this is called CSRF. 
20. CSRF is really very dangerous attack in Web Application Vulnerabilities Exploitation. what if an attacker discover same vulnerability in Facebook ? then an attacker easily change any user Password without any knowledge to Victim. Below, I give away some special hacking methods of CSRF and Advanced CSRF Vulnerability Exploitation Method PDF E-books to learn CSRF Completely.
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------

This is How CSRF Attack Works :)



Share it and Feel free to Comment :]
------------------------------------------------------------------------------------------------------------------------
Note : This is for Educational Purpose only, I'll be not responsible for any type of Miss-use of above method, Do and learn at your own Risk.
------------------------------------------------------------------------------------------------------------------------

Friday, 3 May 2013

DNS Poisoning attack & Hijacking Systems Tutorial


                                                       
                                    This days we're doing lots of research on DNS Poisoning attack and system Hijacking, DNS Poisoning attack is one of the mine favorite attacks in networking Hacking and Systems Hijacking. DNS Poisoning is really very dangerous attack. Suppose an attacker create a DNS Changer Malware and send it to any server or Computer, then he can do anything on Victim's System.  Well, today I'll teach you deeply about DNS Poisoning, What can you do with it ?, How to do ? , How to prevent it ?, etc. I'm sure you gonna like it and Enjoy.

----------------------------------------------------------
# What is DNS Poisoning ?
----------------------------------------------------------
                               DNS (Domain name service or system) is also called Cache Poisoning in Domain Name and Corrupt the Internet Server or Provider. Basically an attacker will Inject any other IP address of website in DNS and Replace it with different IP and Web Server Domain name, so simply the domain and IP will create a loop holes and redirect user to the IP address with the Domain name.

# An Attacker can do following attacks using DNS Poisoning.
  • System and Server Hijack
  • Phishing 
  • Force downloading
  • Complete Change Webpage and URL
  • URL Poisoning
  • Spreading botnets and malwares etc.
  • Deface website
------------------------------------------------------------------
# DNS Poisoning Tutorial
------------------------------------------------------------------
                  Okay, I know some peoples won't understand any computer tricks or hacking techniques until they do manually and learn it, coz above theory is just explanation of DNS Poisoning attack, and now in below's paragraph I'll teach how DNS Poisoning attack works and how can an attacker hijack sessions and Perform different types of Attacks in Systems.


Note : This is for Educational Purpose only.

All-right, So here I'll show you tutorial on Windows OS. How can an attacker Poison your System and perform many types of Hacking. Listen, I'll teach you this attack on your system so you can understand, I won't give you DNS Changer malware it's very risky to give away DNS Changer malware. So if you want to learn this attack you've to make your own System as Target. First of all, I'll teach this attack to Windows users to understand and be definite to perform this attack.
----------------------------------------------------------------------
1. DNS Poisoning -  Windows OS
----------------------------------------------------------------------
                             It's very easy to DNS Poison windows user but it's really very hard to perform same thing without DNS Changer malware, Okay let's start but before starting we will learn little bit about "Hosts" file.

# Hosts File : The Hosts file is the computer file used in an Operating system to map hostnames to IP addresses and to locate IP to Web server Domain Name. Whenever any users type www.google.com in address bar and hit Enter then the foremast duty of browser is to scan hosts file and then only it proceeds. Hosts file really very useful file for OS.

Check out below's example of how web browsers work and Proceed with reading article and you'll notice that DNS has a main role in Networking


So, I hope by looking at above picture you can understand how web browsers works, I've one request to look once again on Step 3 and 5 ... Got it ?? well lemme explain in step 3 the browser was searching for Google.com and in Step 5 it is searching for domain name IP. : What if an attacker changes Domain name IP with different IP of any other bogus website then browser will confuse and redirect any normal user to Different website with different Domain name, that's what we call DNS Poisoning attack.

Okay, let's do it manually on your own system :
------------------------------------------------------------------------------------------------------------------------
Note : This tutorial is performed manually, and if you want to poison your victim's DNS then you'll need DNS Changing malware that I can't give away link, if you want then comment your E-mail in comment Box and I'll send you. (It's very risky we've to keep records)
------------------------------------------------------------------------------------------------------------------------

# Manually DNS Poisoning tutorial
  • All-right you might know that, we've to modify hosts file to Poison victim's computer DNS.
  • Click on Start Button , type "Notepad" right click on it and "Run as administrator"
  • A Blank Notepad program pop-ups, Now click on "File" > "Open" and Locate to hosts file > C:\Windows\System32\drivers\etc Click on "All files" and you'll see 4 files in that folder.
  • Now, Choose "hosts" file and open it.
  • After all we have to modify this file. Go to bottom of the page and Hit enter to get new Line.
Now, How to Modify Hosts file, Just add two lines at the end like this :- 


After writing that two lines Save it.
So, Now let's understand meaning of that two lines : 
------------------------------------------------------------------------------------------------------------------------
31.12.80.1 is the IP of facebook with the domain name of Google.com. Just try to understand the statement meaning. 
Here, we entered the IP of Website for Eg. 31.12.80.1 of facebook and we wrote domain as Google.com, Now....! whenever you'll search for google.com in your browser it will redirect you to IP of Facebook that means if any normal user will search for google.com he'll directly redirect to facebook.com without any knowledge. You can also change the IP and Domain, Suppose if you want to Poison your victims Computer DNS that redirects him from yahoo.com to any bogus website or Phishing website, then Ping yahoo.com get it's IP and Write it in Hosts file and replace domain name with your own Phishing page. If you want to know more about Phishing through DNS Poisoning then you might like my previous post on "Hacking Facebook using DNS Poisoning".
------------------------------------------------------------------------------------------------------------------------

Share it and Feel free to Comment :)


Wednesday, 24 April 2013

Hack Facebook account using DNS Poisoning + Desktop Phishing


                                                 Facebook, the Most Popular Social Networking website, There are Billions of users on Facebook. & daily more then 7000+ accounts get hacked. So here is our best Post on Hacking Facebook using DNS Poisoning + Desktop Phishing. 


# About this Trick DNS Poisoning + Desktop Phishing.
                                                        This trick is much useful and widely used trick in this trick if you're using Wifi, or Joint LAN Connections in many computers then this tricks work very well, Like Cyber Cafe uses WIFI or Joint LAN Connections, you can also use this trick at your Home to hack your Friends Account, he won't realize also that his Account is been hacked coz, URL is same as Facebook.com and he won't realize when he got phished. We will do DNS Poisoning to Change the Local Host into Facebook URL so there will be no Chances of Getting Caught.  Just try this Trick once :)

# Requirements :-

1#  Install XAMPP Server and Start :-
  • Click here to Download
  • After Downloading it Install it and Click on Start Menu Search for XAMPP Control Panel and Start it.
  • And Start Apache and Mysql Services

2# Setup Phishing Files :-
  • Click here to Download Phishing Files
  • This time Phishing files is Password Protected, Extract Phishing files on Desktop. Password is "w0rm7"
  • Go to C:\xampp\htdocs and Delete all files and Now Copy all files you have downloaded. (Do not Copy ZIP FILES Extract all files & Paste it into C:\xampp\htdocs)
  • That's it, Done.
3# DNS Poisoning :-
  • This is the Most Important Part of this Trick, DNS Poisoning will change Phishing URL into Original URL
  • we need to Modify Hosts File, Just Click on Start Menu.
  • Type Notepad and Right Click on it and Click on Run as Administrator.
  • Click on File tab, now click on Open and Go to C:\Windows\System32\drivers\etc, and Open Hosts file.
  • And it will open Hosts file, Just add this two lines at bottom. 
    127.0.0.1            www.facebook.com
    127.0.0.1            facebook.com
  • And Save it.
  • Done, Now whenever you're victim will open www.facebook.com he will be redirected to your IP 127.0.0.1 which has facebook Phishing Pages. So your victim's won't realize that his ID is been Phished.
4# Testing this trick :-
  • Now it's time to test this trick on yourself, Just restart your all browser and type www.facebook.com in your Browser and Hit Enter.
  • No you'll see 4 options Just click on "login.html" and you'll be redirected to your Phishing Page. 
Click on Image to Enlage it
  • Now Just use some fake Login details to Test it.
  • Now go into C:\xampp\htdocs\log.txt  Open it and you'll see clear usernames and Password.
  • And you're done, Well this trick is called Desktop Phishing and DNS Poisoning attack. This is most widely used trick in Home and Cyber Cafe to Steal FB credentials Details.
  • After all restore that hosts file.
Note :- This is for Educational Purpose Only

Share it and Feel free to Commend :]


Monday, 22 April 2013

How to Search XSS Vulnerability and Exploitation ~ Pack 2


                                                              This days hacking is going very much popular and many young Geeks and Computer lover joining Hacking Groups and IT Security Department, well here today we gonna learn about XSS Vulnerability & Exploitation , how to find XSS Vulnerable website and Exploit it trough various types of XSS attacks.




# How to search for XSS Vulnerable website ?
Basically Hackers and Security Researchers uses Google, Yahoo and Bing Search Engine to search Vulnerable websites., well CLICK HERE to download XSS Dorks.
This Post is the Best post of Hack w0rm with Complete XSS Video Tutorials Complete Guide to Vulnerability Assessement and Exploitation, 
I hope you all will Like it :)



Steps :-
(Click on Image to Enlarge it)
  • Well, this time we have created Complete XSS Vulnerability Exploitation in Video, so it is recommended you to watch it.
  • It is recommended you to Watch Video on you tube in full Screen to see clear text and better Understandable.

1# Watch Out First Video of Basic XSS Vulnerability and   
       Exploitation :- Part 1


2# Advanced XSS Vulnerability and Exploitation tutorial :- Part 2





Click here to Watch it on You-tube


Feel Free to Comment and Share it :]

 

Wednesday, 17 April 2013

Our First Online Penetration Testing Lab and Hacking Challenges


Finally we released our Online Pentesting lab and Hacking Challenges to 
teach advanced Hacking and to spread hacking and IT Education all over world. We saw that peoples were liking and Enjoying Offline pentesting lab tutorials in their own system, but some are not able to create and practice it then finally we thought to create Online Penetration testing lab with Hacking Challenges. we named it : P-w0rm


About P-w0rm :
                               
                                 P-w0rm, is Online Penetration testing lab Powered by OWASP and brought to you by Hack w0rm, Well.. ! we created this online pentesting lab to challenge all hackers, learner and pentesters to see their skills and practice hacking against Web Applications and Vulnerability assessment.  In P-w0rm you have to Solve 10 Hacking challenges and complete hack the system, this will tune-up your hacking skills. 

10 Hacking Challenges

These are the Challenges you have to complete :

  • XSS (Stored)
  • XSS (Reflected)
  • SQL Injection
  • Weak Password attack
  • Brute force attack
  • Guessing attack 
  • SET Attacks
  • Shell Upload Vulnerability Exploitation
  • HTML Injection
  • Pentesting with Vulnerabilities
                                                                           
    Click on Image to Enlarge it


Rules and Regulation :
  • Do not miss-use Pentest lab, nor OWASP can take action
  • Your Every steps and action will be recorded by OWASP.
  • After getting solution of Challenges do not Expose it, Just be Silent
    (The Quiter you become the more you able to hear)
  • You can't hack Complete Pen-test lab, you just have to complete all challenges.
  • Do not try to DDOS or any attack on Pen-test lab, it is fully protected by OWASP Security Experts
  • Result must be submitted to admin, author or directly OWASP.


 Or Create Pen-test lab into your Computer :]
You can also create this Pentest Lab into your Computer using XAMPP Server read my previous post = Creating Penetration lab. start Xampp control panel in your computer and start MYSQL and APACHE Server, and Just download hackademic challenges files  extract it.. copy complete folder to C:/xampp/htdocs and open your browser and type 127.0.0.1 hit Enter and Enjoy :]


Click on Image to Enlarge it 


Result Submission must be Done here :- 
Admin        viv_7@ymail.com
FB :            www.facebook.com/vivdhacker
OWASP :   www.owasp.org



Share it, Feel free to comment and ask question :]

Wednesday, 10 April 2013

Cross Site Scripting Exploitation tutorial (XSS) ~ Pack 1


                                            After writing post on website hacking tutorials such as Hacking Website Database, SQL Injection and CSRF, many readers requested us to Post tutorials on XSS. So here we will Post all types of XSS tutorials but in 3 Pack, I mean Pack 1= Beginner and Basic XSS, Pack 2= Medium Level and Pack 3= Advanced XSS attack. So let's start with Pack 1

Note :- XSS Pack-1 Contain Introduction, Explanation, and one Basic XSS Hacking tutorial.


? What is XSS ?

                              Cross site Scripting is also Called XSS, is one of the Common Vulnerability and Flaw in web applications which allows an attacker to run their own Script (Code) like
HTML, Javascript on webpage and an attacker insert their own Script on webpage's and when any normal user visit it, then the crafted link by attacker start working and an attacker can do following attacks through XSS :-

? Stealing the Identity and Confidential Data(credit card details).
? Bypassing restriction in websites.
? Session Hijacking(Stealing session)
? Phishing attacks
? Malware Attack
? Website Defacement
? Denial of Service attacks(Dos)

XSS allows an attacker to run their own script on any webpages, which is viewed by other normal users, Basically XSS flaw founds in many websites. Read Below example to understand how XSS Works and how an attacker can use XSS Vulnerability.

Example 1 :-




? Types of XSS ?


  • Persistent (Stored)
  • Non-Persistent (Reflected)
  • DOM Based XSS

# Persistent (Stored)

Persistent is also called Stored XSS Flaw. In Persistent Vulnerability
whatever an attacker insert malicious script it stored into Database and then it will run permanently on webpage. As you must read above (Example 1) -- that is Persistent XSS.

# Non-Persistent (Reflected)

Non-Persistent is also Called Reflected XSS flaw in web application, is 
is the most common XSS vulnerability found in many websites. In Non-Persistent attack an attacker inject code and it sends to a server via HTTP request, The server embedd the input with the html file and return the file(HTTP Response) to browser.  When the browser executes the HTML file, it also execute the embedded script.  This kind of XSS vulnerability frequently occur in search fields. Non-Persistent executed through Javascript Injection Code and it's not stored in Database it will just send Injection code via HTTP to server and server reflect with the same Script to user and when an attacker send it to any normal users he will see something different Javascript embed into websites and an attackers use that Vulnerability to Phishing, Cookie Logging, Session hijacking etc.

# DOM Based XSS

DOM Based XSS is third Party and Advanced XSS attacks that, I'll Explain in Pack -2


? XSS Vulnerability and Exploitation. 



1. Non- Persistent XSS Exploitation tutorial

# Requirements :-


Note :- Below tutorial is an Simple Non-Persistent XSS Exploitation, Use at your own risk

# XSS Vulnerable Website and Exploitation

Basically, hackers uses Google Dorks and Web Vulnerability Scanners
to find Vulnerable websites, Download XSS Dorks List from here, and searh on Google after getting Vulnerable website and Scan it and find Exploitation Script using Xenotix XSS Exploiter.



Well, Scan it and Click on Maual code and test code one by one until you get above Error Message and After that Test for XSS vulnerability Exploitation  Point do the same maul mode one by one and click on go at every test until you get a Message from Webpage --

Click on Image to Enlarge it 


and manually inject all dorks one by one --- and if you will get above error just put this Javascript after website vulnerable Link :- 


/search.php?search=<font%20color=green <h1>hacked%20by%20hack%20w0rm</h1></font>

For Example :-

http://www.targetwebsite.com/photo-gallery.php?id=1/search.php?search=<font%20color=green><h1>hacked%20by%20hack%20w0rm</h1></font>

You can also Inject Script with Images as, I did Click here to go to my XSS Hacked website Click Here

using that Vulnerable website you can also Inject own Script :) and Practice XSS.

And Suppose if you find any types of Vulnerability in Website that contain Login types and form then you can also Steal Cookies and Deface website. That I'll teach you in Pack-2.


Note :- This is for Educational Purpose only, I'll be not responsible for any XSS attack performed by any Reader


Pack 2 Will release soon with More Advanced XSS attacks and Exploitation
 If you want to Thanks then Share it and Share Knowledge :)