Smartcard vulnerabilities in
 modern banking malware

 Aleksandr Matrosov
 Eugene Rodionov
Agenda

 Evolution of Carberp distribution scheme
    drive by downloads
    detection statistics


 Carberp modifications
    the story of BK-LOADER
    antiRE tricks


 Banks attacking algorithms
 Smartcard attacks
Evolution drive by downloads: Carberp case
Exploit kits used in distribution scheme
 Impact since 2010 (probivaites.in)
   •   Java/Exploit.CVE-2010-0840
   •   Java/Exploit.CVE-2010-0842
   •   Java/TrojanDownloader.OpenConnection


 Blackhole since 2011 (lifenews-sport.org)
   •   JS/Exploit.JavaDepKit (CVE-2010-0886)
   •   Java/Exploit.CVE-2011-3544
   •   Java/Exploit.CVE-2012-0507
   •   Java/Agent


 Nuclear Pack since 2012 (nod32-matrosov-pideri.org)
   •   Java/Exploit.CVE-2012-0507
Blackhole drive by download scheme


legitimate
    site


                                  TRUE   search       FALSE
                                          vuln



             exploitation stage
             /getJavaInfo.jar               dropper execution
             /content/obe.jar              /w.php?f=17&e=2
             /content/rino.jar
Exploit kit migration reasons


            • most popular = most detected
       1

            • frequently leaked exploit kit
       2    • most popular exploit kit for research


            • auto detections by AV-crawlers
       3    • non-detection period is less than two hours
Blackhole migration to Nuclear Pack
Nuclear pack drive by download scheme

  legitimate
      site


  check real
    user
                                                TRUE     search          FALSE
                                                          vuln




             exploitation stage                                   dropper execution
//images/274e0118278c38ab7f4ef5f98b71d9dc.jar          /server_privileges.php?<gate_id>=<exp_id>
BlackSEO & Nuclear Pack
Carberp detection statistics
Carberp detection statistics by country
Cloud data from Live Grid


                               Russia
                               Ukraine
                               Belarus
                               Kazakhstan
                               Turkey
                               United Kingdom
                               Spain
                               United States
                               Italy
                               Rest of the world
Carberp detections over time in Russia
       Cloud data from Live Grid

0.18
0.16
0.14
0.12
 0.1
0.08
0.06
0.04
0.02
  0
Evolution of Carberp modifications
Different groups, different bots, different C&C’s



                            G***o




                  D*****v


                                    Origami
functionality           Gizmo              Dudorov                 Origami
Dedicated dropper                                              Win32/Hodprot
Java patcher                                                       
Bootkit                                                       based on Rovnix
RDP backconnect                         Win32/RDPdoor          Win32/RDPdoor
TV backconnect       Win32/Sheldor         Win32/Sheldor          Win32/Sheldor
HTML injections     IE, Firefox, Opera   IE, Firefox, Opera,    IE, Firefox, Opera,
                                               Chrome                 Chrome
Autoloads                                                            
Unique plugins         minav.plug           sbtest.plug             sber.plug
                       passw.plug         cyberplat.plug            ddos.plug
                       killav.plug
commands Gizmo Dudorov Origami                Description
ddos                          download DDoS plugin and start attack
updatehosts                   modify hosts file on infected system
alert                         show message box on infected system
update                        download new version of Carberp
updateconfig                  download new version of config file
download                      download and execute PE-file
loaddll                       download plugin and load into memory
bootkit                       download and install bootkit
grabber                       grab HTML form data and send to C&C
killos                        modify boot code and delete system files
killuser                      delete user Windows account
killbot                       delete all files and registry keys
updatepatch                   download and modify java runtime
deletepatch                   delete java runtime modifications
The Story of BK-LOADER
    from Rovnix.A to Carberp
Interesting Carberp sample (October 2011)
Interesting strings inside Carberp with bootkit
Carberp bootkit functionality


                                Inject user-mode
                                     payload




          Bootkit                Load unsigned
       bootstrap code            driver injector
Callgraph of bootkit installation routine
Rovnix kit hidden file systems comparison

