Header Banner
Null Byte Logo
Null Byte
wonderhowto.mark.png
Cyber Weapons Lab Forum Metasploit Basics Facebook Hacks Password Cracking Top Wi-Fi Adapters Wi-Fi Hacking Linux Basics Mr. Robot Hacks Hack Like a Pro Forensics Recon Social Engineering Networking Basics Antivirus Evasion Spy Tactics MitM Advice from a Hacker

Exploiting XSS with BeEF: Part 1

May 7, 2015 10:50 AM
May 7, 2015 11:01 AM
"Exploiting XSS with BeEF: Part 1" cover image

BeEF is an XSS-exploiting framework that lets you "hook" or gain control of victim web browsers. In this part of XSS exploitation, we will be working on finding an XSS-vulnerable website. We can simply do this by Google Dorking.

How It Works

XSS is caused when a website "reflects" code back to the user because it didn't recognize the code as something to run in the browser. These can b done by GET or POST HTTP requests.

Find the Website

You can find websites with potential vulnerabilities by using inurl:.com:search.asp. This searches for all websites with a .com TLD and a search.asp page. It doesn't have to be .com, but those kind of websites are more likely to be vulnerable than a .gov website, right? Here is something similar to what you should see (for privacy reasons, I covered the names):

Exploiting XSS with BeEF: Part 1

Check to See if It's Vulnerable

Next, open that webpage and search using an simple script. It would look like . If the webpage is secured, you will see this:

Exploiting XSS with BeEF: Part 1

But if it is vulnerable to XSS, you will get a little pop-up:

Exploiting XSS with BeEF: Part 1

This is caused because the website doesn't sanitize your search. There are various other tests, but this is the simplest and easiest way.

Conclusion

Now you know just how easy it is to find an XSS-vulnerable website. In the next tutorial, we will discuss how to exploit these vulnerabilities further with BeEF.

C|H of C3

The next big software update for iPhone is coming sometime in April and will include a Food section in Apple News+, an easy-to-miss new Ambient Music app, Priority Notifications thanks to Apple Intelligence, and updates to apps like Mail, Photos, Podcasts, and Safari. See what else is coming to your iPhone with the iOS 18.4 update.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!