SlideShare a Scribd company logo
1 of 20
Dr. Muhammad Abid,
DCIS, PIEAS
Cuckoo Sandbox Architecture
Agent
Inside the Virtual Machine - Agent
Listening Agent
Accepts a connection
Cuckoo host connects
Cuckoo host sends zip file
Agent unpacks zip file
Analyzer Python code
Configuration files
The sample to analyze
Agent runs the Analyzer
Inside the Virtual Machine - Analyzer
Using configuration file “analysis.conf” setup
different parameters, e.g. pipe names, result
server ip and port, analysis package name,
etc.
Create command pipe “self.command_pipe”
and log pipe “self.log_pipe_server”
Command pipe: enables communication b/w
cuckoo monitor & analyzer
Log pipe: enables communication b/w
cuckoo monitor & cuckoo host (real-time)
Inside the Virtual Machine - Analyzer
Analysis package: determines the analysis
package for a file sample or URL
For ULR analysis package is “ie”
For PE files analysis package is “exe”
Analysis package runs the ULR or sample
Start Auxiliary modules one by one:
Inside the Virtual Machine - Analyzer
Hide the Cuckoo Analyzer & Cuckoo Agent
Initialize zer0m0n with our compiled Yara
rules
Run the analysis package
Inject monitor monitor-x86.dll using inject-x86.exe
Analyzer waits for analysis to complete
Once analysis completed it reports to agent
using POST to http://127.0.0.1:8000/status
Cuckoo Monitor Communication with
Analyzer/ Cuckoo Host
VM: File being deleted or overwritten
Use pipe("FILE_DEL:%Z", filepath); inside
hook handler
Examples of hook handlers(hooks.c):
BOOL WINAPI New_kernel32_DeleteFileW
BOOL WINAPI
New_kernel32_MoveFileWithProgressW
NTSTATUS WINAPI New_ntdll_NtDeleteFile
Analyzer uploads file to cuckoo host with
process pids who accessed this file
CommandPipeHandler: _handle_file_del
VM: Write to a New/Existing File
Use pipe("FILE_NEW:%Z", filepath); inside
hook handler
Examples of hook handlers(hooks.c):
NTSTATUS WINAPI New_ntdll_NtWriteFile
HRESULT WINAPI
New_urlmon_URLDownloadToFileW
Analyzer uploads file to cuckoo host with
process pids who accessed this file. This
happens after analysis completed.
CommandPipeHandler: _handle_file_new
VM: Cuckoo Monitor Injection
Use pipe("PROCESS:%d", pid);
Examples of hook handlers(hooks.c):
HANDLE WINAPI
New_kernel32_CreateRemoteThread
NTSTATUS WINAPI
New_ntdll_RtlCreateUserThread
NTSTATUS WINAPI
New_ntdll_NtCreateThreadEx
Analyzer injects cuckoo monitor dll.
CommandPipeHandler: _handle_process
VM: File Move
Use pipe("FILE_MOVE:%Z::%Z", input,
output);
Examples of hook handlers(hooks.c):
BOOL WINAPI
New_kernel32_MoveFileWithProgressW
NTSTATUS WINAPI
New_ntdll_NtSetInformationFile
Analyzer replaces old file name with new file
name. Once analysis completed analyzer
uploads file to cuckoo host with process pids
(including old file pids)
CommandPipeHandler: _handle_move_file
Other Commands for Command Pipe
pipe("PROCESS2:%d,%d,%d", pid, tid,
HOOK_MODE_ALL);
pipe("KILL:%d", pid);
pipe("INFO:io=NULL");
pipe("DUMPMEM:%d", pid);
pipe("CRITICAL:Handle case where the log
handle is closed "
Other Commands for Command Pipe
pipe("DEBUG:Following legitimate IE11
process: %Z!", cmdline);
pipe("DEBUG:Error resolving function
%z!%z.",
pipe("WARNING:StartupInfo is none, this
should never happen.");
pipe("LOADED:%d,%d",
get_current_process_id(), g_monitor_track);
Format Specifiers in Command Pipe
z -> (char *) -> zero-terminated ascii string
Z -> (wchar_t *) -> zero-terminated unicode
string
s -> (int, char *) -> ascii string with length
S -> (int, wchar_t *) -> unicode string with
length
o -> (UNICODE_STRING *) -> unicode
string
Format Specifiers in Command Pipe
O -> (OBJECT_ATTRIBUTES *) -> wrapper
around unicode string
d -> (int) -> integer
x -> (int) -> hexadecimal integer
X -> (uint64_t) -> 64-bit hexadecimal integer
p -> (void *) -> pointer as hexadecimal
cuckoo_monitor_analyzer_communication - Copy.pptx
cuckoo_monitor_analyzer_communication - Copy.pptx
cuckoo_monitor_analyzer_communication - Copy.pptx
cuckoo_monitor_analyzer_communication - Copy.pptx
cuckoo_monitor_analyzer_communication - Copy.pptx

More Related Content

Similar to cuckoo_monitor_analyzer_communication - Copy.pptx

Jump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & GithubJump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & Githubhubx
 
First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]Phil Huggins FBCS CITP
 
Secure your Web Application With The New Python Audit Hooks
Secure your Web Application With The New Python Audit HooksSecure your Web Application With The New Python Audit Hooks
Secure your Web Application With The New Python Audit HooksNicolas Vivet
 
Reproducible, Automated and Portable Computational and Data Science Experimen...
Reproducible, Automated and Portable Computational and Data Science Experimen...Reproducible, Automated and Portable Computational and Data Science Experimen...
Reproducible, Automated and Portable Computational and Data Science Experimen...Ivo Jimenez
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsAndrey Karpov
 
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul BakkerJDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul BakkerPROIDEA
 
Build resource server & client for OCF Cloud (2018.8.30)
Build resource server & client for OCF Cloud (2018.8.30)Build resource server & client for OCF Cloud (2018.8.30)
Build resource server & client for OCF Cloud (2018.8.30)남균 김
 
Security and dev ops for high velocity organizations
Security and dev ops for high velocity organizationsSecurity and dev ops for high velocity organizations
Security and dev ops for high velocity organizationsChef
 
Denis Zhuchinski Ways of enhancing application security
Denis Zhuchinski Ways of enhancing application securityDenis Zhuchinski Ways of enhancing application security
Denis Zhuchinski Ways of enhancing application securityАліна Шепшелей
 
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"Inhacking
 
PVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsPVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsAndrey Karpov
 
Chris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks TutorialChris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks TutorialCohesive Networks
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to TestZsolt Fabok
 
PVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CIPVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CIAndrey Karpov
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)HungWei Chiu
 
The Popper Experimentation Protocol and CLI tool
The Popper Experimentation Protocol and CLI toolThe Popper Experimentation Protocol and CLI tool
The Popper Experimentation Protocol and CLI toolIvo Jimenez
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to KubernetesPaul Czarkowski
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayAnne Nicolas
 

Similar to cuckoo_monitor_analyzer_communication - Copy.pptx (20)

Jump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & GithubJump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & Github
 
First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]First Responders Course - Session 7 - Incident Scope Assessment [2004]
First Responders Course - Session 7 - Incident Scope Assessment [2004]
 
Deployment automation
Deployment automationDeployment automation
Deployment automation
 
Secure your Web Application With The New Python Audit Hooks
Secure your Web Application With The New Python Audit HooksSecure your Web Application With The New Python Audit Hooks
Secure your Web Application With The New Python Audit Hooks
 
Reproducible, Automated and Portable Computational and Data Science Experimen...
Reproducible, Automated and Portable Computational and Data Science Experimen...Reproducible, Automated and Portable Computational and Data Science Experimen...
Reproducible, Automated and Portable Computational and Data Science Experimen...
 
Python3 (boto3) for aws
Python3 (boto3) for awsPython3 (boto3) for aws
Python3 (boto3) for aws
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul BakkerJDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
 
Build resource server & client for OCF Cloud (2018.8.30)
Build resource server & client for OCF Cloud (2018.8.30)Build resource server & client for OCF Cloud (2018.8.30)
Build resource server & client for OCF Cloud (2018.8.30)
 
Security and dev ops for high velocity organizations
Security and dev ops for high velocity organizationsSecurity and dev ops for high velocity organizations
Security and dev ops for high velocity organizations
 
Denis Zhuchinski Ways of enhancing application security
Denis Zhuchinski Ways of enhancing application securityDenis Zhuchinski Ways of enhancing application security
Denis Zhuchinski Ways of enhancing application security
 
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
 
PVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsPVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOps
 
Chris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks TutorialChris Swan ONUG Academy - Container Networks Tutorial
Chris Swan ONUG Academy - Container Networks Tutorial
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test
 
PVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CIPVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CI
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
The Popper Experimentation Protocol and CLI tool
The Popper Experimentation Protocol and CLI toolThe Popper Experimentation Protocol and CLI tool
The Popper Experimentation Protocol and CLI tool
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 

Recently uploaded

Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfOverkill Security
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 

Recently uploaded (20)

Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

cuckoo_monitor_analyzer_communication - Copy.pptx

  • 3. Inside the Virtual Machine - Agent Listening Agent Accepts a connection Cuckoo host connects Cuckoo host sends zip file Agent unpacks zip file Analyzer Python code Configuration files The sample to analyze Agent runs the Analyzer
  • 4. Inside the Virtual Machine - Analyzer Using configuration file “analysis.conf” setup different parameters, e.g. pipe names, result server ip and port, analysis package name, etc. Create command pipe “self.command_pipe” and log pipe “self.log_pipe_server” Command pipe: enables communication b/w cuckoo monitor & analyzer Log pipe: enables communication b/w cuckoo monitor & cuckoo host (real-time)
  • 5. Inside the Virtual Machine - Analyzer Analysis package: determines the analysis package for a file sample or URL For ULR analysis package is “ie” For PE files analysis package is “exe” Analysis package runs the ULR or sample Start Auxiliary modules one by one:
  • 6. Inside the Virtual Machine - Analyzer Hide the Cuckoo Analyzer & Cuckoo Agent Initialize zer0m0n with our compiled Yara rules Run the analysis package Inject monitor monitor-x86.dll using inject-x86.exe Analyzer waits for analysis to complete Once analysis completed it reports to agent using POST to http://127.0.0.1:8000/status
  • 7. Cuckoo Monitor Communication with Analyzer/ Cuckoo Host
  • 8. VM: File being deleted or overwritten Use pipe("FILE_DEL:%Z", filepath); inside hook handler Examples of hook handlers(hooks.c): BOOL WINAPI New_kernel32_DeleteFileW BOOL WINAPI New_kernel32_MoveFileWithProgressW NTSTATUS WINAPI New_ntdll_NtDeleteFile Analyzer uploads file to cuckoo host with process pids who accessed this file CommandPipeHandler: _handle_file_del
  • 9. VM: Write to a New/Existing File Use pipe("FILE_NEW:%Z", filepath); inside hook handler Examples of hook handlers(hooks.c): NTSTATUS WINAPI New_ntdll_NtWriteFile HRESULT WINAPI New_urlmon_URLDownloadToFileW Analyzer uploads file to cuckoo host with process pids who accessed this file. This happens after analysis completed. CommandPipeHandler: _handle_file_new
  • 10. VM: Cuckoo Monitor Injection Use pipe("PROCESS:%d", pid); Examples of hook handlers(hooks.c): HANDLE WINAPI New_kernel32_CreateRemoteThread NTSTATUS WINAPI New_ntdll_RtlCreateUserThread NTSTATUS WINAPI New_ntdll_NtCreateThreadEx Analyzer injects cuckoo monitor dll. CommandPipeHandler: _handle_process
  • 11. VM: File Move Use pipe("FILE_MOVE:%Z::%Z", input, output); Examples of hook handlers(hooks.c): BOOL WINAPI New_kernel32_MoveFileWithProgressW NTSTATUS WINAPI New_ntdll_NtSetInformationFile Analyzer replaces old file name with new file name. Once analysis completed analyzer uploads file to cuckoo host with process pids (including old file pids) CommandPipeHandler: _handle_move_file
  • 12. Other Commands for Command Pipe pipe("PROCESS2:%d,%d,%d", pid, tid, HOOK_MODE_ALL); pipe("KILL:%d", pid); pipe("INFO:io=NULL"); pipe("DUMPMEM:%d", pid); pipe("CRITICAL:Handle case where the log handle is closed "
  • 13. Other Commands for Command Pipe pipe("DEBUG:Following legitimate IE11 process: %Z!", cmdline); pipe("DEBUG:Error resolving function %z!%z.", pipe("WARNING:StartupInfo is none, this should never happen."); pipe("LOADED:%d,%d", get_current_process_id(), g_monitor_track);
  • 14. Format Specifiers in Command Pipe z -> (char *) -> zero-terminated ascii string Z -> (wchar_t *) -> zero-terminated unicode string s -> (int, char *) -> ascii string with length S -> (int, wchar_t *) -> unicode string with length o -> (UNICODE_STRING *) -> unicode string
  • 15. Format Specifiers in Command Pipe O -> (OBJECT_ATTRIBUTES *) -> wrapper around unicode string d -> (int) -> integer x -> (int) -> hexadecimal integer X -> (uint64_t) -> 64-bit hexadecimal integer p -> (void *) -> pointer as hexadecimal