SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Code/DLL Injection


   ECE4112 – Internetwork Security
    Georgia Institute of Technology

     By Andrei Bersatti and Brandon Harrington



                                                 1
Agenda

•Background: Processes and DLLs
•Code Injection
   •Static Injection
   •Dynamic Injection
• Trojans and Firewall Evasion
• Defenses

                                  2
Processes and DLLs (1)

• What are processes?
• What are DLL files?
    More on this later
• Processes are running tasks that are managed by the
  Operating System. Processes may load DLL files
  (Dynamic Link Libraries, in Windows).
• Dynamic Link Libraries are executable code that can
  only be executed when called by a process.

                                                        3
Processes and DLLs (2)

• At the Lab:
   We will have a brief review of Processes.
   Use Windows Task Managers to Observe
    Processes.
   Use Sysinternals Process Explorer (view processes
    and .dll files loaded by processes).
   Process Name, Process User, Process Description,
    Process ID, Process DLL’s.

                                                    4
Code Injection

  • Code Injection: ‘Injecting’ code (putting
    executable code within) into another program.
  • Two Kinds:
     • Static Injection: Occurs prior to program execution.
     • Dynamic Injection: Occurs on or after program
       execution.

  • Original Program/Process + Injected Code =
    Malicious Program/Process
                                                              5
Code Injection – Static
Injection (1)

  • Occurs prior to execution of a program.
  • Example:
     • A program innocent.exe is modified so that
       prior to executing itself it executes code that
       has been injected to do some nasty thing.
     • Then the program is delivered to the victim
       who thinks the program is innocent (a virus? A
       trojan? A technique!).
                                                         6
Code Injection – Static Injection
                (2)

• How is it done?
  • Programs have a memory space.
  • Not all of the memory space is used, some parts of
    the memory space (usually at the end) is full of
    NOOPs. This area is known as a “cave.”
  • A cave can be overwritten without corrupting
    (other than by adding a desired functionality) the
    victim program.
                                                         7
Code Injection – Static Injection
 (3)
•In order to execute the code in the cave, the program has to
be able to reach the code.
•How?
•Every program has an Entry Point. By changing the first
instruction in the Entry Point into a JUMP to our added code,
as soon as the program starts our code executes.
•At the end of our code we add any instructions overwritten
by the JUMP and then enter a JUMP back to the 2nd
Instruction of the Entry Point.
•Program execution continues normally.
                                                                8
Code Injection – Static Injection
(4)
• In the Lab:
   •We will use OllyDbg (a debugger or decompiler) to
   modify the memory space of winmine.exe
   (Minesweeper) so that it displays a Message Box prior to
   executing.
• Need some basic ASM:
   •JMP -> A jump to an address (to an instruction).
   •PUSH -> Pushes a variable into the stack.
   •CALL -> Calls a Function, our function,
   user32.MessageBoxA, will pop the stack and take those      9
   variables as parameters.
Code Injection – Static Injection
 (5)

• Static Code Injection is not widely exploited
by Trojans.
• Understanding how Static Code Injection
works helps to understand Dynamic Code
Injection.
• Static Code Injection is harder to detect since it
may have occurred before the victim program
arrived at a particular location.
                                                  10
Dynamic Code Injection

• Used by rootkits, trojans, viruses, spyware

• Inserting code into the program’s memory
  space.

• No signs of tampering in the executable
  file. Changes done on-the-fly while the
  process is running.
                                            11
Dynamic Link Libraries (DLL)

• DLLs are shared libraries used across
  many programs.
   Instead of including the shared code in every
    executable, common functions are stored in a
    separate file accessible by the programs.
     – Reduces executable size
     – Increases code re-use
   Accessed by memory location
     – Import/Export Look-up table
                                                12
API Hooking

• Closely related to functional overloading in
  programming

• Common practice in programming mainly
  for debugging purposes.

• Uses DLL injection to implant its hook DLL

                                             13
API Hooking (continued)

• Malicious uses
   Override functions in programs to intercept
    data
   Maintain functionality but add “bad features”
   Examples:
     – An encryption algorithm in a DLL could be
       overwritten to output the data before encrypted.
     – A send web data function could be overwritten to
       send duplicate data to another server.

                                                          14
