⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gather-package-list.nasl

📁 漏洞扫描源码,可以扫描linux,windows,交换机路由器
💻 NASL
📖 第 1 页 / 共 3 页
字号:
if("Mandrakelinux release 10.1" >< rls) {    set_kb_item(name: "ssh/login/release", value: "MNDK_10.1");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Mandrake Linux release 10.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "MNDK_10.0");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Mandrake Linux release 9.2" >< rls) {    set_kb_item(name: "ssh/login/release", value: "MNDK_9.2");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Mandrake Linux release 9.1" >< rls) {    set_kb_item(name: "ssh/login/release", value: "MNDK_9.1");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Mandrake Linux release 8.1" >< rls) {    set_kb_item(name: "ssh/login/release", value: "MNDK_8.1");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Mandrake Linux release 8.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "MNDK_8.0");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Mandrake Linux release 7.2" >< rls) {    set_kb_item(name: "ssh/login/release", value: "MNDK_7.2");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}# Ok...also using /etc/redhat-release is CentOS...let's try them now# We'll stay with major release # checking unless we find out we need to do# otherwise.#CentOS release 4.0 (Final)#CentOS release 4.1 (Final)#CentOS release 3.4 (final)if("CentOS release 4" >< rls) {    set_kb_item(name: "ssh/login/release", value: "CENTOS4");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running CentOS release 4"));    exit(0);}if("CentOS release 3" >< rls) {    set_kb_item(name: "ssh/login/release", value: "CENTOS3");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value: ";" + buf);    security_note(port:port, data:string("We are able to login and detect that you are running CentOS release 3"));    exit(0);}# Hmmm...is it Ubuntu?rls = ssh_cmd(socket:sock, cmd:"cat /etc/lsb-release");if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=4.10"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU4.1");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 4.10"));    exit(0);}if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=5.04"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU5.04");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 5.04"));    exit(0);}if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=5.10"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU5.10");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 5.10"));    exit(0);}if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=6.06"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU6.06 LTS");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 6.06"));    exit(0);}if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=6.10"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU6.10");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 6.10"));    exit(0);}if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=7.04"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU7.04");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 7.04"));    exit(0);}if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=7.10"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU7.10");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 7.10"));    exit(0);}if("DISTRIB_ID=Ubuntu"><rls && "DISTRIB_RELEASE=8.04"><rls) {    set_kb_item(name: "ssh/login/release", value: "UBUNTU8.04");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Ubuntu 8.04"));    exit(0);}# How about Conectiva Linux?rls = ssh_cmd(socket:sock, cmd:"cat /etc/conectiva-release");if("Conectiva Linux 9" >< rls) {    set_kb_item(name: "ssh/login/release", value: "CL9");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Conectiva Linux 9"));    exit(0);}if("Conectiva Linux 10" >< rls) {    set_kb_item(name: "ssh/login/release", value: "CL10");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Conectiva Linux 10"));    exit(0);}# How about Turbolinux?# Turbolinux signatures:# release 6.0 WorkStation (Shiga)       -- Unsupported# TurboLinux release 6.1 Server (Naha)	-- Unsupported# Turbolinux Server 6.5 (Jupiter)       -- Unsupported# Turbolinux Server 7.0 (Esprit)# Turbolinux Workstation 7.0 (Monza)# Turbolinux Server 8.0 (Viper)# Turbolinux Workstation 8.0 (SilverStone)# Turbolinux Server 10.0 (Celica)# Turbolinux Desktop 10.0 (Suzuka)# -- Need:#- Turbolinux Appliance Server 1.0 Hosting Edition#- Turbolinux Appliance Server 1.0 Workgroup Edition#- Turbolinux Home#- Turbolinux 10 F...rls = ssh_cmd(socket:sock, cmd:"cat /etc/turbolinux-release");if("Turbolinux Server 7.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "TLS7");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Turbolinux Workstation 7.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "TLWS7");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Turbolinux Server 8.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "TLS8");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Turbolinux Workstation 8.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "TLWS8");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Turbolinux Desktop 10.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "TLDT10");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Turbolinux Server 10.0" >< rls) {    set_kb_item(name: "ssh/login/release", value: "TLS10");    buf = ssh_cmd(socket:sock, cmd:"/bin/rpm -qa --qf '%{NAME}~%{VERSION}~%{RELEASE};\n'");    set_kb_item(name: "ssh/login/rpms", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running ", rls));    exit(0);}if("Turbolinux">< rls) {    security_note(port:port, data:string("We have detected you are running a version of Turbolinux currently not supported by SecuritySpace.  Please report the following banner to SecuritySpace: ", rls));    exit(0);}# Hmmm...is it Debian?rls = ssh_cmd(socket:sock, cmd:"cat /etc/debian_version");if("2.2"><rls) {    set_kb_item(name: "ssh/login/release", value: "DEB2.2");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Debian 2.2 (Potato)"));    exit(0);}if("3.0"><rls) {    set_kb_item(name: "ssh/login/release", value: "DEB3.0");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Debian 3.0 (Woody)"));    exit(0);}if("3.1"><rls) {    set_kb_item(name: "ssh/login/release", value: "DEB3.1");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);    security_note(port:port, data:string("We are able to login and detect that you are running Debian 3.1 (Sarge)"));    exit(0);}if("4.0"><rls) {    set_kb_item(name: "ssh/login/release", value: "DEB4.0");    buf = ssh_cmd(socket:sock, cmd:"COLUMNS=200 dpkg -l");    set_kb_item(name: "ssh/login/packages", value:buf);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -