SlideShare a Scribd company logo
Hammertoss
Proof of concept in C#
Introspection Analysis of the Malware Behavior
Salvatore Saeli
aka Jabex
https://www2.fireeye.com/rs/848-DID-242/images/rpt-apt29-hammertoss.pdf
2
The HAMMERTOSS reference is available at URL
3
Injection Steganography
The injection technique implants the data to hide in the
insignificant part of the carrier file, which is normally
ignored by operating systems and software applications.
Steganography by injection exploits the EOF section and
injects secret data after the EOF marker which
eventually has no side effect on the carrier file and is
often disregarded by the execution environment.
HAMMERTOSS uses JPEG file image.
4
JPEG data are byte streams, always storing 16-bit word
values in big-endian format. JPEG data in general is
stored as a stream of blocks, and each block is
identified by a marker value.
5
6
SOI Marker
EOI Marker
The first two bytes of every JPEG
stream are the Start Of Image
(SOI) marker values FFh D8h.
All JPEG data streams end with
the End Of Image (EOI) marker
values FFh D9h.
7
Relation between hash tag and cryptography algorithm
8
APT29 tweet a URL and a hashtag.
The URL directs HAMMERTOSS to a webpage containing
an image or images.
The hashtag provides
A. a number representing a location within the image file
and
B. characters for appending to an encryption key to
decrypt instructions within the image
==> it is a salt??
9
PBKDF1 as specified in PKCS#5 and RFC_2898
provides Key Derivation and Key Strengthening.
The parameters of the function are a hash function (such
as SHA-1), a password, a salt, an iteration count and the
length of the derived key to be returned.
The standard PBKDF1 will just calculate the hash of
password concatenated with salt, and then hash the
hash value that is returned by the previous step iteration
count minus one times.
10
Using PBKDF1 obtain a implementation of AES 256 bit
with salt, where salt has a variable lenght (from 4 byte
to 8 byte).
11
The appended data is encrypted, so even if detected, the
investigator would be unable to decrypt the data without key
material from two sources: the malware binary and the
current tweet.
12
InternetExplorer.Application COM Object
13
HAMMERTOSS uses the InternetExplorer.Application
COM Object to visit the URL and to obtain the
stegaimage. If a instance of this object run as privileged
user, the process copies all items in the visited web
page into IE user’s cache.
14
C:UsersjabexAppDataLocalMicrosoftWindowsTemporary Internet Files
C:UsersjabexAppDataLocalMicrosoftWindowsTemporary Internet File
Content.IE5I6CX7FXRlena[1].jpg
IE cache Logic Path
IE cache Real Path
15
HAMMERTOSS searches the cache for any images at
least as large as the offset specified in the tweet, it
locates the encrypted data, and it decrypts the data
using a key comprised of hard-coded data from the
malware binary appended with the characters from the
tweet.
16
To get entries from user’s Internet Explorer cache, the
process uses the DllImport C# mechanism to make a
system call to wininet.dll win32 Api
17
The GitHub repository of C# POC is available at URL
https://github.com/jabex/hammertoss
18
Uploader class
The Uploader class check a JPEG image for SOI and EOI
makers. If the check have successful, the process
encrypts the payload and appends it to JPEG image.
After that, it create a hashtag from a random salt and
the original size of input image.
19
tDiscoverer class
This part of POC must run as privileged user!
The tDiscoverer class creates a instance of
InternetExplorer.Application COM object, makes a HTTP
GET request to web page, and put all page’s content into
IE user’s cache.
After that, the process searches into cache entries all
JPEG images at least as large as the offset specified in
the hashtag.
20
tDiscoverer class
From all images obtained in previous step, the process
selects the image where at [offset - 2 byte] it matches
EOI marker.
Finally, the process decrypts the data using encryption
password appended with the characters (salt) that it
has obtained from the hashtag and it executes the
command.
21
THE END

More Related Content

What's hot

Fast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility PluginFast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility Plugin
Takahiro Haruyama
 
15network Programming Clients
15network Programming Clients15network Programming Clients
15network Programming Clients
Adil Jafri
 
Intro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenomIntro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenom
Siddharth Krishna Kumar
 
Wireshark tutorial
Wireshark tutorialWireshark tutorial
Wireshark tutorial
Piyush Mittal
 
File Handling and Command Line Arguments in C
File Handling and Command Line Arguments in CFile Handling and Command Line Arguments in C
File Handling and Command Line Arguments in C
Mahendra Yadav
 
Malicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic SoftwareMalicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic Software
Takahiro Haruyama
 
Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...
Edureka!
 
DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)
DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)
DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)
Alejandro Hernández
 
