Penetration Testing:
Persistence and Clean up
November 1st 2017
What is Persistence
1. Getting back into the system without going through the entire process again
2. Leaving a way to get back in even if the system is patched
3. Getting back in after the system reboots
4. Not being seen on the box
Good ways to leave persistence
1. Leaving an executable that will…
a. Run when the system starts
b. Execute in intervals calling back to handler
c. Run when a certain task is done
d. Set a timer to run only after x minutes of system boot
Bad ways to leave persistence
1. Backdoors
2. Leaving connections open when not in use
3. Sending a lot of data back to your handler
Ugly but effective ways of leaving persistence
1. Adding users
2. Injecting into processes for long periods of time
Metasploit Persistence
Metasploit Persistence
Startup Executable
Adding executable to Windows startup:
C:Users<user name>AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup
Adding services in linux:
../init.d/malicious.service - systemctl enable malicious.service
What is Clean up
1. Removing any trace you were there
2. Modifying not deleting log files
3. Removing scripts that you left laying around
4. Removing persistence
Windows Clean up
Linux Clean up
/var/log/messages
Remove bash history
~./bash_history
Any trace you were there in /var/log/

More Related Content

PDF
TEMS Intallation 8.0.3 Guide
PPT
Web Services 8
PDF
A Quick Look At Cassandra
PDF
Pandora FMS: End to End Exchange Plugin
PDF
Installation instructions for mscal
PPTX
Fix causes and solutions why system restore failed due to antivirus errors
PPTX
SOFTWARE Engineering (SOFTWARE TESTING).pptx
PPTX
System Development life cycle for grade 11
TEMS Intallation 8.0.3 Guide
Web Services 8
A Quick Look At Cassandra
Pandora FMS: End to End Exchange Plugin
Installation instructions for mscal
Fix causes and solutions why system restore failed due to antivirus errors
SOFTWARE Engineering (SOFTWARE TESTING).pptx
System Development life cycle for grade 11

Similar to Persistence and Cleanup (20)

PPTX
Operations on Processes and Cooperating processes
PDF
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
PDF
How to escalate privileges to administrator in latest Windows.
PPTX
Process Management of Operating Systems.
PPT
UNIT I Process management main concept.ppt
PDF
Inter Process Communication in operating system
PPTX
Process and threads
PPTX
System Analysis And Design 2011
PPTX
Chapter 6 Concurrency: Deadlock and Starvation
PDF
Parallel and Distributed Computing Chapter 12
PDF
ScalaUA - distage: Staged Dependency Injection
PPT
Processor Allocation (Distributed computing)
PPT
Integrated Test Environment for Tandem Software Applications
PPTX
Wcl303 russinovich
PDF
CEIS106_Final_Project.pptx.pdf
PDF
Troubleshooting QuickBooks Multi-User Mode Issues A Complete Guide.pdf
PPTX
Unit-6 Implemntation and Maintenance.pptx
PDF
Operating system concepts ninth edition (2012), chapter 2 solution e1
PPTX
3. Process Concept in operating system.pptx
PPTX
distributed system models syllabus from enginnering
Operations on Processes and Cooperating processes
Laporan Praktikum Keamanan Siber - Tugas 2 -Kelas C - Kelompok 3.pdf
How to escalate privileges to administrator in latest Windows.
Process Management of Operating Systems.
UNIT I Process management main concept.ppt
Inter Process Communication in operating system
Process and threads
System Analysis And Design 2011
Chapter 6 Concurrency: Deadlock and Starvation
Parallel and Distributed Computing Chapter 12
ScalaUA - distage: Staged Dependency Injection
Processor Allocation (Distributed computing)
Integrated Test Environment for Tandem Software Applications
Wcl303 russinovich
CEIS106_Final_Project.pptx.pdf
Troubleshooting QuickBooks Multi-User Mode Issues A Complete Guide.pdf
Unit-6 Implemntation and Maintenance.pptx
Operating system concepts ninth edition (2012), chapter 2 solution e1
3. Process Concept in operating system.pptx
distributed system models syllabus from enginnering
Ad

More from UTD Computer Security Group (20)

PDF
22S kickoff 2.0 (kickoff + anonymity talk)
PPTX
UTD Computer Security Group - Cracking the domain
PPTX
Forensics audio and video
PPTX
Computer networks and network security
PPTX
PPTX
Powershell crash course
PPTX
Intro to cybersecurity
PPTX
PDF
Web Exploitation
PDF
Network Exploitation
PDF
Penetration Testing: Celestial
PDF
Introduction to Exploitation
PDF
Cryptography Crash Course
PDF
Fuzzing - Part 2
PDF
Exploitation Crash Course
PDF
Fuzzing - Part 1
PDF
Protostar VM - Heap3
PDF
Heap Base Exploitation
22S kickoff 2.0 (kickoff + anonymity talk)
UTD Computer Security Group - Cracking the domain
Forensics audio and video
Computer networks and network security
Powershell crash course
Intro to cybersecurity
Web Exploitation
Network Exploitation
Penetration Testing: Celestial
Introduction to Exploitation
Cryptography Crash Course
Fuzzing - Part 2
Exploitation Crash Course
Fuzzing - Part 1
Protostar VM - Heap3
Heap Base Exploitation
Ad

Recently uploaded (20)

PPTX
Modernising the Digital Integration Hub
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPT
Geologic Time for studying geology for geologist
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
DOCX
search engine optimization ppt fir known well about this
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
The various Industrial Revolutions .pptx
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Unlock new opportunities with location data.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Modernising the Digital Integration Hub
Final SEM Unit 1 for mit wpu at pune .pptx
1 - Historical Antecedents, Social Consideration.pdf
Geologic Time for studying geology for geologist
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
search engine optimization ppt fir known well about this
observCloud-Native Containerability and monitoring.pptx
Getting started with AI Agents and Multi-Agent Systems
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
CloudStack 4.21: First Look Webinar slides
The various Industrial Revolutions .pptx
Developing a website for English-speaking practice to English as a foreign la...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
DP Operators-handbook-extract for the Mautical Institute
A comparative study of natural language inference in Swahili using monolingua...
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Unlock new opportunities with location data.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf

Persistence and Cleanup

  • 1. Penetration Testing: Persistence and Clean up November 1st 2017
  • 2. What is Persistence 1. Getting back into the system without going through the entire process again 2. Leaving a way to get back in even if the system is patched 3. Getting back in after the system reboots 4. Not being seen on the box
  • 3. Good ways to leave persistence 1. Leaving an executable that will… a. Run when the system starts b. Execute in intervals calling back to handler c. Run when a certain task is done d. Set a timer to run only after x minutes of system boot
  • 4. Bad ways to leave persistence 1. Backdoors 2. Leaving connections open when not in use 3. Sending a lot of data back to your handler
  • 5. Ugly but effective ways of leaving persistence 1. Adding users 2. Injecting into processes for long periods of time
  • 8. Startup Executable Adding executable to Windows startup: C:Users<user name>AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup Adding services in linux: ../init.d/malicious.service - systemctl enable malicious.service
  • 9. What is Clean up 1. Removing any trace you were there 2. Modifying not deleting log files 3. Removing scripts that you left laying around 4. Removing persistence
  • 11. Linux Clean up /var/log/messages Remove bash history ~./bash_history Any trace you were there in /var/log/