Walk-through
The attacker once again starts off by doing a quick sweep of the network with nmap and after identifying the target proceeds to do a port scan on the target. However this time around, no ports respond (due to the firewall being enabled by default now), which limits the returned information.
The attacker then moves onto creating a resource file for metasploit which, by using railgun calls a simple Windows API command to display a message box which is used to give feedback to the target that the program has been executed and not left wondering what’s happening.
The attacker continues the metasploit usage by creating the agent and configuring metasploit to listen for a connection back to it. Once a connection has been created the attacker sets the resource script to be automatically executed.
The attacker proceeds by setting up an Apache web server which is used to deliver the agent to the user. The attacker enables and creates a "distributed configuration file" (.htaccess), that links any requested URL to the metasploit agent and returns with the same name as requested.
As the attacker now has a backdoor and a delivery system ready the attacker needs a method of filtering the web traffic to create a rule to replace any requested URL which ends in EXE (which is a very common application extension used in a windows environment) to be redirected to the attackers web server instead. The attacker installs Squid3 cache proxy that can do such a thing by using a perl script (replace.pl).
Ettercap could of also been used for an alternative solution, however due to limited scripting functionality the results weren't as high.
As everything is now ready, the attacker just needs to redirect the traffic via their machine. Like before, the attack performs an ARP man in the middle attack with the aid of arpspoof.
Everything is in place and ready for the target to request a program. This can be done by either requesting it themselves (visiting a site and downloading it "manually") or by a program that is already installed (it has to check for an update, found that there is an update available and automatically downloads & executes the program.)
After waiting, the attacker notices that a session has been created and is able to stop the man in the middle attack as the attacker doesn't need to have the targets traffic as they have a direct connection to the target themselves.
A simple bit of privilege escalation gives the attacker complete access to the targets machine.
Notes:
- The recording software did glitch in a few places - which I re-recorded a section and edited it in.
- The first time when the target tries to download an application, they click on the notification bar at the top, rather than re-clicking on the click.
- Adobe flash official web site, detects the browser agent and uses a different delivery system to install, which wouldn't have worked in default browser (Internet Explorer).
- Not every auto-update features use ".exe" files to update.
- It is recommended to check the checksum (E.g. MD5 or SHA1) of download programs before executing.
- It is recommended to only download from the official sites, sources or mirrors. Flash was downloaded from adobe.com (filehippo redirects to it), whereas notepad++ was hosted on filehippo.com
Song: Free Your Soul - Command Strange & Strings Track (Apex Remix) - Bachelors of Science
Video length: 10:00
Capture length: 34:11
Blog Post: http://g0tmi1k.blogspot.com/2011/03/video-owning-windows-xp-sp3-vs-squid.html
Forum Post: http://www.backtrack-linux.org/forums/backtrack-videos/38565-%5Bvideo%5D-owning-windows-xp-sp3-vs-squid.html#post191335