Lab Procedures
(Dynamic Injection)

• Inject DLLs into running processes using
   APM
   Aphex’s DLL Injector


• Use Process Explorer (PE) to show the
  new DLL loaded


                                             15
Trojans and Firewall Evasion (1)
•What is the relevance of Code Injection to an
Internetwork Security class?
•Trojans often use code/dll injection in an attempt
to evade the Firewall and communicate with the
Internet.
•Reverse Connection: Attacker’s computer does not
contact you; your computer contacts the attacker’s
computer!
•Access to data prior to encryption!
                                                      16
Trojans and Firewall Evasion (2)
• Static code injection scenario:
    Install.exe was downloaded from Kazaa. (Assume
     Install.exe is your favorite videogame).
    Install.exe is in reality MultiPlayerGame.exe wrapped with
     invisible Keylogger.exe.
    MultiPlayerGame.exe was injected with code to connect to
     the Internet and deliver Keylog.txt to an attacker’s IP
     address.
    Because you willingly ran a Multiplayer Game, you will
     tell your Firewall “Yes, allow MultiPlayerGame.exe to go
     outbound.”

                                                             17
Trojans and Firewall Evasion (3)
   •But like we said before, while harder to detect, Static
   Code Injection is not commonly used by trojans.
   •Dynamic Code/DLL Injection is far more common
   and far more dangerous!
   •Dynamic Code/DLL Injection scenario:
      •warningIamAtrojanServer.exe was somehow executed by
      some irresponsible person.
      •This installed in the Run registry a program that runs upon
      startup for 1 second and injects a trojan.dll into iexplore.exe.
      Trojan was a Remote Administration Tool and because
      iexplore.exe has Firewall privileges, this RAT does too!

                                                                         18
Trojans and Firewall Evasion (4)

•At the lab:
   •We will install a firewall (Sygate Personal
   Firewall)
   •We will test a firewall using Atelier Web
   Firewall Tester (tests Firewalls by trying to
   inject different processes that should already
   have privileges in the Firewall.
   •Atelier claims that most firewalls fail these
   tests!!                                          19
Trojans and Firewall Evasion (5)
• Some Trojans that use injection:
   Assassin 2.0 – Uses dynamic DLL injection for
    reverse connection.
   Beast 2.0 – Uses dynamic DLL injection for reverse
    connection.
   Nuclear Uploader – Uses dynamic DLL injection for
    reverse connection.
   Flux – Uses dynamic code injection for reverse
    connection.
   Institution 2004 – Claims to use DLL injection for
    reverse connection. Allows to remotely patch a
    process.

                                                     20
Trojans and Firewall Evasion (6)
• In the lab:

• We will play with Assassin 2.0; show the loaded .dll using Process
  Explorer.

• We will play with Institution 2004; show ability to patch processes
  remotely.

• We will play with Flux; show that it does indeed use Internet
  Explorer to evade the Firewall and yet no loaded .dll is detected.

• Tools: Process Explorer, Sygate Personal Firewall logs.



                                                                        21
Protection

• How can you protect yourself from this
  attack?

• Anti-Hook
   Essentially a firewall for DLL’s
   Rule-based
     – Allow only “trusted” dll’s to be loaded by programs


                                                        22
Detection

• Static Injection
   File Fingerprinting


• Dynamic Injection
   Scan memory for rogue DLL currently loaded

   Check import/export addresses of linked
    functions and compare with known addresses

                                             23
Lab Procedures (Defenses)

• Use Advanced Process Manipulation (APM)
  to unload DLL injected into current
  processes



• Use TDS-3 to scan memory for rogue
  DLLs

                                       24
Conclusions

• This is a common technique.

• Comparable to buffer overflows.

• If you know how the technique works,
  you can defend yourself against various
  malware that uses it

                                            25

Weitere ähnliche Inhalte

Was ist angesagt?

Windows internals Essentials
Windows internals EssentialsWindows internals Essentials
Windows internals EssentialsJohn Ombagi
 
CNIT 126: 8: Debugging
CNIT 126: 8: DebuggingCNIT 126: 8: Debugging
CNIT 126: 8: DebuggingSam Bowne
 
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbgPractical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbgSam Bowne
 
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...Sam Bowne
 
Malware Static Analysis
Malware Static AnalysisMalware Static Analysis
Malware Static AnalysisHossein Yavari
 
PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1amiable_indian
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA ProCNIT 126 5: IDA Pro
CNIT 126 5: IDA ProSam Bowne
 
Injection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniquesInjection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniquesenSilo
 
Software Engineering Process Models
Software Engineering Process Models Software Engineering Process Models
Software Engineering Process Models Satya P. Joshi
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Sam Bowne
 
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesPractical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesSam Bowne
 
S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)Jayesh Buwa
 
