Mac Shell Shocked Zip

I poked around the site some with Burp Suite (My favorite web hacking tool. I looked through my burp history and found a shell script (submit.sh) on the site and I knew that was the shellshock target. I used a curl request that has the signature shell shock stuff in the User-Agent (lots of fumbling about to get this to work). New Generation (featuring Mac) Hard Times (featuring C Murder) Life Is a Bitch. Mac - Shell Shocked (1998) Mac Presents - The Lost Tapes (2007) Mac - World War. U-God - Golden Arms Redemption (1999) 01: Enter U-God 02: Turbulence 03: Glide (feat. Million) 04: Dat's Ga. Men's Mac Wool Coat. FREE Shipping by Amazon. Charles River Apparel. Waterman Men's Shell Shock 3 Jacket. 4.7 out of 5 stars 12. 07 $70.00 $70.00. FREE Shipping by Amazon. Men's Lightweight Windbreaker Casual Drawstring Hooded Zip Jackets. 4.4 out of 5 stars 1,384. FREE Shipping by Amazon.

In our example we will execute a simple script on the victim to change a victims Google AdSense Account ID to your ID so you can take his ad revenue. Each victim seems to only average around $3-5 a day but you can quickly exploit several thousand victims which really adds up… Time is of the essence however as more and more people patch there servers…

Mac

Step 1:

Find a victim, this is very easy with the proper tools.. In our example we will be using masscan

Go ahead and download the latest version from https://github.com/robertdavidgraham/masscan/archive/master.zip

***This tutorial assumes you know basic terminal usage and are running either Linux or Max OSX and have a build environment setup..

Mac

After extracting the archive open /src/proto-http.c with a text editor and insert the following code at line #24

Update: 25/09/14 ***Removed from site after complaints… Leave a comment if you want the link to the instructions

The problem as I understand it is that while it’s okay to define a function in an environment variable, bash is not supposed to execute the code after it.

The extra “Content-type:” is only for illustration. It prevents the 500 error and shows the contents of the file.

The above example also shows how it’s not a problem of programming errors, even normally safe and harmless bash cgi which doesn’t even take user input can be exploited.

Within a day of the Bash bug dubbed ‘shellshock’ being disclosed, it appears that attackers are already looking for ways to use it for their advantage.

Security researchers have found proof of concept code that attempts to exploit the serious bug discovered this week in Bourne-Again Shell, also known as Bash, which according to US CERT affects both Linux and Mac OS X.

The good news yesterday that some Linux distributions shipped patches for the bug yesterday has already been tempered by the discovery that those patches only partially dealt with potential attacks. In an update overnight, Red Hat said that it was developing a new patch, however, it is still advising users to apply the incomplete one for now.

At the same time as security experts have been racing to develop fixes for the bug and patch systems, it appears hackers have been working on tools to attack vulnerable systems.

Security researcher Yinette yesterday reported discovering the first attack in the wild that exploits the bug, which has been officially documented as CVE-2014-6271.

Security researchers malwaremustdie.org have since analysed the malware, finding numerous functions including distributed denial of service (DDoS) IRC bot as well as a feature that attempts to guess passwords and logins on vulnerable servers, using a list of poor passwords such as ‘root’, ‘admin’, ‘user’, ‘login’, and ‘123456’.

AusCERT earlier yesterday also claimed to have received reports the bug was being exploited in the wild.

Meanwhile, security researcher Robert Graham claims to have found at least 3,000 systems vulnerable to the bug. However Graham’s scan only looked at systems on port 80; the researcher noted embedded webservers on odd ports are the real danger and a scan for these “would give a couple times more results”.

He also warned that DHCP services are also vulnerable, as reported in the initial advisory. “Consequently, even though my light scan found only 3,000 results, this thing is clearly wormable, and can easily worm past firewalls and infect lots of systems. One key question is whether Mac OS X and iPhone DHCP service is vulnerable — once the worm gets behind a firewall and runs a hostile DHCP server, that would “game over” for large networks.”

A very simple example would be a cgi, /var/www/cgi-bin/test.cgi:

Shell Mac Shocked Memories

Then call it with wget to swap out the User Agent string. E.g. this will show the contents of /etc/passwd:

To break it down:

Mac Shell Shocked Zip

Looks like: