SlideShare a Scribd company logo
1 of 43
No Rest For the
Bear
Alexis D-J & Thomas D
Bluehat - November 9, 2017
Bear Hunters?
• Jessy Campos
• Thomas Dupuy, Malware Researcher
• Alexis Dorais-Joncas, Security Intelligence Team Lead
①
②
④
③
AGENDA
What is Sednit
Bears in action
Bears’ tooling
Conclusion
Bear during Automn 2016
• Sedkit
• Dealer’s Choice
• Macros / VBA
• Direct RCE/LPE
Bear during Automn 2016
Bear during Automn 2016
Bear During Christmas 2016
The Chain of Exploitation
• Dealers Choice (.docx + SWF exploit)
• SedUploader Dropper
• SedUploader Payload
• Xagent?(didn’t see in that case)
Bears in April 2017
Bears in April 2017
• Sedkit
• Dealer’s Choice
• Macros / VBA
• Direct RCE/LPE
Bears in April 2017
Bears in April 2017
April
2015
May
2015
June
2015
July
2015
August
2015
September
2015
October
2015
April
2016
May
2016
October
2016
CVE-2015-3043
Flash
CVE-2015-1701
Windows LPE
CVE-2016-7855
Flash
CVE-2016-7255
Windows LPE
CVE-2016-4117
Flash
CVE-2015-2590
Java
CVE-2015-4902
Java click-to-play bypass
CVE-2015-2424
Office RCE
CVE-2016-1019
Flash
CVE-2015-7645
Flash
April
2017
CVE-2017-0261
Office RCE
CVE-2016-0263
Windows LPE
The Bears in Summer 2017
July: “Hotel Reservation Form”
• Sedkit
• Dealer’s Choice
• Macros / VBA
• Direct RCE/LPE
The Bears in Automn 2017
October: “World War 3”
• Sedkit
• Dealer’s Choice
• Macros / VBA
• Direct RCE/LPE
The Bears in Automn 2017
October: “CyCon”
• Sedkit
• Dealer’s Choice
• Macros / VBA
• Direct RCE/LPE
The Bears in Automn 2017
October: “ISIS attack in New York”
• Sedkit
• Dealer’s Choice
• Macros / VBA
• Direct RCE/LPE
• DDE
The Bears in Automn 2017
October: “ISIS attack in New York”
• Sedkit
• Dealer’s Choice
• Macros / VBA
• Direct RCE/LPE
• DDE
Bear’s tooling
The Bear Takes Pictures
• new key `img=`
• base64 encoded
• PowerSniff
24
XAGENT
(a.k.a SPLM, CHOPSTICK)
Flagship backdoor
• Downloaded by SEDUPLOADER
• Modular backdoor developed in C++
• Deployed in most Sednit operations, usually after the reconnaissance
phase
• Period of activity: November 2012 - Now
Xagent Is Everywhere
• OSX
• Android
• iOS
• Linux
But what about Windows?
Features
• Encrypted Strings Algorithm
• "Domain Generation Algorithm”
• Network Protocol
• New Kernel Commands
• ...
Encrypted Strings Algorithm v3
[...]
i = data_size-- % mask_size;
result[data_size + 1] = data[data_size + 1] ^ data[data_size] ^ mask[i];
[...]
Encrypted Strings Algorithm v4
return (((((a2 ^ (((((((((((a1 - 13 + 42) ^ 0x7B) +
104) ^ 0x72) - 81 - a2 – 76) ^ 0x31) + 75) ^
0x3B) + 3) ^ 0x40) + 100) ^ 0x1C ^ 0xA9) +
41) ^ 0xB9) - 65) ^ 0xA) % 256;
Encrypted Strings Algorithm v4
return (((((a2 ^ (((((((((((a1 - 13 + 42) ^ 0x7B) +
104) ^ 0x72) - 81 - a2 – 76) ^ 0x31) + 75) ^
0x3B) + 3) ^ 0x40) + 100) ^ 0x1C ^ 0xA9) +
41) ^ 0xB9) - 65) ^ 0xA) % 256;
"Domain Generation Algorithm"
Did You Say DGA?
• concatenates 4 words + ".com”
• 3 arrays of words
• 1 unique seed per sample
• number of domains
DGA's Function
[...]
seed = (0x15A4E35 * seed + 1) % 0x100000000i64;
if ( v5 > 0x455 ){
setData(&struct_str, &table1[0x32 * (seed % 0x95)], 0x32);
[…]
setData(&struct_str, &table2[0x1E * (seed % 0x1F)], 0x1E);
[…]
setData(&struct_str, &table3[0x19 * (seed % 0x63)], 0x32);
[…]
setData(&struct_str, &table1[0x32 * ((v15 + seed) % 0x95)], 0x32);
[...]
DGA's Function
[...]
seed = (0x15A4E35 * seed + 1) % 0x100000000i64;
if ( v5 > 0x455 ){
setData(&struct_str, &table1[0x32 * (seed % 0x95)], 0x32);
[…]
setData(&struct_str, &table2[0x1E * (seed % 0x1F)], 0x1E);
[…]
setData(&struct_str, &table3[0x19 * (seed % 0x63)], 0x32);
[…]
setData(&struct_str, &table1[0x32 * ((v15 + seed) % 0x95)], 0x32);
[...]
Example
table1=["street", "company", "part", "system", "number"...
table2=["at", "on", "in", "to", "into"...
table3=["different", "used", "important", "every", "large"...
streetatimportantnumber.com
Bears Improving Its Communication
Kernel Commands
Commands v3 Commands v4
[…]
2: PING_REQUEST X
[…]
X 34: LocalStorage
X 35: LocalStorage
X 36: LocalStorage
[…]
And More...
• New channel version
• WinHttp
• New module version
• ModuleFileSystem (wrapper for FS operations)
• ModuleRemoteKeylogger (keylogger)
• ProcessTranslatorModule (backdoor)
• unknown module (LocalStorage?)
Conclusion
• Group still active with multiple campaigns
• SednitToolkit += Word Macros
• SednitToolkit -= Sedkit
• SednitToolkit += Dealer’s Choice
• SednitToolkit[XAgentVersion]++
Q & A
BlueHat v17 || Sednit Reloaded: The Bears' Operations From Christmas to Halloween

More Related Content

Similar to BlueHat v17 || Sednit Reloaded: The Bears' Operations From Christmas to Halloween

Sass: The Future of Stylesheets
Sass: The Future of StylesheetsSass: The Future of Stylesheets
Sass: The Future of Stylesheetschriseppstein
 
Cloud Storage Spring Cleaning: A Treasure Hunt
Cloud Storage Spring Cleaning: A Treasure HuntCloud Storage Spring Cleaning: A Treasure Hunt
Cloud Storage Spring Cleaning: A Treasure HuntSteven Moy
 
CRM Saturday: DevOps with Jonas Rapp
CRM Saturday: DevOps with Jonas RappCRM Saturday: DevOps with Jonas Rapp
CRM Saturday: DevOps with Jonas RappJonas Rapp
 
Even faster web sites
Even faster web sitesEven faster web sites
Even faster web sitesFelipe Lavín
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to pythonActiveState
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
node-crate: node.js and big data
 node-crate: node.js and big data node-crate: node.js and big data
node-crate: node.js and big dataStefan Thies
 
Building prediction models with Amazon Redshift and Amazon ML
Building prediction models with  Amazon Redshift and Amazon MLBuilding prediction models with  Amazon Redshift and Amazon ML
Building prediction models with Amazon Redshift and Amazon MLJulien SIMON
 
Doug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript ProjectsDoug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript ProjectsDoug McCune
 
DSpace Under the Hood
DSpace Under the HoodDSpace Under the Hood
DSpace Under the HoodDuraSpace
 
Tales from the dark side: developing SDKs at scale
Tales from the dark side: developing SDKs at scaleTales from the dark side: developing SDKs at scale
Tales from the dark side: developing SDKs at scaleKenneth Geisshirt
 
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]Leonardo De Moura Rocha Lima
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++Mike Acton
 
Avoiding big data antipatterns
Avoiding big data antipatternsAvoiding big data antipatterns
Avoiding big data antipatternsgrepalex
 
Big Data Analytics: Finding diamonds in the rough with Azure
Big Data Analytics: Finding diamonds in the rough with AzureBig Data Analytics: Finding diamonds in the rough with Azure
Big Data Analytics: Finding diamonds in the rough with AzureChristos Charmatzis
 
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...Heroku
 
OCF.tw's talk about "Introduction to spark"
OCF.tw's talk about "Introduction to spark"OCF.tw's talk about "Introduction to spark"
OCF.tw's talk about "Introduction to spark"Giivee The
 
Serving predictive models with Redis
Serving predictive models with RedisServing predictive models with Redis
Serving predictive models with RedisTague Griffith
 

Similar to BlueHat v17 || Sednit Reloaded: The Bears' Operations From Christmas to Halloween (20)

OWC 2012 (Open Web Camp)
OWC 2012 (Open Web Camp)OWC 2012 (Open Web Camp)
OWC 2012 (Open Web Camp)
 
Sass: The Future of Stylesheets
Sass: The Future of StylesheetsSass: The Future of Stylesheets
Sass: The Future of Stylesheets
 
Cloud Storage Spring Cleaning: A Treasure Hunt
Cloud Storage Spring Cleaning: A Treasure HuntCloud Storage Spring Cleaning: A Treasure Hunt
Cloud Storage Spring Cleaning: A Treasure Hunt
 
CRM Saturday: DevOps with Jonas Rapp
CRM Saturday: DevOps with Jonas RappCRM Saturday: DevOps with Jonas Rapp
CRM Saturday: DevOps with Jonas Rapp
 
Even faster web sites
Even faster web sitesEven faster web sites
Even faster web sites
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
Apache Spark v3.0.0
Apache Spark v3.0.0Apache Spark v3.0.0
Apache Spark v3.0.0
 
node-crate: node.js and big data
 node-crate: node.js and big data node-crate: node.js and big data
node-crate: node.js and big data
 
Building prediction models with Amazon Redshift and Amazon ML
Building prediction models with  Amazon Redshift and Amazon MLBuilding prediction models with  Amazon Redshift and Amazon ML
Building prediction models with Amazon Redshift and Amazon ML
 
Doug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript ProjectsDoug McCune - Using Open Source Flex and ActionScript Projects
Doug McCune - Using Open Source Flex and ActionScript Projects
 
DSpace Under the Hood
DSpace Under the HoodDSpace Under the Hood
DSpace Under the Hood
 
Tales from the dark side: developing SDKs at scale
Tales from the dark side: developing SDKs at scaleTales from the dark side: developing SDKs at scale
Tales from the dark side: developing SDKs at scale
 
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++
 
Avoiding big data antipatterns
Avoiding big data antipatternsAvoiding big data antipatterns
Avoiding big data antipatterns
 
Big Data Analytics: Finding diamonds in the rough with Azure
Big Data Analytics: Finding diamonds in the rough with AzureBig Data Analytics: Finding diamonds in the rough with Azure
Big Data Analytics: Finding diamonds in the rough with Azure
 
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
Rdio's Alex Gaynor at Heroku's Waza 2013: Why Python, Ruby and Javascript are...
 
OCF.tw's talk about "Introduction to spark"
OCF.tw's talk about "Introduction to spark"OCF.tw's talk about "Introduction to spark"
OCF.tw's talk about "Introduction to spark"
 
Serving predictive models with Redis
Serving predictive models with RedisServing predictive models with Redis
Serving predictive models with Redis
 

More from BlueHat Security Conference

BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...BlueHat Security Conference
 
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One StoryBlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One StoryBlueHat Security Conference
 
BlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and DefenseBlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and DefenseBlueHat Security Conference
 
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come aloneBlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come aloneBlueHat Security Conference
 
BlueHat Seattle 2019 || Modern Binary Analysis with ILs
BlueHat Seattle 2019 || Modern Binary Analysis with ILsBlueHat Seattle 2019 || Modern Binary Analysis with ILs
BlueHat Seattle 2019 || Modern Binary Analysis with ILsBlueHat Security Conference
 
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.BlueHat Security Conference
 
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure ADBlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure ADBlueHat Security Conference
 
BlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
BlueHat Seattle 2019 || Autopsies of Recent DFIR InvestigationsBlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
BlueHat Seattle 2019 || Autopsies of Recent DFIR InvestigationsBlueHat Security Conference
 
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...BlueHat Security Conference
 
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...BlueHat Security Conference
 
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...BlueHat Security Conference
 
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiledBlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiledBlueHat Security Conference
 
BlueHat v18 || WSL reloaded - Let's try to do better fuzzing
BlueHat v18 || WSL reloaded - Let's try to do better fuzzingBlueHat v18 || WSL reloaded - Let's try to do better fuzzing
BlueHat v18 || WSL reloaded - Let's try to do better fuzzingBlueHat Security Conference
 
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxyBlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxyBlueHat Security Conference
 
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windowsBlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windowsBlueHat Security Conference
 
BlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat Security Conference
 
BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without deviceBlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without deviceBlueHat Security Conference
 
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...BlueHat Security Conference
 
BlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat Security Conference
 

More from BlueHat Security Conference (20)

BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
BlueHat Seattle 2019 || The cake is a lie! Uncovering the secret world of mal...
 
BlueHat Seattle 2019 || Keynote
BlueHat Seattle 2019 || KeynoteBlueHat Seattle 2019 || Keynote
BlueHat Seattle 2019 || Keynote
 
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One StoryBlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
 
BlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and DefenseBlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
BlueHat Seattle 2019 || Kubernetes Practical Attack and Defense
 
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come aloneBlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
 
BlueHat Seattle 2019 || Modern Binary Analysis with ILs
BlueHat Seattle 2019 || Modern Binary Analysis with ILsBlueHat Seattle 2019 || Modern Binary Analysis with ILs
BlueHat Seattle 2019 || Modern Binary Analysis with ILs
 
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
BlueHat Seattle 2019 || Don't forget to SUBSCRIBE.
 
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure ADBlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
 
BlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
BlueHat Seattle 2019 || Autopsies of Recent DFIR InvestigationsBlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
BlueHat Seattle 2019 || Autopsies of Recent DFIR Investigations
 
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
BlueHat Seattle 2019 || The good, the bad & the ugly of ML based approaches f...
 
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
BlueHat Seattle 2019 || Are We There Yet: Why Does Application Security Take ...
 
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
BlueHat Seattle 2019 || Building Secure Machine Learning Pipelines: Security ...
 
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiledBlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiled
 
BlueHat v18 || WSL reloaded - Let's try to do better fuzzing
BlueHat v18 || WSL reloaded - Let's try to do better fuzzingBlueHat v18 || WSL reloaded - Let's try to do better fuzzing
BlueHat v18 || WSL reloaded - Let's try to do better fuzzing
 
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxyBlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
BlueHat v18 || The hitchhiker's guide to north korea's malware galaxy
 
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windowsBlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
BlueHat v18 || Retpoline - the anti-spectre (type 2) mitigation in windows
 
BlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and well
 
BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without deviceBlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without device
 
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
BlueHat v18 || Modern day entomology - examining the inner workings of the bu...
 
BlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deception
 

Recently uploaded

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

BlueHat v17 || Sednit Reloaded: The Bears' Operations From Christmas to Halloween

Editor's Notes

  1. Hi Very happy to be here, its our first time at bluehat Impressed at the quality of the talks we saw since yesterday Thanks to the organizers for their hard work and also for inviting us
  2. Original speaker for this talk was Jessy Campos, unfortunately Jessy is no longer with ESET so you’ll be stuck with the next best thing CLIC <Thomas intro> <Alexis Intro> We both in montreal
  3. This talk is about the Sednit group, also known as Fancy Bear First: we’ll talk about what is Sednit? In fact let’s get this out of the way: Sednit is a group of attackers doing targeted attacks since 2004, mainly interested into geopolitics. They develop and maintain a large set of custom malicious tools to perform their actions. CLIC The rest of the talk is split into 2 parts: we’ll first go quickly over the major Sednit campaigns since Oct 2016, and then we’ll dive into Sednit’s tooling and what changed over that period of time.
  4. First campaign I want to start with was launched at the end of August / mid-Sept Infection vector was spearphishing with links to Sedkit Sednit’s custom exploit kit platform Targets we saw were embassies and political parties in central europe Two domain names used, lookalikes real news sites World POST journal .com (Aug 24-25) CLIC World PRESS journal .com (Sept This was the last time we saw Sedkit used. All the campaigns after that one used other techniques.
  5. As it is often the case with this group, this attack contained some pretty obvious mistakes. one example is this email CLIC Email Subject does not match the phishing link CLIC It is doubtful Dr Hunt would mis-spell United Nations this way To be honest, at the time of this campaign, we were also not on top of things – we saw this campaign happening but didn’t dig into it immediately we were in the process of publishing a lengthy whitepaper on Sednit. At some point we had to decide when to stop analyzing new things coming in and focus on getting the report out there. So we were busy with that, and also busy preparing our presentation for a very important conference CLIC
  6. happening at that same time in Redmond That’s life I guess
  7. TD For Christmas we saw a phishing campaign from the Sednit group that wasn’t publicly documented yet.
  8. The main targets: multiple MFAs and embassies from Europe Despite most of the Sednit’s phishing campaign are related to political events this one differs from the others. It’s a phishing mail from Santa Claus with the wellknown ”HOHOHO” and a note at the end of the email saying that if you have been a bad boy or girl you should not open the attachment.
  9. The attachment is the product of DC framework, documented last year by Palo Alto Network researchers . Roughly dealerschoice is a framework to generates malicious documents designed to exploit Abode Flash vulnerabilities. There are 2 variants: Variant A: A standalone variant that includes Flash exploit code packaged with a payload. Variant B: A modular variant that loads exploit code obtained dynamically from a C&C server based on the specific Flash version installed on the target. In this campaign the attachment used the variant B. The CnC delivers a flash exploit that execute SedUploader Dropper. The dropper drops and executes SedUploader Payload. After gathering some information, if the victim is interesting for the Sednit group it will drop xagent.
  10. April campaign had something different. Again starts with a phishing email CLIC In this case, the target was an employee of the Romanian MFA, with a Word document attached to it CLIC
  11. The topic of that article is the attack launched by the US military against an airbase in Syria CLIC Bascially content copy-pasted from an article in The California Courrier CLIC The document also included two embedded exploits
  12. The way it worked is that first CLIC an RCE in the Office EPS filter was exploited. This allows the execution of the frist-stage component dropper, Seduploader Dropper, CLIC That component uses the second exploit, a use-after-free LPE in win32k After gaining admin privileges, Seduploader Dropper runs the Seduploader payload component, which performs the reconnaissance phase and allow the infection to continue.
  13. At first we tried to determine to which CVE these two exploits corresponded. At some point, we realized couldn’t find any – that they were in fact 2 0days. Of course we got in touch with MSRC to confirm our findings and get the vulns patched.
  14. In fact the patches were released in the following patch Tuesday, about 10 days after we identified them
  15. This adds two new items in the list of 0days used by Sednit
  16. Time is short today to go deeper in the details of the vulnerabilities unfortunately We published the technical writeup on our blog if you are interested.
  17. Let’s continue to Summer 2017 Mid-July, Fireeye observed a wave of spearphishing emails containing a document called Hotel Reservation Form, targeting companies in the hospitality industry in Europe and Middle-East The attachments were infected with VBA macros, which dropped Seduploader https://www.fireeye.com/blog/threat-research/2017/08/apt28-targets-hospitality-sector.html
  18. Mid-October, another campaign spotted by Proofpoint Targeting MFA & private aerospace industry This time Dealer’s Choice was used to perform the initial infection, freshly updated with a new exploit against Flash Which interestingly was seen exploited a few days before by Kaspersky in an attack launched by BlackOasis group - https://www.proofpoint.com/us/threat-insight/post/apt28-racing-exploit-cve-2017-11292-flash-vulnerability-patches-are-deployed
  19. Just a few days later, end of October, another phishing campaign probably tageting participants of a cyber defense conference in Tallin was documented by Talos Again using documents infected with malicious macros. http://blog.talosintelligence.com/2017/10/cyber-conflict-decoy-document.html
  20. Just 2 says ago, McAfee noticed a Sednit campaign spreading an apparently empty Word document abusing Office Dynamic Data Exchange, or DDE to execute powershell and drop Seduploader DDE is a way to exchange data between Office applications. For example it allows a Word table to be updated with the data contained in an Excel document. Convenient but also allows to execute arbitrary code, given the user clicks on Yes on a few warning prompts. DDE is either a vulnerability or a feature depending on who you ask
  21. Some say it is an unpatched exploit CLIC AND a legit feature CLIC Oh they mean an Unpatched feature Maybe I didn’t have enough cofee today but that is just confusing Anyway point is that Sednit is abusing this mechanism https://securingtomorrow.mcafee.com/mcafee-labs/apt28-threat-group-adopts-dde-technique-nyc-attack-theme-in-latest-campaign/
  22. This was just a very high level overview of Sednit’s last campaigns, their targets and infection vectors. With regards to the tools involved: - We didn’t see *any* new tools in their arsenal - They have stopped using some of their previous tools, SedReco Sedkit (last sighing was a year ago) Most of the remaining tools that *were* used underwent some regular maintenance and minor feature updates Seduploader Xtunnel XAgent To TD
  23. Starting with SedUploader, the last main update was last april for the Trump campaign as Alexis mentioned earlier. The new feature is the ability to take screenshot of the victim Desktop. SedUploader uses a key/value system to send a report to the CnC server. The new key here is img corresponding to the screenshot function and the value is the screenshot base64 encoded The function that handles this feature present some similarities with another malware called PowerSniff. Notice that it's not the first time that they take inspiration from other malware. For example Seduploader includes code from Carberp
  24. An another tool still used by the Sednit group is XAgent Xagent is the Flagship backdoor written in C++, , downloaded by Seduploader payload used in most of the operations over the past few years, usually after a reconnaissance phase We dated XAGENT’S first apparition in Nov 2012
  25. TD We know either first hand or through third-party publications that Xagent is available on many platforms The recent one was OSX in february discover by Bitdenfer researcher An Android version discover by crowdstrike iOS by trendmicro And there is also a Linux version out there still used // android: https://www.crowdstrike.com/blog/danger-close-fancy-bear-tracking-ukrainian-field-artillery-units // iOS: http://blog.trendmicro.com/trendlabs-security-intelligence/pawn-storm-update-ios-espionage-app-found // OSX: https://labs.bitdefender.com/2017/02/new-xagent-mac-malware-linked-with-the-apt28 // Linux: ESET whitepaper section XAGENT
  26. With xagent on all platforms, the Sednit group didn't put the Windows platform on a side. Shortly after discovering the malware on the missing platform (OSX), We receive a sample with the kernelmodule version 4, as alexis said a big maintenance for XAGENT
  27. Reversing a new version of a malware is always more interesting that reversing old stuff. So we started to take a look at it and in the next slides I will describe some new stuff that we discover As the sample is still under analysis we don’t have all answers yet.
  28. For those who already seen a xagent sample in a disassembler you know for facts that reversing xagent is a tedious task. this new version doesn’t make a exception. The new features and improvements that we will cover here are the following: A new encryption method A new DGA Some improvements in the network protocol and new commands.
  29. Encryption Algorithm On version 3 most of the strings are encrypted and in most of the sample RTTI are obfuscated The screenshot show the Control Flow graph of the encryption algorithm in IDA Notice that the whole magic happen in this bloc yes we talk about a simple xor loop. Here is what it looks like in HexRays, pretty easy.
  30. On version 4 as you probably expect all strings are encrypted and in all samples RTTI are obfuscated Here is what the CFG looks like a bit more complexe The HexRays does a decent job to simplify all operations, just copy paste and DONE
  31. However I figure out in the other samples that all constants are generated at the compilation and different for each samples Not easy as I was expected
  32. Another new feature implemented in some sample is a kind of DGA. I will explain later why i call it: kind of DGA
  33. The DGA is a concatenation of 4 words +.com the 4 words are dispatched in 3 array (once array is used twice) the function that handle domains generation take a seed and the number of domains to generate. The seed is different from a sample to another so it’s probably generated at the compilation Now you can understand why I'm saying that it's kind of DGA, we can run the sample multiple times, each time, the same domains will be generated.
  34. A quick HexRays output shows us how it works. Once the seed is calculated, it will take the offset modulo the size of the array to take the encrypted word. Then the encrypted word is decrypted. That means that we never have the full array in plain text in memory.
  35. As i said before the array number 1 is used twice. To give you an idea, this DGA can generates about (149, 31, 99)149*31*99*(149-1) = 67,677,588 68Milion domains
  36. In this example I voluntarily put word arrays in plaintext. It takes the 1st word in the first array then the 1st in the second table then the 3rd one and finally the fifth in the first array.
  37. Network protocol The network protocol got few modifications mainly regarding words using for the GET/POST request generation They also added a hardcoded token used to verify if a packet is valid.
  38. The AgentKernel handle different commands from the CnC server about 12 commands The command that handle the PING REQUEST was removed. This command allow the attackers to retrieve module id from xagent sample. 3 new commands were added to interact with the LocalStorage. The LocalStorage is the kernel store. It contains both a file-based storage for the communication with the CnC server and a Microsoft registry base storage to store various configuration parameters
  39. New version of the kernel generally means new version of modules As we are still analyzing it we don’t know yet all new differences from the previous version. One thing interesting is a new module id that we didn’t sucessfully identify. We saw xagent with this only one module dropped and sometimes later another version of xagent with all modules described above. The module has some similarities with the LocalStorage It’s using another storage path probably to avoid detection Looks like data storage (Software\Microsoft\Notepad, StringFromCLSID) ModuleFileSystem?
  40. To conclude, we made a certain number of observations Sednit is still active with multiple campaigns Started using attachments containing malicious VBA macros to perform the initial infection Stopped using Sedkit last year, prefering Dealer’s choice in several cases Which is interesting, because Sedkit provides more flexibility to perform the infection: Can exploit browser, Java, Flash, Adobe Reader While DC is limited to Flash exploits The only difference is that Sedkit requires the target to visit a URL, instead of opening an attachment Xagent is still the core backdoor of the group, and being actively developed and improved on multiple platforms. Once last anectode to share before we let you go
  41. One last thing. In the last 12 months, another type of campaign related to Sednit found its way in my own mailbox I started receiving very formal legal requests from Microsoft, about the domain windowsappstore.net that we sinkholed in 2015, used by the SedReco component, We offered to hand over control to you, free of charge But the transfer didn’t seem to work out, so we let the domain expire in May of this year, and it was then grabbed by your MarkMonitor account. In any case I think I can go public with my new alias now: CLIC I’m John Doe 1 and 2, come and see me after the talk if you want to talk to me