Software Development Life Cycle-SDLC
Software Development Life Cycle-SDLCSoftware Development Life Cycle-SDLC
Software Development Life Cycle-SDLCAdeel Rasheed
 
Forging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active DirectoryForging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active DirectoryNikhil Mittal
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro Sam Bowne
 
Abusing Symlinks on Windows
Abusing Symlinks on WindowsAbusing Symlinks on Windows
Abusing Symlinks on WindowsOWASP Delhi
 

Was ist angesagt? (20)

Windows internals Essentials
Windows internals EssentialsWindows internals Essentials
Windows internals Essentials
 
CNIT 126: 8: Debugging
CNIT 126: 8: DebuggingCNIT 126: 8: Debugging
CNIT 126: 8: Debugging
 
Linkers in compiler
Linkers in compilerLinkers in compiler
Linkers in compiler
 
PE File Format
PE File FormatPE File Format
PE File Format
 
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbgPractical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
 
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
 
Malware Static Analysis
Malware Static AnalysisMalware Static Analysis
Malware Static Analysis
 
PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA ProCNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
 
Code injection
Code injectionCode injection
Code injection
 
Injection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniquesInjection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniques
 
Software Engineering Process Models
Software Engineering Process Models Software Engineering Process Models
Software Engineering Process Models
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
 
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesPractical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
 
S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)
 
Software Development Life Cycle-SDLC
Software Development Life Cycle-SDLCSoftware Development Life Cycle-SDLC
Software Development Life Cycle-SDLC
 
Forging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active DirectoryForging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active Directory
 
Software Development Techniques
Software Development TechniquesSoftware Development Techniques
Software Development Techniques
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
 
Abusing Symlinks on Windows
Abusing Symlinks on WindowsAbusing Symlinks on Windows
Abusing Symlinks on Windows
 

Andere mochten auch

2011 03 22_kynetx1
2011 03 22_kynetx12011 03 22_kynetx1
2011 03 22_kynetx1Doc Searls
 
Had You Got It ponywang
Had You Got It ponywangHad You Got It ponywang
Had You Got It ponywangVERABLOG
 
2009 03 24 Lunchtalk
2009 03 24 Lunchtalk2009 03 24 Lunchtalk
2009 03 24 LunchtalkDoc Searls
 
Eic2008munich1
Eic2008munich1Eic2008munich1
Eic2008munich1Doc Searls
 
網路拍賣
網路拍賣網路拍賣
網路拍賣future20
 
Introduction to Web 2.0 & Free Culture
Introduction to Web 2.0 & Free CultureIntroduction to Web 2.0 & Free Culture
Introduction to Web 2.0 & Free CultureHaggen So
 
Trial For Blog 2003
Trial For Blog 2003Trial For Blog 2003
Trial For Blog 2003guestcd6f00
 
2008 06 02_scopenl-a
2008 06 02_scopenl-a2008 06 02_scopenl-a
2008 06 02_scopenl-aDoc Searls
 
20100522 bv d66 wat betekene onze plannen voor u
20100522 bv d66 wat betekene onze plannen voor u20100522 bv d66 wat betekene onze plannen voor u
20100522 bv d66 wat betekene onze plannen voor uBert Vries
 

Andere mochten auch (20)

2011 03 22_kynetx1
2011 03 22_kynetx12011 03 22_kynetx1
2011 03 22_kynetx1
 
