How Hackers Use netsh.exe For Persistence & Code Execution (Sliver C2)

How Hackers Use netsh.exe For Persistence & Code Execution (Sliver C2)

Source: YouTube · John Hammond · published Jun 29, 2023 · 19:01

Cybersecurity
No ratings yet Log in to rate
Transcript Available
Description

This video demonstrates using netsh, a Windows utility, as a "living off the land" binary for code execution and persistence by embedding Sliver C2 shellcode into a custom netsh helper DLL 0:00-0:36.

Key Takeaways:
• Netsh is a well-known living off the land technique documented in the MITRE ATT&CK framework that can be leveraged for persistence 0:16-0:25
• Sliver C2 framework, a free alternative to Cobalt Strike, is used to generate shellcode for Windows implants despite large file sizes due to its Golang implementation 0:42-2:49
• The video compiles a custom netsh helper DLL in Visual Studio using C++ code from Outflank, embedding Sliver shellcode for execution 8:04-11:17
• The technique requires administrator privileges as it modifies the registry at HKLM\SOFTWARE\Microsoft\netsh to add the helper DLL 12:47-14:30
• When successful, running netsh executes the embedded shellcode, establishing a Sliver C2 session allowing full system control 15:49-16:38

This demonstration shows how attackers can blend legitimate Windows utilities with custom malicious code to establish persistence while potentially evading detection.

Sources:

  • 0:00-0:36 Introduction to netsh as a living off the land binary
  • 0:16-0:25 Mention of MITRE ATT&CK framework documentation
  • 0:42-2:49 Setting up and explaining Sliver C2 framework
  • 8:04-11:17 Creating and compiling the netsh helper DLL
  • 12:47-14:30 Registry

Generate CPE Credits

Generate a professional CPE document from this video's transcript.

Estimated credit: 0.5 CPE hours

Estimate uses the video runtime (1 hour ≈ 1 CPE, rounded to the nearest 0.5, minimum 0.5, maximum 2.0). The final amount can be lower after review, never higher.

Topic: Cybersecurity. Commonly maps to: Security and Risk Management, Security Operations. Exact CISSP domains are assigned during generation.

CISSP Domain Mapping
Learning Objectives
Self-Assessment Questions
PDF Export Ready

Free account. One generation at a time, with a daily limit.

CPEBuddy is independent and not affiliated with or endorsed by ISC2, ISACA, or any certification body. Exports are formatted for common CPE submissions; acceptance is at your certification body's discretion.

Watch on YouTube

Transcript Preview

First 800 characters of the transcript

recently I saw a tweet that showcased net sh the Windows command line utility used as a low bin or living off the land binary that could be used for code execution or persistence and I thought wow this is really cool this is really neat but it turns out hey this is actually a very well-known technique this is some tradecraft that has actually been seen for a few years and is covered in the miter attack framework there are pen tests or I read team notes for it they're even a GitHub repository from outflank that showcases some of the code alongside OG tweets showcase and I just thought you know what maybe this would be cool even if it has been done before to maybe take it up a notch up the ante and do something else that could be a little bit different other than you know popping our cheesy …