<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason On A Shtick &#187; NetReg (archived)</title>
	<atom:link href="http://www.whitakerfamily.ws/blogs/jason/archives/category/netreg/feed" rel="self" type="application/rss+xml" />
	<link>http://www.whitakerfamily.ws/blogs/jason</link>
	<description>strange world - strange times - strange dude</description>
	<lastBuildDate>Mon, 02 Jan 2012 04:12:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Customized NetReg 1.5.1 with Nessus 3.0.5</title>
		<link>http://www.whitakerfamily.ws/blogs/jason/archives/42</link>
		<comments>http://www.whitakerfamily.ws/blogs/jason/archives/42#comments</comments>
		<pubDate>Thu, 15 Mar 2007 01:16:08 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Fedora/Xen (archived)]]></category>
		<category><![CDATA[NetReg (archived)]]></category>

		<guid isPermaLink="false">http://www.whitakerfamily.ws/blogs/jason/archives/42</guid>
		<description><![CDATA[I have NetReg 1.5.1 (along with my personal customizations to it) running in a Fedora Core 6 Xen VM and using the Nessus 3.0.5-fc6 rpm. Here&#8217;s the skinny: Get NetReg from http://www.netreg.org Get the Nessus RPM from http://www.nessus.org yum install httpd for Apache. yum install mod_ssl for https communications. yum install dhcp for the DHCP [...]]]></description>
			<content:encoded><![CDATA[<p>I have NetReg 1.5.1 (along with my personal customizations to it) running in  a Fedora Core 6 Xen VM and using the Nessus 3.0.5-fc6 rpm.  Here&#8217;s the skinny:</p>
<ul>
<li>Get NetReg from <a href="http://www.netreg.org">http://www.netreg.org</a></li>
<li>Get the Nessus RPM from <a href="http://www.nessus.org">http://www.nessus.org</a></li>
<li><strong>yum install httpd</strong> for Apache.</li>
<li><strong>yum install mod_ssl</strong> for https communications.</li>
<li><strong>yum install dhcp </strong>for the DHCP server.</li>
<li><strong>yum install bind</strong> for the DNS server.</li>
<li><strong>yum install php</strong> to support PHP for my modifications.</li>
<li><strong>yum install php-pear</strong> for an easy way to obtain PHP packages.</li>
<li><strong>pear config-set http_proxy http://xxx.xxx.xxx.xxx:3128</strong> for me, since I&#8217;m behind a firewall and using a proxy.</li>
<li><strong>pear install HTTP_Request</strong> to get a PHP class required by my code.</li>
<li><strong>rpm -i Nessus-3.0.5-fc6.i386.rpm</strong> to install the Nessus rpm.</li>
<li><strong>yum install gcc</strong> for the GNU C compiler to build Perl modules.</li>
<li><strong>yum install openssl-devel</strong> for SSL libraries required by some Perl modules.</li>
</ul>
<p>Now you have everything you need to set up NetReg and Nessus.  You can follow the <a href="http://netreg.sourceforge.net/contrib/NetReg-1.5.1-HowTo.pdf">NetReg install guide</a> for the most part, changing only your approach to the Nessus section since you downloaded an rpm instead.</p>
<p>In place of the DNS configuration that allows certain names to be looked up for real, my situation warrants a completely bogus DNS.  I have reused DNS configuration from older versions of Netreg, namely:</p>
<p><em>/var/named/chroot/etc/named.conf</em> looks like this:</p>
<p><em>server 172.16.1.21 {<br />
bogus yes;<br />
};</em></p>
<p><em>options {<br />
directory &#8220;/var/named&#8221;;<br />
recursion no;<br />
};</em></p>
<p><em>zone &#8220;.&#8221; in {<br />
type master;<br />
file &#8220;db.root&#8221;;<br />
};<br />
</em><br />
and <em>/var/named/chroot/var/named/db.root</em> looks like this:</p>
<p><em>. IN SOA netreg.someplace.org.  root.netreg.someplace.org. (<br />
1 10800 3600 604800 86400 )<br />
IN NS  netreg.someplace.org.<br />
netreg  86400   IN      A       172.16.1.21<br />
*.      86400   IN      A       172.16.1.21<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whitakerfamily.ws/blogs/jason/archives/42/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Which Nessus plugins do you use with ScanLite?</title>
		<link>http://www.whitakerfamily.ws/blogs/jason/archives/23</link>
		<comments>http://www.whitakerfamily.ws/blogs/jason/archives/23#comments</comments>
		<pubDate>Mon, 15 Jan 2007 19:21:27 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[NetReg (archived)]]></category>

		<guid isPermaLink="false">http://www.whitakerfamily.ws/blogs/jason/archives/23</guid>
		<description><![CDATA[The ScanLite module used by NetReg to fire a Nessus scan against registering machines takes a list of Nessus plugins to run against the target. The job of anyone using this thing seriously is to keep the list of plugins up to date in order to detect the most recent threats. Unfortunately, Nessus doesn&#8217;t make [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.cpan.org/modules/by-module/Net/Net-Nessus-ScanLite-0.01.readme">ScanLite module</a> used by NetReg to fire a <a href="http://www.nessus.org/">Nessus</a> scan against registering machines takes a list of <a href="http://www.nessus.org/plugins/">Nessus plugins</a> to run against the target.  The job of anyone using this thing seriously is to keep the list of plugins up to date in order to detect the most recent threats.</p>
<p>Unfortunately, Nessus doesn&#8217;t make this very easy for us.  They have tens of thousands of plugins that can be searched by category, name, etc.  The problem is that they don&#8217;t easily tell you if the plugin employs a passive or active scan.  By passive, I mean that they try to detect the particular vulnerability by crafting packets to expose the flaw.  Active, on the other hand, means that they look through registry entries or use other methods requiring privileged access in order to determine if a particular hole is patched.</p>
<p>For a completely effective Nessus scan, you need to have some sort of access to the machine in question and it probably needs to be running certain services.  This might be a workable scenario for lab machines where you control everything and maybe have some admin account set up on every one.  But for the masses of students and faculty, this simply won&#8217;t work.  So, you want to limit the list of plugins to only the ones that use passive scanning, but the only way to figure that out in most cases is to look at the code of the plugin to see what it does.</p>
<p>Here is a list of plugins that we use and what each one scans for.  We aim for the big name vulnerabilities and simple version checks while trying to keep the list small so the user doesn&#8217;t wait too long for the scan to finish when they register.  At the end is the line from Variables.pm that you can just copy and paste in order to use the same plugin list.  I hope to keep this list updated as frequently as possible.  For you Nessus people, give us a way to search for plugins that use passive scanning, please!</p>
<ul>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=11808">11808</a> &#8211; Microsoft RPC Interface Buffer Overrun (823980) &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=11835">11835</a> &#8211; Microsoft RPC Interface Buffer Overrun (KB824146) (network check) &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=11890">11890</a> &#8211; Buffer Overrun in Messenger Service (real test) &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=12054">12054</a> &#8211; ASN.1 Parsing Vulnerabilities (NTLM check) &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=12204">12204</a> &#8211; Microsoft Hotfix for KB835732 IIS SSL check &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=12209">12209</a> &#8211; Microsoft Hotfix for KB835732 (SMB check) &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=18027">18027</a> &#8211; Vulnerability in MSMQ Could Allow Code Execution (Network Check) &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=18028">18028</a> &#8211; Vulnerabilities in TCP/IP Could Allow Remote Code Execution (network check) &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=18502">18502</a> &#8211; 	Vulnerability in SMB Could Allow Remote Code Execution (896422) &#8211; Network Check	- Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=19407">19407</a> &#8211; Vulnerability in Printer Spooler Service Could Allow Remote Code Execution (896423) &#8211; Network Check &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=19408">19408</a> &#8211; Vulnerability in Plug and Play Service Could Allow Remote Code Execution (899588) &#8211; Network Check &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=20008">20008</a> &#8211; Vulnerabilities in MSDTC Could Allow Remote Code Execution (902400) &#8211; Network check &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=21334">21334</a> &#8211; Vulnerability in Microsoft Distributed Transaction Coordinator Could Allow Denial of Service (913580) &#8211; Network check &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=21696">21696</a> &#8211; Vulnerability in Routing and Remote Access Could Allow Remote Code Execution (911280) &#8211; Network check &#8211; Windows</li>
<li><a href="http://www.nessus.org/plugins/index.php?view=single&#038;id=21783">21783</a> &#8211; iTunes AAC File Integer Overflow Vulnerability (network check) &#8211; Gain a shell remotely</li>
</ul>
<p>
<em>Make sure you paste this as one line!</em><br />
$NESSUS_PLUGIN = &quot;11808;11835;11890;12054;12204;12209;<br />
18027;18028;18502;19407;19408;20008;21334;21696;21783&quot;;
</p>
<p>Determining if a plugin is active or passive is not a clear cut exercise, at least not that I can tell.  First, you can view the source of the plugin from the Nessus page for that plugin.  If you see something that looks like data is being specifically crafted into a packet of some sort, that may indicate that the plugin is passive.  For example, here&#8217;s a section from 12054:</p>
<pre>
ntlmssp = &quot;NTLMSSP&quot; + raw_string (0x00);
ntlmssp += raw_dword (d:1); # NTLMSSP_NEGOTIATE
ntlmssp += raw_dword (d:NTLMSSP_NEGOTIATE_UNICODE |
  NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_NTLM |
  NTLMSSP_NEGOTIATE_NTLM2); # Flags
ntlmssp += ntlmssp_data (data:NULL,offset:0); # workstation domain NULL
ntlmssp += ntlmssp_data (data:NULL,offset:0); # workstation name NULL
</pre>
<p>It appears that this plugin is building a packet in a certain way in order to test for the vulnerability.  Sometimes, the source will contain a comment about how it works, but I don&#8217;t see many of those.</p>
<p>You can also look for dependencies on other scripts that handle gaining access to a machine.  Here is a bit from 21725:</p>
<pre>
script_dependencies(&quot;netbios_name_get.nasl&quot;, &quot;smb_login.nasl&quot;,
  &quot;smb_registry_full_access.nasl&quot;, &quot;smb_enum_services.nasl&quot;);
script_require_keys(&quot;SMB/name&quot;, &quot;SMB/login&quot;,
  &quot;SMB/password&quot;, &quot;SMB/registry_full_access&quot;,
  &quot;SMB/transport&quot;);
script_require_ports(139, 445);
</pre>
<p>This one is pretty obviously going to look for an entry in the Windows registry to see if a particular item is installed.</p>
<p>Examining the Nessus scan logs can also help.  If scripts require access, you will see errors indicating that a plugin doesn&#8217;t have what it needs in order to run.  There is also some information on the Nessus site about <a href="http://blog.tenablesecurity.com/2006/09/understanding_t.html">network checks</a> which indicates that if the plugin has that phrase in the name, it uses a passive method.</p>
<p>Maybe if I took the time to learn the Nessus plugin language, things would be more clear to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whitakerfamily.ws/blogs/jason/archives/23/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Support for bulk manual registrations</title>
		<link>http://www.whitakerfamily.ws/blogs/jason/archives/13</link>
		<comments>http://www.whitakerfamily.ws/blogs/jason/archives/13#comments</comments>
		<pubDate>Mon, 15 Jan 2007 17:11:20 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[NetReg (archived)]]></category>

		<guid isPermaLink="false">http://www.whitakerfamily.ws/blogs/jason/archives/13</guid>
		<description><![CDATA[The school uses NetReg&#8217;s DHCP server to support lab machines as well as students and faculty. They want the lab machines to automatically be registered with NetReg so that users don&#8217;t have to register them with their own personal IDs. NetReg provides a manual registration function for one MAC address at a time, but that [...]]]></description>
			<content:encoded><![CDATA[<p>The school uses NetReg&#8217;s DHCP server to support lab machines as well as students and faculty.  They want the lab machines to automatically be registered with NetReg so that users don&#8217;t have to register them with their own personal IDs.  NetReg provides a manual registration function for one MAC address at a time, but that gets cumbersome for entering hundreds of lab machines.  In addition, clearing all registrations will clear the manually registered machines, too.</p>
<p>I added functionality to admin.cgi to allow multiple user name/MAC address combinations to be entered at once.  Under the covers, this new function calls the manual registration URL over and over for each entry.  This way, all the checks and file locking that are already in place for the single manual registration will still be used.</p>
<p>Additionally, these bulk entries are saved into a separate file.  I also provide new functions to load the registrations from this file into NetReg and to clear them out.  So, you can clear all registrations without having to enter the bulk registrations all over again.  After you clear all registrations, you simply reload all of your previous bulk registrations from the special file with the push of one button.</p>
<p>Now, for the scary part.  I wrote all of this new functionality using PHP.  I don&#8217;t know Perl very well (in fact I find the syntax mind numbing), so I had to do some trickery to integrate the PHP scripts with the existing Perl.  Yes, I am a bad person.  I&#8217;m sure that <a href="http://www.martinfowler.com/">Martin Fowler</a> has written a book about my kind and made millions from it.  But, if you are not horrified, read on!</p>
<p>I made changes to add new forms and buttons for these functions to the &#8220;Manual Registration&#8221; page (seemed easier than dealing with the image map of links). Between the submit button and print_footer() call of reg_form() in admin.cgi, here’s what is new:<br />
<a id="p14" href="/blogs/jason/wp-content/uploads/2007/01/admincgi.txt" title="admin.cgi changes to add new functions">admin.cgi.txt</a>
</p>
<p>These new PHP files are installed in the same directory with admin.cgi:<br />
<a id="p15" href="/blogs/jason/wp-content/uploads/2007/01/netregphp.txt" title="print_header(),  print_footer() and other functions">netreg.php</a><br />
<a id="p16" href="/blogs/jason/wp-content/uploads/2007/01/bulkregstartphp.txt" title="bulk registration validation page">bulkregstart.php</a><br />
<a id="p17" href="/blogs/jason/wp-content/uploads/2007/01/bulkregphp.txt" title="bulk registration page">bulkreg.php</a><br />
<a id="p18" href="/blogs/jason/wp-content/uploads/2007/01/reloadbulkphp.txt" title="reload bulk registrations page">reloadbulk.php</a><br />
<a id="p19" href="/blogs/jason/wp-content/uploads/2007/01/clearbulkphp.txt" title="clear bulk registrations page">clearbulk.php</a><br />
<a id="p20" href="/blogs/jason/wp-content/uploads/2007/01/viewbulkphp.txt" title="view bulk registrations page">viewbulk.php</a><br />
<a id="p21" href="/blogs/jason/wp-content/uploads/2007/01/clearregsphp.txt" title="clear all registrations page">clearregs.php</a>
</p>
<p>The functions to support clearing all registrations are also included in these changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whitakerfamily.ws/blogs/jason/archives/13/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix append_host_entry in admin.cgi to print header/footer</title>
		<link>http://www.whitakerfamily.ws/blogs/jason/archives/12</link>
		<comments>http://www.whitakerfamily.ws/blogs/jason/archives/12#comments</comments>
		<pubDate>Mon, 15 Jan 2007 16:24:40 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[NetReg (archived)]]></category>

		<guid isPermaLink="false">http://www.whitakerfamily.ws/blogs/jason/archives/12</guid>
		<description><![CDATA[Very simply, it looks like a successful manual registration encounters a &#34;premature end of script&#34; error. I noticed that the append_host_entry function was not calling print_header() or print_footer() around the call to print_manreg() at the end of the routine, so I added those calls.]]></description>
			<content:encoded><![CDATA[<p>Very simply, it looks like a successful manual registration encounters a &quot;premature end of script&quot; error.  I noticed that the append_host_entry function was not calling print_header() or print_footer() around the call to print_manreg() at the end of the routine, so I added those calls.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whitakerfamily.ws/blogs/jason/archives/12/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing all registrations</title>
		<link>http://www.whitakerfamily.ws/blogs/jason/archives/11</link>
		<comments>http://www.whitakerfamily.ws/blogs/jason/archives/11#comments</comments>
		<pubDate>Mon, 15 Jan 2007 15:19:22 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[NetReg (archived)]]></category>

		<guid isPermaLink="false">http://www.whitakerfamily.ws/blogs/jason/archives/11</guid>
		<description><![CDATA[One feature missing from NetReg is the ability to clear all registrations in order to force network users to register again. Forcing everyone to register again gives another opportunity to scan their machines for vulnerabilities with the Nessus ScanLite plugin. All that needs to be done to clear registrations is to empty the netreg.registered file [...]]]></description>
			<content:encoded><![CDATA[<p>One feature missing from NetReg is the ability to clear all registrations in order to force network users to register again.  Forcing everyone to register again gives another opportunity to scan their machines for vulnerabilities with the Nessus ScanLite plugin.</p>
<p>All that needs to be done to clear registrations is to empty the netreg.registered file contents.  NetReg stores registrations in this file in the form of a dhcpd.conf host entry.  The dhcpd.conf file includes this NetReg file in order to pick up the known hosts that have registered.  Making any change to this file will trigger a dhcpd restart via the refresh-dhcpdconf script, then all hosts will be unknown again.  However, the dhcpd server will remember the leases that it has given out, so these need to be cleared, as well.</p>
<p>I added a function to the admin.cgi script to clear all registrations by emptying out the netreg.registered file (this will be shown in a following post that covers other changes to admin.cgi).  I made corresponding changes to the refresh-dhcpdconf script to look at the size of the netreg.registered file and if it is zero, also remove the dhcpd.leases files (see previous post with refresh-dhcpdconf).</p>
<p>The result is a button on the admin site to clear all registrations that empties the netreg.registered file, triggering the clearing of dhcpd leases and a dhcpd restart.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whitakerfamily.ws/blogs/jason/archives/11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