The
TheThe
The
 
1runit4
1runit41runit4
1runit4
 
Applebee’S
Applebee’SApplebee’S
Applebee’S
 
Maps, Maps, Maps
Maps, Maps, MapsMaps, Maps, Maps
Maps, Maps, Maps
 
Had You Got It ponywang
Had You Got It ponywangHad You Got It ponywang
Had You Got It ponywang
 
Unit3segon
Unit3segonUnit3segon
Unit3segon
 
Umpc
UmpcUmpc
Umpc
 
2009 03 24 Lunchtalk
2009 03 24 Lunchtalk2009 03 24 Lunchtalk
2009 03 24 Lunchtalk
 
Dsohowto
DsohowtoDsohowto
Dsohowto
 
Eic2008munich1
Eic2008munich1Eic2008munich1
Eic2008munich1
 
網路拍賣
網路拍賣網路拍賣
網路拍賣
 
Birr
BirrBirr
Birr
 
Introduction to Web 2.0 & Free Culture
Introduction to Web 2.0 & Free CultureIntroduction to Web 2.0 & Free Culture
Introduction to Web 2.0 & Free Culture
 
Trial For Blog 2003
Trial For Blog 2003Trial For Blog 2003
Trial For Blog 2003
 
2008 06 02_scopenl-a
2008 06 02_scopenl-a2008 06 02_scopenl-a
2008 06 02_scopenl-a
 
InMemoriam
InMemoriamInMemoriam
InMemoriam
 
1ststory3
1ststory31ststory3
1ststory3
 
20100522 bv d66 wat betekene onze plannen voor u
20100522 bv d66 wat betekene onze plannen voor u20100522 bv d66 wat betekene onze plannen voor u
20100522 bv d66 wat betekene onze plannen voor u
 
Fridgend Silde
Fridgend SildeFridgend Silde
Fridgend Silde
 

Ähnlich wie Dll injection

Captain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit MitigationsCaptain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit MitigationsenSilo
 
Piratng Avs to bypass exploit mitigation
Piratng Avs to bypass exploit mitigationPiratng Avs to bypass exploit mitigation
Piratng Avs to bypass exploit mitigationPriyanka Aash
 
Fileless Malware Infections
Fileless Malware InfectionsFileless Malware Infections
Fileless Malware InfectionsRamon
 
Lecture 12 malicious software
Lecture 12 malicious software Lecture 12 malicious software
Lecture 12 malicious software rajakhurram
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPLnitinscribd
 
CNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of WindowsCNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of WindowsSam Bowne
 
CNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware BehaviorCNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware BehaviorSam Bowne
 
Ch 6: The Wild World of Windows
Ch 6: The Wild World of WindowsCh 6: The Wild World of Windows
Ch 6: The Wild World of WindowsSam Bowne
 
Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applicationsmgianarakis
 
6unit1 virus and their types
6unit1 virus and their types6unit1 virus and their types
6unit1 virus and their typesNeha Kurale
 
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 forensicsTakahiro Haruyama
 
Finfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn ViệtFinfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn ViệtSecurity Bootcamp
 
Volatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident ResponseVolatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident ResponseTakahiro Haruyama
 
CNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingCNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingSam Bowne
 
Bypass_AV-EDR.pdf
Bypass_AV-EDR.pdfBypass_AV-EDR.pdf
Bypass_AV-EDR.pdfFarouk2nd
 
Cyber attacks 101
Cyber attacks 101Cyber attacks 101
Cyber attacks 101Rafel Ivgi
 
Project Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docxProject Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docxbriancrawford30935
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsShakacon
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitDimitry Snezhkov
 

Ähnlich wie Dll injection (20)

Captain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit MitigationsCaptain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit Mitigations
 
Piratng Avs to bypass exploit mitigation
Piratng Avs to bypass exploit mitigationPiratng Avs to bypass exploit mitigation
Piratng Avs to bypass exploit mitigation
 
Fileless Malware Infections
Fileless Malware InfectionsFileless Malware Infections
Fileless Malware Infections
 