Ani hilate this week
Ani hilate this weekAni hilate this week
Ani hilate this week
UltraUploader
 
Volatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident ResponseVolatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident Response
Takahiro Haruyama
 
Networking
NetworkingNetworking
Networking
Jafar Nesargi
 
project_docs
project_docsproject_docs
project_docs
Andrey Lavrinovic
 
intro unix/linux 10
intro unix/linux 10intro unix/linux 10
intro unix/linux 10
duquoi
 
openioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensicsopenioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensics
Takahiro Haruyama
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
DeepakKumar4980
 
CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)
Sam Bowne
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23
Techvilla
 
Python-files
Python-filesPython-files
Python-files
Krishna Nanda
 
Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013
Naotoshi Seo
 
Monit - Introduction, Configuration & Usage
Monit - Introduction, Configuration & UsageMonit - Introduction, Configuration & Usage
Monit - Introduction, Configuration & Usage
Amit Solanki
 

What's hot (20)

Fast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility PluginFast and Generic Malware Triage Using openioc_scan Volatility Plugin
Fast and Generic Malware Triage Using openioc_scan Volatility Plugin
 
15network Programming Clients
15network Programming Clients15network Programming Clients
15network Programming Clients
 
Intro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenomIntro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenom
 
Wireshark tutorial
Wireshark tutorialWireshark tutorial
Wireshark tutorial
 
File Handling and Command Line Arguments in C
File Handling and Command Line Arguments in CFile Handling and Command Line Arguments in C
File Handling and Command Line Arguments in C
 
Malicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic SoftwareMalicious File for Exploiting Forensic Software
Malicious File for Exploiting Forensic Software
 
Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...
 
DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)
DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)
DotDotPwn Fuzzer - Black Hat 2011 (Arsenal)
 
Ani hilate this week
Ani hilate this weekAni hilate this week
Ani hilate this week
 
Volatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident ResponseVolatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident Response
 
Networking
NetworkingNetworking
Networking
 
project_docs
project_docsproject_docs
project_docs
 
intro unix/linux 10
intro unix/linux 10intro unix/linux 10
intro unix/linux 10
 
openioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensicsopenioc_scan - IOC scanner for memory forensics
openioc_scan - IOC scanner for memory forensics
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)CNIT 127 Ch 8: Windows overflows (Part 1)
CNIT 127 Ch 8: Windows overflows (Part 1)
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23
 
Python-files
Python-filesPython-files
Python-files
 
Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013
 
Monit - Introduction, Configuration & Usage
Monit - Introduction, Configuration & UsageMonit - Introduction, Configuration & Usage
Monit - Introduction, Configuration & Usage
 

Viewers also liked

Proof of Concept Fund
Proof of Concept FundProof of Concept Fund
Proof of Concept Fund
Screen WM
 
Library Promotion Briefing
Library Promotion BriefingLibrary Promotion Briefing
Library Promotion Briefing
Lifelong Learning
 
Proof of concept center042011
Proof of concept center042011Proof of concept center042011
Proof of concept center042011
Bucear
 
Nabauspc2011
Nabauspc2011Nabauspc2011
Proof of Concept with Real Application Testing 12c
Proof of Concept with Real Application Testing 12cProof of Concept with Real Application Testing 12c
Proof of Concept with Real Application Testing 12c
Luis Marques
 
David O'hagan, Partners in Technology briefing 23 05-14
David O'hagan, Partners in Technology briefing 23 05-14 David O'hagan, Partners in Technology briefing 23 05-14
David O'hagan, Partners in Technology briefing 23 05-14
Digital Queensland
 
A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...
A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...
A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...
Robin De Croon
 
Proof of Concept Guide for ManageEngine OpManager
Proof of Concept Guide for ManageEngine OpManagerProof of Concept Guide for ManageEngine OpManager
Proof of Concept Guide for ManageEngine OpManager
ManageEngine, Zoho Corporation
 
Proof-Of-Concept
Proof-Of-ConceptProof-Of-Concept
Proof-Of-Concept
Diana Rangaves, PharmD, CEO
 
PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...
PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...
PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...
Puppet
 
Portfolio CLARA Proof of Concept projects
Portfolio CLARA Proof of Concept projectsPortfolio CLARA Proof of Concept projects
Portfolio CLARA Proof of Concept projects
llevy
 
Proof of Concept Workshop
Proof of Concept WorkshopProof of Concept Workshop
Proof of Concept Workshop
Danny Holtschke
 
Proof Of Concept Presentation on Concept
Proof Of Concept Presentation on ConceptProof Of Concept Presentation on Concept
Proof Of Concept Presentation on Concept
University of Limerick
 
