Mailing List Archive

need help debugging nessus
I am trying to get nessus working as a 64 bit application on (Fedora Core )
linux.

I have the lib64 patches from SUSE. I also have gcc fixed so that it does not
loop when compiling network.c. I have also found at least one other bug
where nessus is using the "wrong" struc ... and will pass the patches
upstream once I get more accomplished.

I have found a number of seg-faults (SIGSEGV) in nmap_tcp_connect.nes as well
as possibles in some NASL scripts (although they run fine with the nasl
command so it may be something else).

Since nessus makes extensive use of fork-process, I am having difficulty
trying to debug things ... ddd seems to be having other problems so I have
fallen back to using gdb. However, when I run gdb by attaching the "nessusd
serving" process, the tests are not run. Any hints on how to use gdb with
nessus?

Many times when debugging, I insert printf or fprintf statements into the
source code so that I can print out info to help see what is going on. I
have having difficulty getting anything.

Is there something I can use to get info into the logs/nessusd.dump or
logs/nessusd.message files? I tried "log_write" but that does not seem to
work. Any hints appreciated.
--
Gene
Re: need help debugging nessus [ In reply to ]
On Sat, Jan 17, 2004 at 01:48:41PM -0500, Gene C. wrote:
> I am trying to get nessus working as a 64 bit application on (Fedora Core )
> linux.
>
> I have the lib64 patches from SUSE. I also have gcc fixed so that it does not
> loop when compiling network.c. I have also found at least one other bug
> where nessus is using the "wrong" struc ... and will pass the patches
> upstream once I get more accomplished.
>
> I have found a number of seg-faults (SIGSEGV) in nmap_tcp_connect.nes as well
> as possibles in some NASL scripts (although they run fine with the nasl
> command so it may be something else).
>
> Since nessus makes extensive use of fork-process, I am having difficulty
> trying to debug things ... ddd seems to be having other problems so I have
> fallen back to using gdb. However, when I run gdb by attaching the "nessusd
> serving" process, the tests are not run. Any hints on how to use gdb with
> nessus?

The "best" thing is to replace the call to create_process() in nessusd
by the actual calling of the function. Or even better, replace the call
to fork() in nessusd/processes.c by '1 == 1'. It makes it easier to
follow the program using gdb.

Obviously, only once plugin will be run and then the test will stop, but
usually (at least for 64 bits issues), it's usually good enough.

Also, you should recompile nessus-libraries/libnessus with CFLAGS set to
-g -- I don't think debug symbols are included by default any more, so
it makes the debugging of this part harder.


Finally, you should first debug the nasl interpretor. You recently said
that it crashed when you ran ping_host.nasl - it's easy to debug and
fix, and once it's running you can tackle nessusd.


-- Renaud