Botnets Attacks.pptx
Botnets Attacks.pptxBotnets Attacks.pptx
Botnets Attacks.pptx
 
Lecture 12 malicious software
Lecture 12 malicious software Lecture 12 malicious software
Lecture 12 malicious software
 
how-to-bypass-AM-PPL
how-to-bypass-AM-PPLhow-to-bypass-AM-PPL
how-to-bypass-AM-PPL
 
CNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of WindowsCNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of Windows
 
CNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware BehaviorCNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware Behavior
 
Ch 6: The Wild World of Windows
Ch 6: The Wild World of WindowsCh 6: The Wild World of Windows
Ch 6: The Wild World of Windows
 
Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applications
 
6unit1 virus and their types
6unit1 virus and their types6unit1 virus and their types
6unit1 virus and their types
 
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
 
Finfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn ViệtFinfisher- Nguyễn Chấn Việt
Finfisher- Nguyễn Chấn Việt
 
Volatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident ResponseVolatile IOCs for Fast Incident Response
Volatile IOCs for Fast Incident Response
 
CNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingCNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware Launching
 
Bypass_AV-EDR.pdf
Bypass_AV-EDR.pdfBypass_AV-EDR.pdf
Bypass_AV-EDR.pdf
 
Cyber attacks 101
Cyber attacks 101Cyber attacks 101
Cyber attacks 101
 
Project Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docxProject Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docx
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 

Mehr von KarlFrank99

Sandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksSandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksKarlFrank99
 
Double agent zero-day code injection and persistence technique
Double agent  zero-day code injection and persistence techniqueDouble agent  zero-day code injection and persistence technique
Double agent zero-day code injection and persistence techniqueKarlFrank99
 
Process Doppelgänging
Process Doppelgänging Process Doppelgänging
Process Doppelgänging KarlFrank99
 
Osteoblast-Osteoclast Interactions
Osteoblast-Osteoclast InteractionsOsteoblast-Osteoclast Interactions
Osteoblast-Osteoclast InteractionsKarlFrank99
 
Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...
Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...
Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...KarlFrank99
 
Osteoblast and Osteoclast Crosstalks: From OAF to Ephrin
Osteoblast and Osteoclast Crosstalks: From OAF to EphrinOsteoblast and Osteoclast Crosstalks: From OAF to Ephrin
Osteoblast and Osteoclast Crosstalks: From OAF to EphrinKarlFrank99
 
The Tight Relationship Between Osteoclasts and the Immune System
The Tight Relationship Between Osteoclasts and the Immune SystemThe Tight Relationship Between Osteoclasts and the Immune System
The Tight Relationship Between Osteoclasts and the Immune SystemKarlFrank99
 
No association between circulating concentrations of vitamin D and risk of lu...
No association between circulating concentrations of vitamin D and risk of lu...No association between circulating concentrations of vitamin D and risk of lu...
No association between circulating concentrations of vitamin D and risk of lu...KarlFrank99
 
20180426_EcbMeeting_DiffStatement
20180426_EcbMeeting_DiffStatement20180426_EcbMeeting_DiffStatement
20180426_EcbMeeting_DiffStatementKarlFrank99
 
20180420__DanskeResearch_ECBPreview
20180420__DanskeResearch_ECBPreview20180420__DanskeResearch_ECBPreview
20180420__DanskeResearch_ECBPreviewKarlFrank99
 
20180420__DanskeResearcch_WeeklyFocus
20180420__DanskeResearcch_WeeklyFocus20180420__DanskeResearcch_WeeklyFocus
20180420__DanskeResearcch_WeeklyFocusKarlFrank99
 
20180417_DanskeResearch_FX_Forecast_Update
20180417_DanskeResearch_FX_Forecast_Update20180417_DanskeResearch_FX_Forecast_Update
20180417_DanskeResearch_FX_Forecast_UpdateKarlFrank99
 
20180418_NordeaResearch_EAInfl_n_ECB
20180418_NordeaResearch_EAInfl_n_ECB20180418_NordeaResearch_EAInfl_n_ECB
20180418_NordeaResearch_EAInfl_n_ECBKarlFrank99
 