How to Build a Proof of Concept
How to Build a Proof of Concept How to Build a Proof of Concept
How to Build a Proof of Concept
Michael Hamilton
 
An example of a successful proof of concept
An example of a successful proof of conceptAn example of a successful proof of concept
An example of a successful proof of concept
ETLSolutions
 
Big Data Proof of Concept
Big Data Proof of ConceptBig Data Proof of Concept
Big Data Proof of Concept
RCG Global Services
 

Viewers also liked (16)

Proof of Concept Fund
Proof of Concept FundProof of Concept Fund
Proof of Concept Fund
 
Library Promotion Briefing
Library Promotion BriefingLibrary Promotion Briefing
Library Promotion Briefing
 
Proof of concept center042011
Proof of concept center042011Proof of concept center042011
Proof of concept center042011
 
Nabauspc2011
Nabauspc2011Nabauspc2011
Nabauspc2011
 
Proof of Concept with Real Application Testing 12c
Proof of Concept with Real Application Testing 12cProof of Concept with Real Application Testing 12c
Proof of Concept with Real Application Testing 12c
 
David O'hagan, Partners in Technology briefing 23 05-14
David O'hagan, Partners in Technology briefing 23 05-14 David O'hagan, Partners in Technology briefing 23 05-14
David O'hagan, Partners in Technology briefing 23 05-14
 
A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...
A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...
A Proof-of-Concept Visualization to Increase Comprehension of Personal Medica...
 
Proof of Concept Guide for ManageEngine OpManager
Proof of Concept Guide for ManageEngine OpManagerProof of Concept Guide for ManageEngine OpManager
Proof of Concept Guide for ManageEngine OpManager
 
Proof-Of-Concept
Proof-Of-ConceptProof-Of-Concept
Proof-Of-Concept
 
PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...
PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...
PuppetConf 2016 Customer Keynote: Proof of Concept to 30K+ Hosts with Puppet ...
 
Portfolio CLARA Proof of Concept projects
Portfolio CLARA Proof of Concept projectsPortfolio CLARA Proof of Concept projects
Portfolio CLARA Proof of Concept projects
 
Proof of Concept Workshop
Proof of Concept WorkshopProof of Concept Workshop
Proof of Concept Workshop
 
Proof Of Concept Presentation on Concept
Proof Of Concept Presentation on ConceptProof Of Concept Presentation on Concept
Proof Of Concept Presentation on Concept
 
How to Build a Proof of Concept
How to Build a Proof of Concept How to Build a Proof of Concept
How to Build a Proof of Concept
 
An example of a successful proof of concept
An example of a successful proof of conceptAn example of a successful proof of concept
An example of a successful proof of concept
 
Big Data Proof of Concept
Big Data Proof of ConceptBig Data Proof of Concept
Big Data Proof of Concept
 

Similar to Hammertoss: Proof of concept in C#

OceanLotus Ships New Backdoor Using Old Tricks
OceanLotus Ships New Backdoor Using Old TricksOceanLotus Ships New Backdoor Using Old Tricks
OceanLotus Ships New Backdoor Using Old Tricks
ESET Middle East
 
Advances in Open Source Password Cracking
Advances in Open Source Password CrackingAdvances in Open Source Password Cracking
Advances in Open Source Password Cracking
n|u - The Open Security Community
 
Project Jugaad
Project JugaadProject Jugaad
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino Tutorial
Max Kleiner
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
IOSR Journals
 
Maxthonreporten
MaxthonreportenMaxthonreporten
Maxthonreporten
Andrey Apuhtin
 
SnorGen User Guide 2.0
SnorGen User Guide 2.0SnorGen User Guide 2.0
SnorGen User Guide 2.0
Sungho Yoon
 
Readactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory DisclosureReadactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory Disclosure
ch0psticks
 
64-bit Loki
64-bit Loki64-bit Loki
64-bit Loki
PVS-Studio
 
Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2
Mohammed Adam
 
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wpBlack hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
rgster
 
Basic malware analysis
Basic malware analysis Basic malware analysis
Basic malware analysis
Cysinfo Cyber Security Community
 
B.Eng-Final Year Project interim-report
B.Eng-Final Year Project interim-reportB.Eng-Final Year Project interim-report
B.Eng-Final Year Project interim-report
Akash Rajguru
 
Audio Cryptography System
Audio Cryptography SystemAudio Cryptography System
Audio Cryptography System
Raju Raj
 
Sergey Stoyan 2016
Sergey Stoyan 2016Sergey Stoyan 2016
Sergey Stoyan 2016
Sergey Stoyan
 
