OSINT Team

We teach OSINT from multiple perspectives. InfoSec experts, journalists, law enforcement and other intelligence specialists read us to grow their skills faster.

Follow publication

Red Teaming 101: Using LNK Files for Initial Access. (Part 1)

Abdellaoui Ahmed
OSINT Team
Published in
3 min readOct 4, 2024

Cybersecurity is a constantly evolving field, where red teamers are always looking for new ways to stay ahead of defenders. Gaining initial access to a target system is one of the most critical steps in any attack, and with traditional techniques like malicious macros becoming less effective, creative approaches are essential.

Before diving deeper into the content I’ll be sharing, it’s important to note that all the techniques and information I discuss are strictly for educational purposes. My goal is to help people in the cybersecurity community learn how to better defend systems by understanding the tactics used by attackers. It’s crucial to use this knowledge ethically and responsibly. Unauthorized access or misuse of these techniques is illegal and goes against the core values of cybersecurity professionals.

In this post, I’ll begin a series of tips for red teamers on how to convince their targets to fall into traps and gain initial access. Let’s dive in!

After completing reconnaissance and gathering information about your target, the next step is to prepare a malicious file to infect the target. This can be done by sending a spear-phishing email or sharing a link via social media platforms.

Traditionally, attackers used malicious macros in documents. However, since Microsoft disabled macros by default, this method has become more difficult to exploit. This change forced red teams and attackers to seek new social engineering techniques to trick targets into clicking or downloading malicious files.

One effective method is using a shortcut (LNK) file to deliver your first-stage payload and establish a reverse shell. The process involves three key steps:

  1. Creating a malicious LNK file.
  2. Using the LNK file for privilege escalation.
  3. Employing social engineering to trick the user into executing the malware.

Create Your Malicious Shortcut

We will use PowerShell to create the malicious shortcut as follows:

  1. Create your shell object: Open PowerShell with Administrator Privileges
$shellcode = New-Object -ComObject WScript.Shell

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in OSINT Team

We teach OSINT from multiple perspectives. InfoSec experts, journalists, law enforcement and other intelligence specialists read us to grow their skills faster.

Written by Abdellaoui Ahmed

Experienced cybersecurity professionnel with Red and Blue Team expertise, passionate about cutting-edge tech and AI.

Responses (1)

Write a response