Thursday, June 1, 2023

Hacking Windows 95, Part 2

In the Hacking Windows 95, part 1 blog post, we covered that through a nasty bug affecting Windows 95/98/ME, the share password can be guessed in no time. In this article, I'm going to try to use this vulnerability to achieve remote code execution (with the help of publicly available tools only).

The first thing we can do when we have read access to the Windows directory through the share, is to locate all the *.pwl files on the c:\windows directory, copy them to your machine where Cain is installed, switch to Cracker tab, pwl files, load the pwl file, add username based on the filename, and try to crack it. If you can't crack it you might still try to add a .pwl file where you already know the password in the remote windows directory. Although this is a fun post-exploitation task, but still, no remote code execution. These passwords are useless without physical access.


One might think that after having a share password and user password, it is easy to achieve remote code execution. The problem is:
  • there is no "at" command (available since Windows 95 plus!)
  • there is no admin share
  • there is no RPC
  • there is no named pipes
  • there is no remote registry
  • there is no remote service management
If you think about security best practices, disabling unnecessary services is always the first task you should do. Because Windows 95 lacks all of these services, it is pretty much secure!

During my quest for a tool to hack Windows 95, I came across some pretty cool stuff:
LanSpy

But the best of the best is Fluxay, which has been written by chinese hackers. It is the metasploit from the year 2000. A screenshot is worth more than a 1000 words. 4 screenshot > 4 thousand words :)





It is pretty hard to find the installer, but it is still out there!

But at the end, no remote code execution for me.

My idea here was that if I can find a file which executes regularly (on a scheduled basis), I can change that executable to my backdoor and I'm done. Although there is no scheduler in the default Windows 95, I gave it a try. 

Let's fire up taskman.exe to get an idea what processes are running:


Looks like we need a more powerful tool here, namely Process Explorer. Let's try to download this from oldapps.com:


LOL, IE3 hangs, can't render the page. Copying files to the Win95 VM is not that simple, because there are no shared folders in Win95 VM. And you can't use pendrives either, Win95 can't handle USB (at least the retail version). After downloading the application with a newer browser from oldapps, let's start Process Explorer on the test Windows 95.


Don't try to download the Winsocks 2 patch from the official MS site, it is not there anymore, but you can download it from other sites

Now let's look at the processes running:


After staring it for minutes, turned out it is constant, no new processes appeared.
Looking at the next screenshot, one can notice this OS was not running a lot of background processes ...


My current Win7 has 1181 threads and 84 processes running, no wonder it is slow as hell :)

We have at least the following options:
  1. You are lucky and not the plain Windows 95 is installed, but Windows 95 Plus! The main difference here is that Windows 95 Plus! has built-in scheduler, especially the "at" command. Just overwrite a file which is scheduled to execution, and wait. Mission accomplished!
  2. Ping of death - you can crash the machine (no BSOD, just crash) with long (over 65535 bytes) ICMP ping commands, and wait for someone to reboot it. Just don't forget to put your backdoor on the share and add it to autoexec.bat before crashing it. 
  3. If your target is a plain Windows 95, I believe you are out of luck. No at command, no named pipes, no admin share, nothing. Meybe you can try to fuzz port 137 138 139, and write an exploit for those. Might be even Ping of Death is exploitable?
Let's do the first option, and hack Windows 95 plus!
Look at the cool features we have by installing Win95 Plus!


Cool new boot splash screen!


But our main interest is the new, scheduled tasks!


Now we can replace diskalm.exe with our backdoor executable, and wait maximum one hour to be scheduled.

Instead of a boring text based tutorial, I created a YouTube video for you. Based on the feedbacks on my previous tutorialz, it turned out I'm way too old, and can't do interesting tutorials. That's why I analyzed the cool skiddie videoz, and found that I have to do the followings so my vidz won't suck anymore:
  • use cool black windows theme
  • put meaningless performance monitor gadgets on the sidebar
  • use a cool background, something related with hacking and skullz
  • do as many opsec fails as possible
  • instead of captions, use notepad with spelling errorz
  • there is only one rule of metal: Play it fuckin' loud!!!!
Related links
  1. Hack Tools For Pc
  2. Hack Tools For Ubuntu
  3. Hacking Tools And Software
  4. Hacking Tools For Windows 7
  5. Hacking Tools For Pc
  6. Pentest Tools For Mac
  7. Beginner Hacker Tools
  8. Hacker Tools Github
  9. Hacking Tools 2019
  10. Hacking Tools For Kali Linux
  11. Pentest Tools Linux
  12. Hack Tools Pc
  13. Hack Tools Mac
  14. Hacker Tool Kit
  15. Hacking Tools Usb
  16. Hack Tools 2019
  17. World No 1 Hacker Software
  18. Usb Pentest Tools
  19. Hacking Tools For Games
  20. Pentest Tools Tcp Port Scanner
  21. Hack Tools For Games
  22. Best Hacking Tools 2020
  23. Pentest Tools Download
  24. Hacker Tools For Windows
  25. Pentest Tools Website
  26. Hacking Tools Online
  27. Hacking Tools And Software
  28. Pentest Tools For Mac
  29. Pentest Tools Nmap
  30. Pentest Tools For Windows
  31. Hak5 Tools
  32. Pentest Tools For Windows
  33. Hacking Tools For Kali Linux
  34. Hacking Tools Mac
  35. Hacker Tools Github
  36. Hack Tools 2019
  37. Hack Tools Download
  38. Kik Hack Tools
  39. Hack Tools
  40. Black Hat Hacker Tools
  41. Pentest Tools Subdomain
  42. Hack Tools
  43. What Are Hacking Tools
  44. Best Pentesting Tools 2018
  45. Hacker
  46. Hacking Tools Hardware
  47. New Hacker Tools
  48. Pentest Tools Review
  49. Pentest Tools Alternative
  50. Hacking Tools For Kali Linux
  51. Hacking Tools Name
  52. Pentest Tools Windows
  53. Hack Website Online Tool
  54. Beginner Hacker Tools
  55. Hacker Tools Windows
  56. Kik Hack Tools
  57. Pentest Tools For Windows
  58. How To Install Pentest Tools In Ubuntu
  59. Hacker Tools Apk
  60. Hacking Tools Online
  61. Hack Tools For Mac
  62. Tools 4 Hack
  63. Ethical Hacker Tools
  64. New Hacker Tools
  65. Hack Website Online Tool
  66. Pentest Tools Download

No comments:

Post a Comment