Simple Honeypot server based on Wiznet W7500, support 7 different sockets

Dependencies:   HoneyPot SDFileSystem WIZnetInterface mbed-src

Fork of W7500-honeypot by Shlomi Ruder

Honeypot Server Example w7500 Wiznet

/media/uploads/proxytype/honeypot.png

Simple example of Honeypot server for detecting unwanted network behaviors over the network and report it to the administrator, for example, when the attacker scan the network and try to detect all the machines and services.

the honeypot is the dark corner of the network, is a place that nobody should visit and if some one does, it's not for legitimate reasons.

Configuration

first setup is define the honeypot server and the master address that will be access to administrator panel,

//honeypot address - static
char ip_addr[] = "192.168.1.111";

//master address - static
char master_addr[] = "192.168.1.6";

char subnet_mask[] = "255.255.255.0";
char gateway_addr[] = "192.168.1.1";

copy the html files inside html folder directly to root folder of the SD card.

Sockets

we can define up to 7 different ports (sockets) for detecting,

  int  ports[7] = {80, 22, 138, 21, 23, 35, 3306};
    
    
    if (!svr.start(ports, 7, master_addr, &eth)) {

        printf("Server not starting !");
        exit(0);
    }
    
    while(1) {
        svr.poll();
    }

Http Response

there is two different modes when setting socket on port 80, one for ordinary users and another for the master of the device.

Visitor

/media/uploads/proxytype/visitor.png

Master

/media/uploads/proxytype/administrator_panel.jpg

Committer:
proxytype
Date:
Sun Sep 03 14:44:19 2017 +0000
Revision:
2:2c1e0056bb9d
Parent:
1:496ea8c93386

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
proxytype 1:496ea8c93386 1 <!DOCTYPE html>
proxytype 1:496ea8c93386 2 <html>
proxytype 1:496ea8c93386 3 <head>
proxytype 1:496ea8c93386 4 <title>Honeypot - We Just Catch You!</title>
proxytype 1:496ea8c93386 5 </head>
proxytype 1:496ea8c93386 6 <body style="background-color:#000000;color:#ffffff; font-family:arial;margin:0px">
proxytype 1:496ea8c93386 7 <div style="background-color:#f44242;font-size:32px; padding:5px">Administrator Panel</div>
proxytype 1:496ea8c93386 8 <div style="margin:5px;"><b>Hello, Master</b></div>
proxytype 1:496ea8c93386 9 <div style="color:#FFCC00;padding:5px; width:250px">
proxytype 1:496ea8c93386 10
proxytype 1:496ea8c93386 11 <div style="margin:5px; height:18px">
proxytype 1:496ea8c93386 12 <div style="float:left"> Port: <span style="color:#ffffff"><b>$[port]</b></div>
proxytype 1:496ea8c93386 13 <div style="float:right"> Hits: <span style="color:#ffffff"><b>$[hit]</b></div>
proxytype 1:496ea8c93386 14 </div>
proxytype 1:496ea8c93386 15
proxytype 1:496ea8c93386 16 <div style="background-color:#4286f4;width:100%; height:2px"></div>
proxytype 1:496ea8c93386 17
proxytype 1:496ea8c93386 18 <div style="margin:5px; height:18px">
proxytype 1:496ea8c93386 19 <div style="float:left"> Port: <span style="color:#ffffff"><b>$[port]</b></div>
proxytype 1:496ea8c93386 20 <div style="float:right"> Hits: <span style="color:#ffffff"><b>$[hit]</b></div>
proxytype 1:496ea8c93386 21 </div>
proxytype 1:496ea8c93386 22
proxytype 1:496ea8c93386 23 <div style="background-color:#4286f4;width:100%; height:2px"></div>
proxytype 1:496ea8c93386 24
proxytype 1:496ea8c93386 25 <div style="margin:5px; height:18px">
proxytype 1:496ea8c93386 26 <div style="float:left"> Port: <span style="color:#ffffff"><b>$[port]</b></div>
proxytype 1:496ea8c93386 27 <div style="float:right"> Hits: <span style="color:#ffffff"><b>$[hit]</b></div>
proxytype 1:496ea8c93386 28 </div>
proxytype 1:496ea8c93386 29
proxytype 1:496ea8c93386 30 <div style="background-color:#4286f4;width:100%; height:2px"></div>
proxytype 1:496ea8c93386 31
proxytype 1:496ea8c93386 32 <div style="margin:5px; height:18px">
proxytype 1:496ea8c93386 33 <div style="float:left"> Port: <span style="color:#ffffff"><b>$[port]</b></div>
proxytype 1:496ea8c93386 34 <div style="float:right"> Hits: <span style="color:#ffffff"><b>$[hit]</b></div>
proxytype 1:496ea8c93386 35 </div>
proxytype 1:496ea8c93386 36
proxytype 1:496ea8c93386 37 <div style="background-color:#4286f4;width:100%; height:2px"></div>
proxytype 1:496ea8c93386 38
proxytype 1:496ea8c93386 39 <div style="margin:5px; height:18px">
proxytype 1:496ea8c93386 40 <div style="float:left"> Port: <span style="color:#ffffff"><b>$[port]</b></div>
proxytype 1:496ea8c93386 41 <div style="float:right"> Hits: <span style="color:#ffffff"><b>$[hit]</b></div>
proxytype 1:496ea8c93386 42 </div>
proxytype 1:496ea8c93386 43
proxytype 1:496ea8c93386 44 <div style="background-color:#4286f4;width:100%; height:2px"></div>
proxytype 1:496ea8c93386 45
proxytype 1:496ea8c93386 46 <div style="margin:5px; height:18px">
proxytype 1:496ea8c93386 47 <div style="float:left"> Port: <span style="color:#ffffff"><b>$[port]</b></div>
proxytype 1:496ea8c93386 48 <div style="float:right"> Hits: <span style="color:#ffffff"><b>$[hit]</b></div>
proxytype 1:496ea8c93386 49 </div>
proxytype 1:496ea8c93386 50
proxytype 1:496ea8c93386 51 <div style="background-color:#4286f4;width:100%; height:2px"></div>
proxytype 1:496ea8c93386 52
proxytype 1:496ea8c93386 53 <div style="margin:5px; height:18px">
proxytype 1:496ea8c93386 54 <div style="float:left"> Port: <span style="color:#ffffff"><b>$[port]</b></div>
proxytype 1:496ea8c93386 55 <div style="float:right"> Hits: <span style="color:#ffffff"><b>$[hit]</b></div>
proxytype 1:496ea8c93386 56 </div>
proxytype 1:496ea8c93386 57 </div>
proxytype 1:496ea8c93386 58 <div style="position:fixed; bottom:0px; width:100%;background-color:#474747; padding:5px">Powered by WizNet</div>
proxytype 1:496ea8c93386 59 </body>
proxytype 1:496ea8c93386 60 </html>