/* * ftelnetd - fake telnet daemon * * banner.c * This file should be enough to fight against nmap and let it show the * services as original as specified the fake mode. But without guarantee! :) * But be paranoid, because: for example, * the data for cisco devices between "password:" won't be faked! I'll change * it soon. * * Sun Feb 11 03:36:43 CET 2007 * * by Levent Kayan * levent[at]corehack[org] * www.corehack.org */ #include "banner.h" #include #include /* supported targets for ftelnetd: router, telnetd, dsl-modem etc... */ fake_mode target[] = { { "Check Point Firewall-1" }, { "Cisco Router" }, { "BusyBox" }, { "Netgear" }, { "SpeedStream" }, }; void print_modes() { int i; printf("Available fake login banner are:\n"); for (i = 0; i < 5; i++) { printf("\t%i - %s\n", i, target[i].fake_modes); } exit(EXIT_SUCCESS); } /* excuse me, hardcoded banner :P */ banner_t banner[] = { { 3, 1, "Checkpoint Firewall", "Check Point FireWall-1 authenticated Telnet server running on localhost\ \r\n\r\xff\xfb\x01\xff\xfe\x01\xff\xfb\x03", "User:\x20", "\r\npassword:\x20", "\r\nAccess denied - wrong user name or password\r\n\r\r\n", '*', 60, /* no timeout message is sent */ "", 1 }, { 3, 1, "Cisco", "\xff\xfb\x01\xff\xfb\x03\xff\xfd\x18\xff\xfd\x1f\ \r\n\r\nUser Access Verification\r\n", "\r\nUsername:\x20", "\r\nPassword:\x20", "\r\n\r\n% Authentication failed.\r\n", 0x00, 30, "\r\n% Password:\x20\x20timeout expired!\r\n", 1 }, { 3, 1, "BusyBox", /* BusyBox send a banner together with user string */ "\xff\xfd\x01\xff\xfd\x21\xff\xfb\x01\xff\xfb\x03", "\r\nBusyBox on localhost login:\x20", "\r\nPassword:\x20", "\r\nLogin incorrect\r\n", 0x00, 60, "\r\nLogin timed out after 60 seconds.\r\n", 1 }, { 0, 4, "Netgear", /* Netgear doesn't send a banner */ "\xff\xfb\x03\xff\xfb\x01", /* Netgear doesn't send a user string */ "", "\r\nPassword:\x20", "\r\n\r\nBad Password!!!\r\n", '*', 180, /* no timeout message */ "", 4 }, { 5, 1, "SpeedStream", "\xff\xfb\x01\xff\xfd\x01\xff\xfb\x03\xff\xfd\x03\xff\xfb\x05\xff\xfd\x05SpeedStream Telnet Server\r\n\r\n", "\r\nlogin:\x20", "\r\npassword:\x20", /* no "pass wrong" message */ "", 0x00, 60, /* no timeout message */ "", 5 }, }; /* EOF */