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 Sat Apr 20, 2024 8:12 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
PostPosted: Sat Sep 29, 2007 9:26 pm 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
On the index.php page, if you checked in the Admin-Config page both

Show Detected Servers on homepage
Show Terminal Servers and Remote Desktops on homepage

the detected servers and TS/RDP sections don't show the "Nmap discovered on Other equipment" section. To fix it, modify the following queries (index.php SVN rev. 826):

LOC 492 ("WEB Servers Detected/Nmap discovered on other equipment" Section)
[code]
$sql = "select oth.other_id, oth.other_ip_address, oth.other_network_name, oth.other_mac_address, port.nmap_port_number from other oth, nmap_ports port where (port.nmap_port_number = '80' OR port.nmap_port_number = '443') AND (port.nmap_other_id = oth.other_mac_address OR port.nmap_other_id = oth.other_id)";
[/code]
LOC 635 ("FTP Servers Detected/Nmap discovered on other equipment" Section)
[code]
$sql = "select oth.other_id, oth.other_ip_address, oth.other_network_name, oth.other_mac_address, port.nmap_port_number from other oth, nmap_ports port where port.nmap_port_number = '21' AND (port.nmap_other_id = oth.other_mac_address OR port.nmap_other_id = oth.other_id)";
[/code]
LOC 779 ("Telnet Servers Detected/Nmap discovered on other equipment" Section)
[code]
$sql = "select oth.other_id, oth.other_ip_address, oth.other_network_name, oth.other_mac_address, port.nmap_port_number from other oth, nmap_ports port where port.nmap_port_number = '23' AND port.nmap_other_id = oth.other_id";
[/code]
LOC 925 ("Email Servers Detected/Nmap discovered on other equipment" Section)
[code]
$sql = "select oth.other_id, oth.other_ip_address, oth.other_network_name, oth.other_mac_address, port.nmap_port_number from other oth, nmap_ports port where port.nmap_port_number = '25' AND (port.nmap_other_id = oth.other_mac_address OR port.nmap_other_id = oth.other_id)";
[/code]
LOC 1065 ("VNC Servers Detected/Nmap discovered on other equipment" Section)
[code]
$sql = "select oth.other_id, oth.other_ip_address, oth.other_network_name, oth.other_mac_address, port.nmap_port_number from other oth, nmap_ports port where port.nmap_port_number = '5900' AND (port.nmap_other_id = oth.other_mac_address OR port.nmap_other_id = oth.other_id)";
[/code]
LOC 1210 ("Terminal Services Servers Detected/Nmap discovered on other equipment" Section)
[code]
$sql = "select oth.other_id, oth.other_ip_address, oth.other_network_name, oth.other_mac_address, port.nmap_port_number from other oth, nmap_ports port where port.nmap_port_number = '3389' AND (port.nmap_other_id = oth.other_mac_address OR port.nmap_other_id = oth.other_id)";
[/code]
A lot of hosts (switches, printers, remote management boards and so on, listed from the OA "Other" table) will expose their discovered network services (if you "nmapped" your network...).


Last edited by ef on Sun Sep 30, 2007 2:18 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 29, 2007 10:06 pm 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
Also, modify LOC 661 as follows (otherwise FTP servers section doesn't show Hostnames for "Nmap discovered on other equipment" sub-section):
[code]
<td ><a href=\"system.php?other=" . $myrow["other_id"] . "&amp;view=other_system\">" . $myrow["other_network_name"] . "</a>&nbsp;&nbsp;&nbsp;</td>
[/code]


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 29, 2007 11:44 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Could you post your copy of index.php, 'cos it would save me making any mistakes with that lot. :o

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 30, 2007 10:42 am 
Even better would be an svn diff. I'm not completely good on this but, if you do something like: "svn diff > output.patch" and then upload the patch, we can apply it against current svn. Would be more efficient :)


Top
  
Reply with quote  
PostPosted: Mon Oct 01, 2007 4:39 pm 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
Sorry for the delay.
Attached are my working copy of index.php and a TortoiseSVN patch (not tested) related to the SVN rev. 829 version of the same file. Hope it helps.

Edoardo


Attachments:
index.zip [12.63 KiB]
Downloaded 300 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 02, 2007 1:50 am 
So, there are a few issues I see relating to the line break sequences used by Unix and Dos. That is why your patch is so huge. I changed an svn property on the index.php file which should cause the file to be downloaded with DOS line breaks on DOS systems, and Unix on Unix. Please test that this works (using a hex editor, look for the hex characters 0D 0A if on windows, and 0A if on unix). If this works, I'll set the property on the rest of the repository, and then we shouldn't have issues with differing line breaks.

I have included a new patch file with only your changes and none of the line break issues. The patch was of course generated on linux, so who knows how it would work if applied on a windows system :)

