-
Notifications
You must be signed in to change notification settings - Fork 0
/
adaptbb_detect.sc
48 lines (47 loc) · 1.9 KB
/
adaptbb_detect.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
if(description){
script_oid( "1.3.6.1.4.1.25623.1.0.100127" );
script_version( "2021-05-14T13:11:51+0000" );
script_tag( name: "last_modification", value: "2021-05-14 13:11:51 +0000 (Fri, 14 May 2021)" );
script_tag( name: "creation_date", value: "2009-04-12 20:09:50 +0200 (Sun, 12 Apr 2009)" );
script_tag( name: "cvss_base_vector", value: "AV:N/AC:L/Au:N/C:N/I:N/A:N" );
script_tag( name: "cvss_base", value: "0.0" );
script_name( "AdaptBB Detection (HTTP)" );
script_category( ACT_GATHER_INFO );
script_family( "Product detection" );
script_copyright( "Copyright (C) 2009 Greenbone Networks GmbH" );
script_dependencies( "find_service.sc", "no404.sc", "webmirror.sc", "DDI_Directory_Scanner.sc", "global_settings.sc" );
script_require_ports( "Services/www", 80 );
script_exclude_keys( "Settings/disable_cgi_scanning" );
script_xref( name: "URL", value: "http://www.adaptbb.com/" );
script_tag( name: "summary", value: "HTTP based detection of AdaptBB." );
script_tag( name: "qod_type", value: "remote_banner" );
exit( 0 );
}
require("http_func.inc.sc");
require("http_keepalive.inc.sc");
require("port_service_func.inc.sc");
require("list_array_func.inc.sc");
require("host_details.inc.sc");
port = http_get_port( default: 80 );
if(!http_can_host_php( port: port )){
exit( 0 );
}
for dir in nasl_make_list_unique( "/adaptbb", "/forum", "/board", http_cgi_dirs( port: port ) ) {
install = dir;
if(dir == "/"){
dir = "";
}
buf = http_get_cache( item: dir + "/index.php", port: port );
if(!buf){
continue;
}
if(egrep( pattern: "Powered by AdaptBB", string: buf, icase: TRUE )){
vers = "unknown";
cpe = "cpe:/a:adaptbb:adaptbb";
set_kb_item( name: "adaptbb/installed", value: TRUE );
register_product( cpe: cpe, location: install, port: port, service: "www" );
log_message( data: build_detection_report( app: "AdaptBB", version: vers, install: install, cpe: cpe ), port: port );
exit( 0 );
}
}
exit( 0 );