Sergey Stoyan 2016
Sergey Stoyan 2016Sergey Stoyan 2016
Sergey Stoyan 2016
Sergey Stoyan
 
Web backdoors attacks, evasion, detection
Web backdoors   attacks, evasion, detectionWeb backdoors   attacks, evasion, detection
Web backdoors attacks, evasion, detection
n|u - The Open Security Community
 
Design Package to Build and Evaluate Encryption Algorithms
Design Package to Build and Evaluate Encryption AlgorithmsDesign Package to Build and Evaluate Encryption Algorithms
Design Package to Build and Evaluate Encryption Algorithms
IOSRjournaljce
 
Automatic reverse engineering of malware emulators
Automatic reverse engineering of malware emulatorsAutomatic reverse engineering of malware emulators
Automatic reverse engineering of malware emulators
UltraUploader
 
Reverse-engineering: Using GDB on Linux
Reverse-engineering: Using GDB on LinuxReverse-engineering: Using GDB on Linux
Reverse-engineering: Using GDB on Linux
Rick Harris
 

Similar to Hammertoss: Proof of concept in C# (20)

OceanLotus Ships New Backdoor Using Old Tricks
OceanLotus Ships New Backdoor Using Old TricksOceanLotus Ships New Backdoor Using Old Tricks
OceanLotus Ships New Backdoor Using Old Tricks
 
Advances in Open Source Password Cracking
Advances in Open Source Password CrackingAdvances in Open Source Password Cracking
Advances in Open Source Password Cracking
 
Project Jugaad
Project JugaadProject Jugaad
Project Jugaad
 
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino Tutorial
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 
Maxthonreporten
MaxthonreportenMaxthonreporten
Maxthonreporten
 
SnorGen User Guide 2.0
SnorGen User Guide 2.0SnorGen User Guide 2.0
SnorGen User Guide 2.0
 
Readactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory DisclosureReadactor-Practical Code Randomization Resilient to Memory Disclosure
Readactor-Practical Code Randomization Resilient to Memory Disclosure
 
64-bit Loki
64-bit Loki64-bit Loki
64-bit Loki
 
Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2
 
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wpBlack hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
Black hat 2010-bannedit-advanced-command-injection-exploitation-1-wp
 
Basic malware analysis
Basic malware analysis Basic malware analysis
Basic malware analysis
 
B.Eng-Final Year Project interim-report
B.Eng-Final Year Project interim-reportB.Eng-Final Year Project interim-report
B.Eng-Final Year Project interim-report
 
Audio Cryptography System
Audio Cryptography SystemAudio Cryptography System
Audio Cryptography System
 
Sergey Stoyan 2016
Sergey Stoyan 2016Sergey Stoyan 2016
Sergey Stoyan 2016
 
Sergey Stoyan 2016
Sergey Stoyan 2016Sergey Stoyan 2016
Sergey Stoyan 2016
 
Web backdoors attacks, evasion, detection
Web backdoors   attacks, evasion, detectionWeb backdoors   attacks, evasion, detection
Web backdoors attacks, evasion, detection
 
Design Package to Build and Evaluate Encryption Algorithms
Design Package to Build and Evaluate Encryption AlgorithmsDesign Package to Build and Evaluate Encryption Algorithms
Design Package to Build and Evaluate Encryption Algorithms
 
Automatic reverse engineering of malware emulators
Automatic reverse engineering of malware emulatorsAutomatic reverse engineering of malware emulators
Automatic reverse engineering of malware emulators
 
Reverse-engineering: Using GDB on Linux
Reverse-engineering: Using GDB on LinuxReverse-engineering: Using GDB on Linux
Reverse-engineering: Using GDB on Linux
 

Recently uploaded

Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Ana Luísa Pinho
 
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
AbdullaAlAsif1
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
Sérgio Sacani
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
Nistarini College, Purulia (W.B) India
 
Deep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless ReproducibilityDeep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless Reproducibility
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
IshaGoswami9
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
İsa Badur
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
European Sustainable Phosphorus Platform
 
20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx
Sharon Liu
 
Bob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdfBob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdf
Texas Alliance of Groundwater Districts
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
University of Maribor
 
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
yqqaatn0
 
SAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdfSAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdf
KrushnaDarade1
 
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptxANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
RASHMI M G
 
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdfTopic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
TinyAnderson
 
Nucleophilic Addition of carbonyl compounds.pptx
Nucleophilic Addition of carbonyl  compounds.pptxNucleophilic Addition of carbonyl  compounds.pptx
Nucleophilic Addition of carbonyl compounds.pptx
SSR02
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
Aditi Bajpai
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
University of Hertfordshire
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
pablovgd
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
Anagha Prasad
 

