View difference between Paste ID: TKvJD8wr and nBLrDUFB
SHOW: | | - or go back to the newest paste.
1
##
2
## NanoHoneyPot V2 written 011317:0056 by BJP
3
## 
4
## NanoHoneyPot V2 is a simple Arduino-based honeypot that
5
## utilizes the on-board serial port to produce a realistic
6
## looking 1980's era bank credit card processing gateway
7
## that has been seemingly exposed to the internet. The
8
## goal here is to lure would-be hackers into wasting their
9
## time on the promise of a big score. Properly deployed,
10
## this sketch also has an interesting educational value;
11
## you'll get to see just how quickly (and how often!) a
12
## system placed on the internet is subject to intrusion 
13
## attempts.
14
## 
15
## NanoHoneyPot V2 Features:
16
## 
17
## Upper-case only text for added old-sk00l realism! :)
18
## Beautifully slow 1200 baud output!
19
## Archaic-looking fake error messages!
20
## Realistic input processing delay times!
21
## Scary FDIC anti-hacking deterrant message!
22
##
23
## Requirements:
24
##
25
## o   A white hat. ;)
26
## o   A bowl of popcorn.
27
## o   A willingness to watch hackers fail. 
28
## o   An Arduino Uno or better.
29
## o   A 1602-compatible 16x2 LCD screen (edit pins to taste..)
30
## o   A Linux box of some sort running tcpser at 1200 bps:
31
## Ex: tcpser -I -i "s0=1" -tiI -d/dev/ttyACM0 -s1200 -p6400 
32
## o   The port of your choice opened on your router/firewall, 
33
##     and NAT'ed to port 6400 on the box running tcpser.
34
##
35
## Usage:
36
## 
37
## Compile and push this sketch to an Arduino with a 16x2 LCD
38
## with the correct pinout for the LCD (see below)
39
## Then, connect the Arduino via USB to a Linux host.
40
## As root on the Linux host, run tcpser against the device
41
## node your Arduino ends up enumerating as (/dev/ttyACM0, 
42
## probably) using 1200 bps as a port speed, and whatever
43
## TCP port you want. I'm using 6400 in my example. Then,
44
## at your router/firewall, expose port 23, and have any
45
## TCP/UDP traffic to port 23 redirected to the IP
46
## of your Linux box on port 6400. This will allow your
47
## Arduino honeypot to be visible to the world.
48
## 
49
50
#include <LiquidCrystal.h>
51
52
LiquidCrystal lcd(8,9,4,5,6,7);
53
String user;  
54
String password;      
55
String dump;
56
int attempts=0;
57
58
void setup() 
59
{
60
  Serial.begin(1200);   
61
  lcd.begin(16, 2);
62
  lcd.clear();
63
  lcd.setCursor(0, 0);    
64
  lcd.print("NanoHoneyPot v2!");
65
  lcd.setCursor(0, 1);
66
  lcd.print("Status: Waiting");  
67
}
68
 
69
void loop() 
70
{ 
71
    while (Serial.available()==0)
72
    {
73
      delay(100);
74
    }
75
    
76
    attempts++;
77
    lcd.clear();
78
    lcd.setCursor(0, 0);    
79
    lcd.print("NanoHoneyPot v2!");
80
    lcd.setCursor(0, 1);
81
    lcd.print("Attempts:");
82
    lcd.print(attempts);  
83
    showBanner();
84
    getLogin();
85
    getPassword();
86
    waitForInput();
87
    delay(342);    
88
    Serial.println("0919-0FF: INVALID CVV ENTRY / 0 OF 394 RECORDS RETURNED   ?REENTER");     
89
    
90
}
91
92
void showBanner()
93
{
94
  Serial.println(F("\n\n\n\n\n\n\n\n\n\n\n\n\n\nFDIC COLUMBIA SAVINGS AND LOAN CC PROC TELEHUB\n\n"));
95
  Serial.println(F("UNAUTHORIZED USE PROHIBITED BY LAW P.L. 81-797, 64 STAT. 783\n\n"));
96
  dump=Serial.readString();
97
}
98
99
void waitForInput()
100
{
101
  while (Serial.available()==0) {}
102
}
103
104
void getLogin()
105
{
106
  Serial.print(F("\nLOGIN: "));
107
  waitForInput();
108
  user=Serial.readString();
109
  user.trim();  
110
  lcd.clear();
111
  lcd.setCursor(0, 0);
112
  lcd.print("U:"+user);
113
}
114
115
void getPassword()
116
{
117
  Serial.print(F("PASSWORD: "));        
118
  waitForInput();
119
  password=Serial.readString();   
120
  password.trim(); 
121
  lcd.setCursor(0, 1);
122
  lcd.print("P:"+password);
123
}