functionality          Rovnix.A      Carberp with bootkit   Rovnix.B
VBR modification                                             
polymorphic VBR                                               
Malware driver                                                
storage
Driver encryption        custom             custom            custom
algorithm              (ROR + XOR)        (ROR + XOR)       (ROR + XOR)

Hidden file system                         FAT16             FAT16
                                          modification      modification
File system                                 RC6               RC6
encryption algorithm                      modification      modification
Comparison of Carberp file system with Rovnix.B
AntiRE tricks
Removing AV hooks before installation
Calling WinAPI functions by hash
Plugin encryption algorithm
Communication protocol encryption algorithm
Banks attacking algorithms
Bank attacking algorithm              Gizmo     Dudorov   Origami
HTML injections                                             
autoload                                 2010             2011 (Sep)
dedicated plugins for major banks                           
intercepting client-banks activity                          
patching java                                               
webmoney/cyberplat                                          
stealing money from private persons                         
Smartcard attacks
Applications used by smartcards          User Application


User interface             Access provider


       Smartcard resource manager
                                              Smartcard Subsystem
         Call reader device driver

Specific reader             Specific reader
                    …
 device driver               device driver


Reader device       …       Reader device
                                              Hardware Support

  Smartcard         …         Smartcard
Win32/Spy.Ranbyus
Win32/RDPdoor v4.x
References

 Exploit Kit plays with smart redirection
http://blog.eset.com/2012/04/05/blackhole-exploit-kit-plays-with-smart-redirection

 Dr. Zeus: the Bot in the Hat
http://blog.eset.com/2010/11/05/dr-zeus-the-bot-in-the-hat

 Blackhole, CVE-2012-0507 and Carberp
http://blog.eset.com/2012/03/30/blackhole-cve-2012-0507-and-carberp

 Evolution of Win32/Carberp: going deeper
http://blog.eset.com/2011/11/21/evolution-of-win32carberp-going-deeper

 Hodprot: Hot to Bot
http://go.eset.com/us/resources/white-papers/Hodprot-Report.pdf

 Carberp Gang Evolution: CARO 2012 presentation
http://blog.eset.com/2012/05/24/carberp-gang-evolution-at-caro-2012
Thank you for your attention!


Aleksandr Matrosov         Eugene Rodionov
matrosov@eset.sk           rodionov@eset.sk
@matrosov                  @vxradius
amatrosov.blogspot.com