Oh, and the property is svn:eol-style which I set to native.


Attachments:
patch.zip [876 Bytes]
Downloaded 310 times
Top
  
Reply with quote  
PostPosted: Tue Oct 02, 2007 5:03 pm 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
Mikeyrb, your patch, applied to index.php SVN ver. 831, worked fine for my Windows system using TortoiseSVN. But sorry, I made 2 mistakes in my previously attached index.php:
- I added a double 493 line, so line numbers were translated of one (as you can see in my first post);
- I forgot to modify the Telnet servers query (line 778).
Attached is my working index.php, modified again from your SVN ver 831.
Sorry again for your waste time.

Edoardo


Attachments:
index.zip [5.18 KiB]
Downloaded 304 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 02, 2007 11:32 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Replaced SVN version with yours after reviewing it. Thanks. Try it now. SVN Ver 832
:D That is SOOOO much better! It now shows all of the VNC servers on my thin clients, and SMTP on one of the photocopiers, I didn't even know it could email.... :o

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 03, 2007 12:32 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
The only additional suggestion is that we add in the ability to connect to these ports and services from telnet, VNC, RDP http https or whatever (whichever is appropriate) by clicking on the port number as a link on the page. (With ALT text to say connect to this service perhaps). See the IIS and FTP links for an example of what I am talking about.
:idea:

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 03, 2007 10:02 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
What about us Linux users ?!?!?!
I may have to manage Windows boxes (actually that should be past tense), but I only use Linux on my desktop.

I suppose we could have a web page link for VNC and FTP, HTTP & HTTPS.
There should be a Linux utility for Wake-On-Lan - we could have the server run that.
We could 'take it to the next level' and have an embedded (Java) client for telnet/ssh, so that runs 'from the web page'.
There will always be some Windows specific stuff, like MMC & IIS Admin.
I wonder if there is a Java client for RDP that we could embed ?

I think I just opened my mouth, when I should have kept it firmly shut !!!

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 03, 2007 11:16 am 
I believe WOL is already handled by the server. Manly vnc servers include java applets, so perhaps a link to that would work. I just played with tsclient, and it save's *.rdp type files -- maybe compatible with windows?? The rdp files default to opening with gedit, so it would require extra effort to open that automatically.

Embedded java may be difficult:

[quote="[url=http://java.sun.com/sfaq/]Java Applet Security[/url]"]What are applets prevented from doing?

In general, applets loaded over the net are prevented from reading and writing files on the client file system, and from making network connections except to the originating host.

In addition, applets loaded over the net are prevented from starting other programs on the client. Applets loaded over the net are also not allowed to load libraries, or to define native method calls. If an applet could define native method calls, that would give the applet direct access to the underlying computer.

There are other specific capabilities denied to applets loaded over the net, but most of the applet security policy is described by those two paragraphs above. Read on for the gory details.


Top
  
Reply with quote  
PostPosted: Wed Oct 03, 2007 4:51 pm 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
Thank you, Andrew, it's fixed now.
[quote]
That is SOOOO much better! It now shows all of the VNC servers on my thin clients, and SMTP on one of the photocopiers, I didn't even know it could email....

That's why I would like to add some Nmap pages to OA... (see viewtopic.php?f=9&t=2332).
[quote]
The only additional suggestion is that we add in the ability to connect to these ports and services from telnet, VNC, RDP http https or whatever (whichever is appropriate) by clicking on the port number as a link on the page. (With ALT text to say connect to this service perhaps). See the IIS and FTP links for an example of what I am talking about.

It would be very useful. Now only the "RDP and terminal servers" - "Nmap discovered on Audited PC" section of index.php has a working link to the .rdp vbs launcher on the Ip address column.

_________________
Edoardo


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 03, 2007 7:43 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
I like the idea, but have been unable to spend much time coding recently. (That which I have managed was mainly bug fixing and Inkskape stuff).

Things look fairly busy for the next couple of weeks... Several large projects on the go :roll: Why is life never simple. :P

How did you get on with the idea of using a temporary table to link together the info you require?

Perhaps Mark might also like to throw in his tuppence worth at this point. (See previous post).

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


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.  [ 13 posts ] 

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:  
Powered by phpBB® Forum Software © phpBB Group