NordeaResearch_EcbWatch_20180423
NordeaResearch_EcbWatch_20180423NordeaResearch_EcbWatch_20180423
NordeaResearch_EcbWatch_20180423KarlFrank99
 
20170426_CommerzbankResearch__BullionWeeklyTechnicals
20170426_CommerzbankResearch__BullionWeeklyTechnicals20170426_CommerzbankResearch__BullionWeeklyTechnicals
20170426_CommerzbankResearch__BullionWeeklyTechnicalsKarlFrank99
 
Hs P005 Reflective Dll Injection
Hs P005 Reflective Dll InjectionHs P005 Reflective Dll Injection
Hs P005 Reflective Dll InjectionKarlFrank99
 
Atomic Bomb Tutorial En
Atomic Bomb Tutorial EnAtomic Bomb Tutorial En
Atomic Bomb Tutorial EnKarlFrank99
 
Bh Usa 07 Butler And Kendall
Bh Usa 07 Butler And KendallBh Usa 07 Butler And Kendall
Bh Usa 07 Butler And KendallKarlFrank99
 

Mehr von KarlFrank99 (20)

Sandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooksSandboxie process isolation with kernel hooks
Sandboxie process isolation with kernel hooks
 
Comodo q1 2018
Comodo q1 2018Comodo q1 2018
Comodo q1 2018
 
Double agent zero-day code injection and persistence technique
Double agent  zero-day code injection and persistence techniqueDouble agent  zero-day code injection and persistence technique
Double agent zero-day code injection and persistence technique
 
Process Doppelgänging
Process Doppelgänging Process Doppelgänging
Process Doppelgänging
 
Osteoblast-Osteoclast Interactions
Osteoblast-Osteoclast InteractionsOsteoblast-Osteoclast Interactions
Osteoblast-Osteoclast Interactions
 
Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...
Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...
Role of autophagy in tumor necrosis factor-α- induced apoptosis of osteoblast...
 
Osteoblast and Osteoclast Crosstalks: From OAF to Ephrin
Osteoblast and Osteoclast Crosstalks: From OAF to EphrinOsteoblast and Osteoclast Crosstalks: From OAF to Ephrin
Osteoblast and Osteoclast Crosstalks: From OAF to Ephrin
 
The Tight Relationship Between Osteoclasts and the Immune System
The Tight Relationship Between Osteoclasts and the Immune SystemThe Tight Relationship Between Osteoclasts and the Immune System
The Tight Relationship Between Osteoclasts and the Immune System
 
No association between circulating concentrations of vitamin D and risk of lu...
No association between circulating concentrations of vitamin D and risk of lu...No association between circulating concentrations of vitamin D and risk of lu...
No association between circulating concentrations of vitamin D and risk of lu...
 
20180426_EcbMeeting_DiffStatement
20180426_EcbMeeting_DiffStatement20180426_EcbMeeting_DiffStatement
20180426_EcbMeeting_DiffStatement
 
20180420__DanskeResearch_ECBPreview
20180420__DanskeResearch_ECBPreview20180420__DanskeResearch_ECBPreview
20180420__DanskeResearch_ECBPreview
 
20180420__DanskeResearcch_WeeklyFocus
20180420__DanskeResearcch_WeeklyFocus20180420__DanskeResearcch_WeeklyFocus
20180420__DanskeResearcch_WeeklyFocus
 
20180417_DanskeResearch_FX_Forecast_Update
20180417_DanskeResearch_FX_Forecast_Update20180417_DanskeResearch_FX_Forecast_Update
20180417_DanskeResearch_FX_Forecast_Update
 
20180418_NordeaResearch_EAInfl_n_ECB
20180418_NordeaResearch_EAInfl_n_ECB20180418_NordeaResearch_EAInfl_n_ECB
20180418_NordeaResearch_EAInfl_n_ECB
 
NordeaResearch_EcbWatch_20180423
NordeaResearch_EcbWatch_20180423NordeaResearch_EcbWatch_20180423
NordeaResearch_EcbWatch_20180423
 