Smartcard Vulnerabilities In Modern Banking Malwaremalware

  • 1.
    Smartcard vulnerabilities in modern banking malware Aleksandr Matrosov Eugene Rodionov
  • 2.
    Agenda  Evolution ofCarberp distribution scheme  drive by downloads  detection statistics  Carberp modifications  the story of BK-LOADER  antiRE tricks  Banks attacking algorithms  Smartcard attacks
  • 3.
    Evolution drive bydownloads: Carberp case
  • 4.
    Exploit kits usedin distribution scheme  Impact since 2010 (probivaites.in) • Java/Exploit.CVE-2010-0840 • Java/Exploit.CVE-2010-0842 • Java/TrojanDownloader.OpenConnection  Blackhole since 2011 (lifenews-sport.org) • JS/Exploit.JavaDepKit (CVE-2010-0886) • Java/Exploit.CVE-2011-3544 • Java/Exploit.CVE-2012-0507 • Java/Agent  Nuclear Pack since 2012 (nod32-matrosov-pideri.org) • Java/Exploit.CVE-2012-0507
  • 5.
    Blackhole drive bydownload scheme legitimate site TRUE search FALSE vuln exploitation stage /getJavaInfo.jar dropper execution /content/obe.jar /w.php?f=17&e=2 /content/rino.jar
  • 6.
    Exploit kit migrationreasons • most popular = most detected 1 • frequently leaked exploit kit 2 • most popular exploit kit for research • auto detections by AV-crawlers 3 • non-detection period is less than two hours
  • 7.
  • 8.
    Nuclear pack driveby download scheme legitimate site check real user TRUE search FALSE vuln exploitation stage dropper execution //images/274e0118278c38ab7f4ef5f98b71d9dc.jar /server_privileges.php?<gate_id>=<exp_id>
  • 9.
  • 10.
  • 11.
    Carberp detection statisticsby country Cloud data from Live Grid Russia Ukraine Belarus Kazakhstan Turkey United Kingdom Spain United States Italy Rest of the world
  • 12.
    Carberp detections overtime in Russia Cloud data from Live Grid 0.18 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0
  • 13.
    Evolution of Carberpmodifications
  • 14.
    Different groups, differentbots, different C&C’s G***o D*****v Origami
  • 15.
    functionality Gizmo Dudorov Origami Dedicated dropper   Win32/Hodprot Java patcher    Bootkit    based on Rovnix RDP backconnect  Win32/RDPdoor Win32/RDPdoor TV backconnect Win32/Sheldor Win32/Sheldor Win32/Sheldor HTML injections IE, Firefox, Opera IE, Firefox, Opera, IE, Firefox, Opera, Chrome Chrome Autoloads    Unique plugins minav.plug sbtest.plug sber.plug passw.plug cyberplat.plug ddos.plug killav.plug
  • 16.
    commands Gizmo DudorovOrigami Description ddos    download DDoS plugin and start attack updatehosts    modify hosts file on infected system alert    show message box on infected system update    download new version of Carberp updateconfig    download new version of config file download    download and execute PE-file loaddll    download plugin and load into memory bootkit    download and install bootkit grabber    grab HTML form data and send to C&C killos    modify boot code and delete system files killuser    delete user Windows account killbot    delete all files and registry keys updatepatch    download and modify java runtime deletepatch    delete java runtime modifications
  • 17.
    The Story ofBK-LOADER from Rovnix.A to Carberp
  • 19.
  • 20.
    Interesting strings insideCarberp with bootkit
  • 21.
    Carberp bootkit functionality Inject user-mode payload Bootkit Load unsigned bootstrap code driver injector
  • 22.
    Callgraph of bootkitinstallation routine
  • 23.
    Rovnix kit hiddenfile systems comparison functionality Rovnix.A Carberp with bootkit Rovnix.B VBR modification    polymorphic VBR    Malware driver    storage Driver encryption custom custom custom algorithm (ROR + XOR) (ROR + XOR) (ROR + XOR) Hidden file system  FAT16 FAT16 modification modification File system  RC6 RC6 encryption algorithm modification modification
  • 24.
    Comparison of Carberpfile system with Rovnix.B
  • 25.
  • 26.
    Removing AV hooksbefore installation
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
    Bank attacking algorithm Gizmo Dudorov Origami HTML injections    autoload 2010  2011 (Sep) dedicated plugins for major banks    intercepting client-banks activity    patching java    webmoney/cyberplat    stealing money from private persons   
  • 34.
  • 35.
    Applications used bysmartcards User Application User interface Access provider Smartcard resource manager Smartcard Subsystem Call reader device driver Specific reader Specific reader … device driver device driver Reader device … Reader device Hardware Support Smartcard … Smartcard
  • 36.
  • 37.
  • 39.
    References  Exploit Kitplays with smart redirection http://blog.eset.com/2012/04/05/blackhole-exploit-kit-plays-with-smart-redirection  Dr. Zeus: the Bot in the Hat http://blog.eset.com/2010/11/05/dr-zeus-the-bot-in-the-hat  Blackhole, CVE-2012-0507 and Carberp http://blog.eset.com/2012/03/30/blackhole-cve-2012-0507-and-carberp  Evolution of Win32/Carberp: going deeper http://blog.eset.com/2011/11/21/evolution-of-win32carberp-going-deeper  Hodprot: Hot to Bot http://go.eset.com/us/resources/white-papers/Hodprot-Report.pdf  Carberp Gang Evolution: CARO 2012 presentation http://blog.eset.com/2012/05/24/carberp-gang-evolution-at-caro-2012
  • 40.
    Thank you foryour attention! Aleksandr Matrosov Eugene Rodionov matrosov@eset.sk rodionov@eset.sk @matrosov @vxradius amatrosov.blogspot.com