+-- Noteworthy changes in version 1.0.7 (2015-??-??)
+o) HOPM can now detect Dreamboxes with default root passwords
+
+
-- Noteworthy changes in version 1.0.6 (2015-05-27)
o) HOPM now catches MikroTik HttpProxies
*/
protocol = WINGATE:23;
+ protocol = DREAMBOX:23;
+
/*
* The HTTP POST protocol, often dismissed when writing the access
* controls for proxies, but sadly can still be used to abused.
return PROTOCOLTYPE;
}
+DREAMBOX {
+ yylval.number = OPM_TYPE_DREAMBOX;
+ return PROTOCOLTYPE;
+ }
+
+
[0-9]+ {
yylval.number=atoi(yytext);
{ OPM_TYPE_SOCKS5, libopm_proxy_socks5_write, NULL },
{ OPM_TYPE_ROUTER, libopm_proxy_router_write, NULL },
{ OPM_TYPE_WINGATE, libopm_proxy_wingate_write, NULL },
- { OPM_TYPE_HTTPPOST, libopm_proxy_httppost_write, NULL }
+ { OPM_TYPE_HTTPPOST, libopm_proxy_httppost_write, NULL },
+ { OPM_TYPE_DREAMBOX, libopm_proxy_dreambox_write, NULL }
};
/* opm_create
#define OPM_TYPE_WINGATE 4
#define OPM_TYPE_ROUTER 5
#define OPM_TYPE_HTTPPOST 6
+#define OPM_TYPE_DREAMBOX 7
/* States */
#define OPM_STATE_UNESTABLISHED 1
return OPM_SUCCESS;
}
+
+/*
+ * Dreambox scanning
+ *
+ * Some dreambox machines have 'dreambox' as the password, and would allow
+ * full root access to telnet or install bouncers.
+ */
+int
+libopm_proxy_dreambox_write(OPM_T *scanner, OPM_SCAN_T *scan, OPM_CONNECTION_T *conn)
+{
+ size_t len;
+ int scan_port;
+ char *scan_ip;
+
+ scan_ip = (char *)libopm_config(scanner->config, OPM_CONFIG_SCAN_IP);
+ scan_port = *(int *)libopm_config(scanner->config, OPM_CONFIG_SCAN_PORT);
+
+ len = snprintf(SENDBUF, SENDBUFLEN, "root\r\n");
+ send(conn->fd, SENDBUF, len, 0);
+
+ len = snprintf(SENDBUF, SENDBUFLEN, "dreambox\r\n");
+ send(conn->fd, SENDBUF, len, 0);
+
+ len = snprintf(SENDBUF, SENDBUFLEN, "telnet %s %d\r\n", scan_ip, scan_port);
+ send(conn->fd, SENDBUF, len, 0);
+
+ len = snprintf(SENDBUF, SENDBUFLEN, "nc %s %d\r\n", scan_ip, scan_port);
+ send(conn->fd, SENDBUF, len, 0);
+
+ return OPM_SUCCESS;
+}
int libopm_proxy_wingate_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
int libopm_proxy_router_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
int libopm_proxy_httppost_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
+int libopm_proxy_dreambox_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *);
#endif /* PROXY_H */
{ OPM_TYPE_SOCKS4, "SOCKS4" },
{ OPM_TYPE_SOCKS5, "SOCKS5" },
{ OPM_TYPE_WINGATE, "WINGATE" },
- { OPM_TYPE_ROUTER, "ROUTER" }
+ { OPM_TYPE_ROUTER, "ROUTER" },
+ { OPM_TYPE_DREAMBOX, "DREAMBOX" }
};
for (unsigned int i = 0; i < (sizeof(protocols) / sizeof(struct protocol_assoc)); ++i)
{ OPM_TYPE_SOCKS4, 0, "SOCKS4" },
{ OPM_TYPE_SOCKS5, 0, "SOCKS5" },
{ OPM_TYPE_ROUTER, 0, "ROUTER" },
- { OPM_TYPE_WINGATE, 0, "WINGATE" }
+ { OPM_TYPE_WINGATE, 0, "WINGATE" },
+ { OPM_TYPE_DREAMBOX, 0, "DREAMBOX" }
};