
deraison at nessus
Dec 26, 2007, 6:45 AM
Post #2 of 6
(1776 views)
Permalink
|
Hi Eder, Your script is missing a call to script_name() in the description section, thus causing a known bug which will be fixed in a further release of nessusd. Simply add : script_name(name["english"]); in the description, and your script will load properly. Also you can check the description part of the script in command-line by doing : nasl -VV yourscript.nasl and by making sure that every mandatory field is not null. -- Renaud On Dec 26, 2007, at 2:33 PM, Eder L. Marques wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Hello all, > > I read the FAQ and I searched on the internet about this topic, but I > didn't find any solution. > > I'm trying to add a custom script to my nessus server. The machine > is a > Pentium D 3 GHz. The nessus version is 3.0.6 > > When I copy the nasl script to /opt/nessus/lib/nessus/plugins/, and > try > to start the server, I get this error: > > /etc/init.d/nessusd start > > Starting Nessus : > > SIGSEGV dump (Process 4952) > > si_code = 1 (SEGV_MAPERR) > si_addr = 0x0 > > Registers : > EIP = b7c5af33 > ESP = bfb3a00c > EDI = 80f3600 > ESI = 0 > EBP = bfb3b128 > EAX = 0 > EBX = b7f1b148 > ECX = 0 > EDX = 81c7ea0 > > Stack : > > > Backtrace: > > 8052542 > ffffe440 > 805aa6a > 805a460 > 8059d25 > 805cf01 > 805bc48 > b7bff450 > 804e4b1 > 0xb7f06c5d > 0xffffffff > 0x8089444 > 0xbfb3a0a0 > 0xbfb3a0a4 > 0xbfb3a0a8 > 0xbfb3a090 > 0x12 > 0x1b2 > 0x1ae > 0x820a600 > 0x80ddee8 > . > > > The script: > > # > # This script was written by Eder "Frolic" Marques > # <frolic [at] debian-ce> > # > # This script is distributed under GPL License > # > > if(description) > { > script_id(99991); > script_version("$Revision: 0.1 $"); > name["english"] = "Apache2 banner disclosure"; > desc["english"] = " > This script checks if the Apache2 is giving more > information that it would give. > > Solution: Add these lines to apache2 configuration file: > ServerSignature Off > ServerTokens Prod > > Risk factor : Low"; > > script_description(english:desc["english"]); > summary["english"] = "Checks apache2 banners"; > script_summary(english:summary["english"]); > script_category(ACT_GATHER_INFO); > script_copyright(english:"This script is Copyright (C) 2007 > Eder L. Marques"); > family["english"] = "Footprinting"; > script_family(english:family["english"]); > script_require_ports("Services/www", 80); > exit(0); > } > > # > # Script code > # > > include("http_func.inc"); > include("backport.inc"); > > #verifica se está rodando o servico www > port = get_http_port(default:80); > if(!port) port = 80; > display("esta rodando o apache!\n"); > if(!get_port_state(port)) exit(0); > > # busca as informacoes do servidor > banner = get_backport_banner(banner:get_http_banner(port: port)); > if(!banner)exit(0); > > server = strstr(banner, "Server"); > #display(server); > if(ereg(pattern:"^Server:.*Apache/[0-9]\.[0-9]\.[0-9].*PHP.*", > string:server)) > { > display("brecha!\n"); > security_hole(port); > } > else > display("sem brecha!\n"); > > > ## > > Without my custom script, the server starts successfully. > > Also, under the nasl interpreter, the script runs perfectly. > > What's wrong? How can I add a custom script to my server? > > Kind regards, > > - -- > Eder L. Marques > Just another weekend hacker > http://blog.edermarques.net/ | http://www.debian.org/ > http://administrando.net/ | http://www.debianbrasil.org/ > http://www.fsfla.org/ | http://www.debian-ce.org/ > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iQIVAwUBR3JYKj9tnxvLkedtAQJJ9g/9FuSiiom3UYcJL73xfqoC5kbiHw5PltY6 > 0Ccv9HnKM2Ff8oPrFYeMmq1fmXY0gfsFC237lgOpVgNNxP6MN4YFMTFaneaYKdbg > D9drnrr4/dlKSDf25pmMnw9hyJ7moiG8u1qjfwfzOOhPvpqFZb78CeU0lVKglEYS > Qh/z2IJXV1Cm7gW7ZvFHFM6qyduyc2J679599nyVZTubh2y4Rsi/0/I52T2iCnxG > XJrTSzIN59gI6JT+XTIA6YvfpDsAT7f5kMc81AjOwriaXukMzHBBZQgPrkzO8QKo > 4sGmix7RDiDegJHlbRr4Q4woE11VKAa5e9KyobzqO8/QkFqb2/rV7GFU7ZbGG2B+ > 8PAAMzPtpaMgHfAwrpF8JXLDi6QvJe0fKZWvPfyPzpm0sTC4Z93oiEGIzvfwWDNo > Vj/hKPR2YlOrzCIVXBc+cyaQdJmuAYbZxpQJ6jnK8AwDKA3NnjtWOgcOpJJjQSNe > WEqmKJIxGyx7Dfha6G7I2f5w5BCdVq+kFL5fOckhsVVVGvfSYn9ubeUyfBuMm1t1 > CAOdRdLP2WdEZfYX50ga6Zz/bkAktnI7CP7Z4Ac7ai2LiS8U+5XexmrU9iD0V2Ky > muhQxy5a0NnhnHl12I2LihrwC0a2kyhrv+Q72+wYJEZRN6eXTgAkSYnesP6amCdo > xXNc5G0L15U= > =hBI/ > -----END PGP SIGNATURE----- > _______________________________________________ > Plugins-writers mailing list > Plugins-writers [at] list > http://mail.nessus.org/mailman/listinfo/plugins-writers _______________________________________________ Plugins-writers mailing list Plugins-writers [at] list http://mail.nessus.org/mailman/listinfo/plugins-writers
|