20170426_CommerzbankResearch__BullionWeeklyTechnicals
20170426_CommerzbankResearch__BullionWeeklyTechnicals20170426_CommerzbankResearch__BullionWeeklyTechnicals
20170426_CommerzbankResearch__BullionWeeklyTechnicals
 
Tesi Laurea
Tesi LaureaTesi Laurea
Tesi Laurea
 
Hs P005 Reflective Dll Injection
Hs P005 Reflective Dll InjectionHs P005 Reflective Dll Injection
Hs P005 Reflective Dll Injection
 
Atomic Bomb Tutorial En
Atomic Bomb Tutorial EnAtomic Bomb Tutorial En
Atomic Bomb Tutorial En
 
Bh Usa 07 Butler And Kendall
Bh Usa 07 Butler And KendallBh Usa 07 Butler And Kendall
Bh Usa 07 Butler And Kendall
 

Kürzlich hochgeladen

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Kürzlich hochgeladen (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

Dll injection

  • 1. Code/DLL Injection ECE4112 – Internetwork Security Georgia Institute of Technology By Andrei Bersatti and Brandon Harrington 1
  • 2. Agenda •Background: Processes and DLLs •Code Injection •Static Injection •Dynamic Injection • Trojans and Firewall Evasion • Defenses 2
  • 3. Processes and DLLs (1) • What are processes? • What are DLL files?  More on this later • Processes are running tasks that are managed by the Operating System. Processes may load DLL files (Dynamic Link Libraries, in Windows). • Dynamic Link Libraries are executable code that can only be executed when called by a process. 3
  • 4. Processes and DLLs (2) • At the Lab:  We will have a brief review of Processes.  Use Windows Task Managers to Observe Processes.  Use Sysinternals Process Explorer (view processes and .dll files loaded by processes).  Process Name, Process User, Process Description, Process ID, Process DLL’s. 4
  • 5. Code Injection • Code Injection: ‘Injecting’ code (putting executable code within) into another program. • Two Kinds: • Static Injection: Occurs prior to program execution. • Dynamic Injection: Occurs on or after program execution. • Original Program/Process + Injected Code = Malicious Program/Process 5
  • 6. Code Injection – Static Injection (1) • Occurs prior to execution of a program. • Example: • A program innocent.exe is modified so that prior to executing itself it executes code that has been injected to do some nasty thing. • Then the program is delivered to the victim who thinks the program is innocent (a virus? A trojan? A technique!). 6
  • 7. Code Injection – Static Injection (2) • How is it done? • Programs have a memory space. • Not all of the memory space is used, some parts of the memory space (usually at the end) is full of NOOPs. This area is known as a “cave.” • A cave can be overwritten without corrupting (other than by adding a desired functionality) the victim program. 7
  • 8. Code Injection – Static Injection (3) •In order to execute the code in the cave, the program has to be able to reach the code. •How? •Every program has an Entry Point. By changing the first instruction in the Entry Point into a JUMP to our added code, as soon as the program starts our code executes. •At the end of our code we add any instructions overwritten by the JUMP and then enter a JUMP back to the 2nd Instruction of the Entry Point. •Program execution continues normally. 8
  • 9. Code Injection – Static Injection (4) • In the Lab: •We will use OllyDbg (a debugger or decompiler) to modify the memory space of winmine.exe (Minesweeper) so that it displays a Message Box prior to executing. • Need some basic ASM: •JMP -> A jump to an address (to an instruction). •PUSH -> Pushes a variable into the stack. •CALL -> Calls a Function, our function, user32.MessageBoxA, will pop the stack and take those 9 variables as parameters.
  • 10. Code Injection – Static Injection (5) • Static Code Injection is not widely exploited by Trojans. • Understanding how Static Code Injection works helps to understand Dynamic Code Injection. • Static Code Injection is harder to detect since it may have occurred before the victim program arrived at a particular location. 10
  • 11. Dynamic Code Injection • Used by rootkits, trojans, viruses, spyware • Inserting code into the program’s memory space. • No signs of tampering in the executable file. Changes done on-the-fly while the process is running. 11
  • 12. Dynamic Link Libraries (DLL) • DLLs are shared libraries used across many programs.  Instead of including the shared code in every executable, common functions are stored in a separate file accessible by the programs. – Reduces executable size – Increases code re-use  Accessed by memory location – Import/Export Look-up table 12
  • 13. API Hooking • Closely related to functional overloading in programming • Common practice in programming mainly for debugging purposes. • Uses DLL injection to implant its hook DLL 13
  • 14. API Hooking (continued) • Malicious uses  Override functions in programs to intercept data  Maintain functionality but add “bad features”  Examples: – An encryption algorithm in a DLL could be overwritten to output the data before encrypted. – A send web data function could be overwritten to send duplicate data to another server. 14
  • 15. Lab Procedures (Dynamic Injection) • Inject DLLs into running processes using  APM  Aphex’s DLL Injector • Use Process Explorer (PE) to show the new DLL loaded 15
  • 16. Trojans and Firewall Evasion (1) •What is the relevance of Code Injection to an Internetwork Security class? •Trojans often use code/dll injection in an attempt to evade the Firewall and communicate with the Internet. •Reverse Connection: Attacker’s computer does not contact you; your computer contacts the attacker’s computer! •Access to data prior to encryption! 16
  • 17. Trojans and Firewall Evasion (2) • Static code injection scenario:  Install.exe was downloaded from Kazaa. (Assume Install.exe is your favorite videogame).  Install.exe is in reality MultiPlayerGame.exe wrapped with invisible Keylogger.exe.  MultiPlayerGame.exe was injected with code to connect to the Internet and deliver Keylog.txt to an attacker’s IP address.  Because you willingly ran a Multiplayer Game, you will tell your Firewall “Yes, allow MultiPlayerGame.exe to go outbound.” 17
  • 18. Trojans and Firewall Evasion (3) •But like we said before, while harder to detect, Static Code Injection is not commonly used by trojans. •Dynamic Code/DLL Injection is far more common and far more dangerous! •Dynamic Code/DLL Injection scenario: •warningIamAtrojanServer.exe was somehow executed by some irresponsible person. •This installed in the Run registry a program that runs upon startup for 1 second and injects a trojan.dll into iexplore.exe. Trojan was a Remote Administration Tool and because iexplore.exe has Firewall privileges, this RAT does too! 18
  • 19. Trojans and Firewall Evasion (4) •At the lab: •We will install a firewall (Sygate Personal Firewall) •We will test a firewall using Atelier Web Firewall Tester (tests Firewalls by trying to inject different processes that should already have privileges in the Firewall. •Atelier claims that most firewalls fail these tests!! 19
  • 20. Trojans and Firewall Evasion (5) • Some Trojans that use injection:  Assassin 2.0 – Uses dynamic DLL injection for reverse connection.  Beast 2.0 – Uses dynamic DLL injection for reverse connection.  Nuclear Uploader – Uses dynamic DLL injection for reverse connection.  Flux – Uses dynamic code injection for reverse connection.  Institution 2004 – Claims to use DLL injection for reverse connection. Allows to remotely patch a process. 20
  • 21. Trojans and Firewall Evasion (6) • In the lab: • We will play with Assassin 2.0; show the loaded .dll using Process Explorer. • We will play with Institution 2004; show ability to patch processes remotely. • We will play with Flux; show that it does indeed use Internet Explorer to evade the Firewall and yet no loaded .dll is detected. • Tools: Process Explorer, Sygate Personal Firewall logs. 21
  • 22. Protection • How can you protect yourself from this attack? • Anti-Hook  Essentially a firewall for DLL’s  Rule-based – Allow only “trusted” dll’s to be loaded by programs 22
  • 23. Detection • Static Injection  File Fingerprinting • Dynamic Injection  Scan memory for rogue DLL currently loaded  Check import/export addresses of linked functions and compare with known addresses 23
  • 24. Lab Procedures (Defenses) • Use Advanced Process Manipulation (APM) to unload DLL injected into current processes • Use TDS-3 to scan memory for rogue DLLs 24
  • 25. Conclusions • This is a common technique. • Comparable to buffer overflows. • If you know how the technique works, you can defend yourself against various malware that uses it 25