Recently uploaded (20)

Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
 
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
 
Deep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless ReproducibilityDeep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless Reproducibility
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
 
20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx20240520 Planning a Circuit Simulator in JavaScript.pptx
20240520 Planning a Circuit Simulator in JavaScript.pptx
 
Bob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdfBob Reedy - Nitrate in Texas Groundwater.pdf
Bob Reedy - Nitrate in Texas Groundwater.pdf
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
 
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
原版制作(carleton毕业证书)卡尔顿大学毕业证硕士文凭原版一模一样
 
SAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdfSAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdf
 
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptxANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
ANAMOLOUS SECONDARY GROWTH IN DICOT ROOTS.pptx
 
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdfTopic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
 
Nucleophilic Addition of carbonyl compounds.pptx
Nucleophilic Addition of carbonyl  compounds.pptxNucleophilic Addition of carbonyl  compounds.pptx
Nucleophilic Addition of carbonyl compounds.pptx
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
 

Hammertoss: Proof of concept in C#

  • 1. Hammertoss Proof of concept in C# Introspection Analysis of the Malware Behavior Salvatore Saeli aka Jabex
  • 4. The injection technique implants the data to hide in the insignificant part of the carrier file, which is normally ignored by operating systems and software applications. Steganography by injection exploits the EOF section and injects secret data after the EOF marker which eventually has no side effect on the carrier file and is often disregarded by the execution environment. HAMMERTOSS uses JPEG file image. 4
  • 5. JPEG data are byte streams, always storing 16-bit word values in big-endian format. JPEG data in general is stored as a stream of blocks, and each block is identified by a marker value. 5
  • 6. 6 SOI Marker EOI Marker The first two bytes of every JPEG stream are the Start Of Image (SOI) marker values FFh D8h. All JPEG data streams end with the End Of Image (EOI) marker values FFh D9h.
  • 7. 7 Relation between hash tag and cryptography algorithm
  • 8. 8 APT29 tweet a URL and a hashtag. The URL directs HAMMERTOSS to a webpage containing an image or images. The hashtag provides A. a number representing a location within the image file and B. characters for appending to an encryption key to decrypt instructions within the image ==> it is a salt??
  • 9. 9 PBKDF1 as specified in PKCS#5 and RFC_2898 provides Key Derivation and Key Strengthening. The parameters of the function are a hash function (such as SHA-1), a password, a salt, an iteration count and the length of the derived key to be returned. The standard PBKDF1 will just calculate the hash of password concatenated with salt, and then hash the hash value that is returned by the previous step iteration count minus one times.
  • 10. 10 Using PBKDF1 obtain a implementation of AES 256 bit with salt, where salt has a variable lenght (from 4 byte to 8 byte).
  • 11. 11 The appended data is encrypted, so even if detected, the investigator would be unable to decrypt the data without key material from two sources: the malware binary and the current tweet.
  • 13. 13 HAMMERTOSS uses the InternetExplorer.Application COM Object to visit the URL and to obtain the stegaimage. If a instance of this object run as privileged user, the process copies all items in the visited web page into IE user’s cache.
  • 14. 14 C:UsersjabexAppDataLocalMicrosoftWindowsTemporary Internet Files C:UsersjabexAppDataLocalMicrosoftWindowsTemporary Internet File Content.IE5I6CX7FXRlena[1].jpg IE cache Logic Path IE cache Real Path
  • 15. 15 HAMMERTOSS searches the cache for any images at least as large as the offset specified in the tweet, it locates the encrypted data, and it decrypts the data using a key comprised of hard-coded data from the malware binary appended with the characters from the tweet.
  • 16. 16 To get entries from user’s Internet Explorer cache, the process uses the DllImport C# mechanism to make a system call to wininet.dll win32 Api
  • 17. 17 The GitHub repository of C# POC is available at URL https://github.com/jabex/hammertoss
  • 18. 18 Uploader class The Uploader class check a JPEG image for SOI and EOI makers. If the check have successful, the process encrypts the payload and appends it to JPEG image. After that, it create a hashtag from a random salt and the original size of input image.
  • 19. 19 tDiscoverer class This part of POC must run as privileged user! The tDiscoverer class creates a instance of InternetExplorer.Application COM object, makes a HTTP GET request to web page, and put all page’s content into IE user’s cache. After that, the process searches into cache entries all JPEG images at least as large as the offset specified in the hashtag.
  • 20. 20 tDiscoverer class From all images obtained in previous step, the process selects the image where at [offset - 2 byte] it matches EOI marker. Finally, the process decrypts the data using encryption password appended with the characters (salt) that it has obtained from the hashtag and it executes the command.