Re: New C functions for Nessus 2.2?

Michel Arboi <[email protected]> Fri, 17 Sep 2004 08:34:45 +0200
Newsgroups gmane.comp.security.nessus.devel
Message-ID <[email protected]>
On Thu Sep 16 2004 at 23:05, Thomas Reinke wrote:

> by Apache in all headers: "Thu, 16 Sep 2004 21:00:36 GMT".
> You want to convert this to a julian time.  The only
> way I know of doing this reliably is to parse the field,
> convert strings such as "Sep" to the appropriate integer
> value, and then call mktime with the appropriately
> populated time structure.

> Is there another, reliable, secure way of doing the above
> that I'm not aware of?

Probably not, but the most difficult part is the parser, if we want
it to handle several languages. I suggest that we keep this part in
NASL because we'll probably need to add another language.
Writing mktime in NASL is easy if we stick to UTC. Handling time zones
is harder.
OK, let's implement mktime in C -- and hope that all time zones will be
implemented on all systems so that we have the same behaviour every where.

> As I repeated earlier, if you can then do this, one can
> do things such as compare this against the local system
> time, which if you know is accurate, will tell you
> whether or not the remote system is time synced.  If you
> then compare against returned results from icmp timestamp
> messages, you can compare the accuracy of the remote
> clock.  If the accuracies vary, you know you are talking
> to two different devices.

Yes, this is an interesting idea.

> Not to mention simply the fact that good sysadmins should
> keep their clocks synced to make it easier to troubleshoot
> problems across a network.

Unfortunately, we cannot be sure that Nessusd's clock is accurate.
If it is not, you'll get a warning on every target.

For example, when I run an audit, my laptop is often the only
unsynchronized clock on the network!

-- 
[email protected]	http://arboi.da.ru
FAQNOPI de fr.comp.securite http://faqnopi.da.ru/
NASL2 reference manual http://michel.arboi.free.fr/nasl2ref/
_______________________________________________
Nessus-devel mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus-devel