Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Apr 19, 2024 12:26 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Password bypassed
PostPosted: Mon Nov 13, 2006 10:30 am 
Offline
Newbie

Joined: Mon Nov 13, 2006 10:13 am
Posts: 9
Hey guys,

Just a note that if register_globals is on in a PHP installation you can view any list just by defining page=add_pc to the URL. For example:

http://<site>/openaudit/list.php?page=add_pc

This is really bad! It allows for anyone with HTTP access to retrieve sensitive info (serials ect). To fix this you need to delete or comment out this line in include.php:

if ($page == "add_pc"){$use_pass = "n";}

If you are doing automated auditing thats it. This presents a bit more inconvenience to a manual submission.

-Chris


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 13, 2006 11:30 am 
Yeah, the "password" system right now is very minimal. I've been pondering changes to this system, but have yet to decide where to go with it. I really would like user/group management which different permissions (which would solve the issue you are mentioning). I've been looking at Pear::LiveUser, but I haven't gotten around to playing with it enough to see how it works. If you have any interest in implementing this let me know.


Top
  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 14, 2006 5:46 am 
Offline
Newbie

Joined: Thu Nov 02, 2006 3:23 am
Posts: 19
Location: Memphis
Since we have the OpenAudit page locked down with IIS and Windows Integrated Authentication, we should be safe from anything like this, right?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 14, 2006 5:52 am 
Offline
Newbie

Joined: Mon Nov 13, 2006 10:13 am
Posts: 9
Yea you should be ok. If you rely on WIA to perform authentication you are ok. I have my pages restricted with apache via .htaccess (basic HTTP authentication) so I'm not worried.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Nov 14, 2006 11:13 pm 
Offline
Moderator

Joined: Sat Mar 04, 2006 2:44 am
Posts: 193
We could maybe check $_SERVER["SCRIPT_NAME"] is admin_pc_add_1.php or admin_pc_add_2.php instead. I don't think you can overwrite these variables can you?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 12:57 am 
Offline
Newbie

Joined: Mon Nov 13, 2006 10:13 am
Posts: 9
I think those are read only variables so yea you could do that. The best solution is just to add basic http authentication into the audit script because there is still the problem that anyone can add junk data to your server...with enough submissions it can fill the database in a denial of service style attack.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 1:05 am 
Offline
Moderator

Joined: Sat Mar 04, 2006 2:44 am
Posts: 193
[quote]The best solution is just to add basic http authentication into the audit script because there is still the problem that anyone can add junk data to your server...with enough submissions it can fill the database in a denial of service style attack.


I guess we could. However the username and password would then be visible in the script or config. If you run the script as a logon script then users can get the username/password.

If you don't run as a logon script then this would be fine.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 1:32 am 
Offline
Newbie

Joined: Mon Nov 13, 2006 10:13 am
Posts: 9
Run the audit script as a user that has rights to read the config file. Deny read access to anyone else. That way the script can read the config but nobody else.

http://sudowin.sourceforge.net/

You can create a batch that automatically opens sudowin and runs the audit script. Voila.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 2:15 am 
Offline
Moderator

Joined: Sat Mar 04, 2006 2:44 am
Posts: 193
sudowin, haven't seen that one before. Looks good.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 3:23 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
[quote="cdvma"]Run the audit script as a user that has rights to read the config file. Deny read access to anyone else. That way the script can read the config but nobody else.

http://sudowin.sourceforge.net/

You can create a batch that automatically opens sudowin and runs the audit script. Voila.


sudowin... one day everybody will run Linux, until then there is sudowin... I like it.
8)

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 3:25 am 
Offline
Moderator

Joined: Sat Mar 04, 2006 2:44 am
Posts: 193
[quote]You can create a batch that automatically opens sudowin and runs the audit script. Voila.


Not sure how you do this without prompting the user for their password though?

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 3:40 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Somewhere down the line the posting pages have to be

1) Secure, and use https, otherwise you can sniff all of the details being passed via the script.

2) Authenticated, in otherwords you can only post data if you can authenticate/verify your connection.

3) Verified as making sense, both in terms of content (URLS must look like URLS, Date-times must look like date-times etc) and length.


This present several problems.

First to use https you need to pass and verify certificates, this should ideally be done only once otherwise each post to the database prompts you to verify the certificate.

Second the posting of data needs to be done using some sort of exchange of passwords, or verification of content and length, otherwise we are liable to be open to DOS attack.

Currently we do little of this, simply because we have been concerned maily with getting meaningfull results from what we have created so far.

I have one question. Do we need to put all of this in place before we post an interim release, or do we state this is a goal for the next major release.


:?:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 3:51 am 
Offline
Moderator

Joined: Sat Mar 04, 2006 2:44 am
Posts: 193
[quote]1) Secure, and use https, otherwise you can sniff all of the details being passed via the script.
.....
First to use https you need to pass and verify certificates, this should ideally be done only once otherwise each post to the database prompts you to verify the certificate.


I'm pretty sure the current code should post to https providing the client computer trusts the Certificate authority that signed the certificate on the server.

[quote] Second the posting of data needs to be done using some sort of exchange of passwords, or verification of content and length, otherwise we are liable to be open to DOS attack.

Use the suggestions here.
1. Username and password in config file
2. Client connects to https page and passes username and password
3. Data submitted

So all we need to do is provide an option in audit.config for authentication with username and password (and a warning that the audit.config should be protected as described earlier in this thread)[/quote]

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 3:57 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
What about verification of data to stop buffer overflow and injection of "stuff" into the database, if we assume that the username and password has been compromised, we should still not accept the data if it is a load of garbage, designed to kill the connection.

[quote]
I'm pretty sure the current code should post to https providing the client computer trusts the Certificate authority that signed the certificate on the server.


SFAIK IE/Windoze insists on verifying the cert for every post, ( I ran the NMAP script with https on just to see). This is a pain, I tried installing the cert using the install cert wizard, and you guessed it, when the next run went through, it asked me to verify the cert again. Now this may well indicate simply that I am too stupid to know where to put the cert, but then again if I cant figure it out, what chance has a casual user?!

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 4:14 am 
Offline
Newbie

Joined: Mon Nov 13, 2006 10:13 am
Posts: 9
[quote="d.l.dave"][quote]You can create a batch that automatically opens sudowin and runs the audit script. Voila.


Not sure how you do this without prompting the user for their password though?

There has got to be a way to auto answer prompts using MS batch. If not there has got to be a linux utility ported to windows that will :lol:

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group