Nexpose ships with a great amount of performance tuning options. There are situation were you want to take “the governor” off from time to time . For those cases, the below should yield some quite interesting results….
**The below should only be done on a LAN and with high throughput.**
IN YOUR NEXPOSE CONSOLE:
In scan template change packets per second min and max to 15k
Create/Modify the CustomEnvironment.properties located in either the nsc, or nse directories of the install with the following lines (Based on a thread count of 5):
Save the file and restart the service.
Note: when copying from Outlook in Windows it can change the dash’s (–) to a different type of dash and may need to be redone.
echo “com.rapid7.nexpose.scan.nmap.custom=–max-hostgroup 5”>> /opt/rapid7/nexpose/nsc/CustomEnvironment.properties
echo “com.rapid7.nexpose.scan.nmap.custom=–max-hostgroup 5”>> /opt/rapid7/nexpose/nse/CustomEnvironment.properties
I came across this again and figured I’d post it as reference for future conversations. This many times is hard for folks to wrap their head around which I can completely understand. “An attacker isn’t going to have white listed access…”
The deal is no matter how good your vuln scanner is theres no replacement for human intelligence. Not to mention as PCI describes… technology SNAFU’s.
Perform a Scan without Interference from IDS/IPS
“In order to ensure that reliable scans can be conducted, the ASV scan solution must be allowed
to perform scanning without interference from intrusion detection systems (IDSs) or intrusion
prevention systems (IPSs). Such “active” protection systems may react differently to an
automated scanning solution than they would react to a targeted hacker attack, which could
cause inaccuracies in the scan report. ” PCI DSS, v1.2 ASV Program Guide Reference, v1.0 March 2010
OLDIE BUT GOODIE – NSA’s INTRO TO DEFENSE: http://www.nsa.gov/ia/_files/support/defenseindepth.pdf
VLAN trunking has a number of benefits in an enterprise environment from cost and configuration reduction to security enhancements. VLAN trunking utilizes additional frame encapsulation in the IEEE 802.1Q format which contains guidance on where the traffic should be routed. This enables a single host to route traffic to various segments without needing multiple physical interfaces. In addition VLAN Trunking can allow devices to be logical grouped verse physical grouping allowing devices to be moved without requiring overhead with making additional configuration. Aside from the configuration benefits VLAN’s also make ARP Spoofing and ARP Poisoning much more difficult for an attacker.
The first requirement is to make sure you can route traffic properly, is a virtual or physical device that will tag the Ethernet frames with the 802.1Q tag. VLAN tagging can be done through a number of methods such as a virtual host (such as ESX) or by installing an 802.1Q support package at the OS level.
Below I’ve outlined two methods which will enable your NeXpose instance to recognize your currently configure VLAN/VDOM segments. Keep in mind that the target environment must have the drivers necessary to support 802.1Q in order to route traffic.
VMwares ESX server support 3 different methods for VLANing which can be found here.
*Make sure you confirm that there is not identical IP’s used in the various VLANs. If this is the case, it is recommended that additional engines are used to differentiate the segments.
The easiest method to install the vlan package is by using apt-get: apt-get install vlan This will install both the driver and the module needed. Additionally, it makes the module persistent across reboots.
If you need to install the package manually, then download the appropriate package for your kernel, OS, and hardware. This is tutorial will focus on Ubuntu 8.04 aka Hardy (currently the standard R7 Appliance build).You can select the appropriate VLAN package here.
After you get the dep package onto the machine you just run the following command to install it:
dpkg -i vlan_1.9-3_amd64.deb
You will need to load the module by hand using:
Additionally, you will need to make the module persistent across reboots.
echo 8021q >> /etc/modules
Now that the driver and module have been installed and loaded, you can configure your VLANs. There are tools such as vconfig that can be used to configure the VLAN’s however its easy enough to do it manually.
You can locate your interfaces file here:
The sub-interfaces method is used here (as its the traditional Linux convention however we could have just as well used vlan2, vlan3, etc. instead. If you have an internal schema that you define your vlans you should keep this consistant.
The VLAN’s do NOT need gateway’s entry defined. They will use the physical adapters gateway. The physical adapter will handle the vlan’s accordingly. There should only be 1 gateway, either associated with the physical interface or associated to a virtual interface.
VLAN’s are a switching functions and as such, operate at Layer 2 of the OSI Model. Therefore, in order to route packets between VLAN’s, a Layer 3 Router will be needed. It is assumed that if you are currently running 802.1Q this won’t be a problem.
To check the VLAN use:
cat /proc/net/vlan/eth0.2 or cat /proc/net/vlan/config
Below is a sample what your interfaces file should look like when completed:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# PRIMARY physical interfaces(s)
auto eth0 #First Physical Interface
iface eth0 inet dhcp #Settings for DHCP
#THIS SECTION OF THE PRIMARY INTERFACES FILE SHOULD BE UN-COMMENTED IF A STATIC IP IS USED
#iface eth0 inet static #Settings for Static IP
#address 10.0.1.2 #Static IP
#netmask 255.255.255.0 #Static Netmask
#gateway 10.0.1.1 #Static Gateway
#auto eth1 #Second Physical Interface
#iface eth1 inet dhcp #Settings for DHCP
# VLAN interface(s)
auto eth0.2 #Virtual Interface for VLAN2
iface eth0.2 inet static #Settings for Static IP
address 192.168.2.2 #Static IP
netmask 255.255.255.0 #Static Netmask
vlan_raw_device eth0 #Associate virtual interface with physical device
auto eth0.3 #Virtual Interface for VLAN2
iface eth0.3 inet static #Settings for Static IP
address 192.168.3.2 #Static IP
netmask 255.255.255.0 #Static Netmask
vlan_raw_device eth0 #Associate virtual interface with physical device
Since Microsoft is on this new staggered pattern of releases, we can expect a feast or famine every other month…so get used to it. Depending on what side of the desk you sit on you can adjust the context. With that being said, this month’s release brought us 3 patches addressing 4 vulnerabilities. I think we were all expecting to see the MHTML protocol handler issue resolved, however it didn’t make the cut. Make sure IE is in restricted mode or at least you’re restricting ActiveX and Active Scripting for your users until the fix is released. This vulnerability is already being leveraged for geo-political warfare according to Google.
MS11-015 – CVE-2011-0042
This vulnerability is exposed when the Stream Buffer Engine (SBE) trys to parse “.dvs-ms” files. This limitation will allow any of your IE users to be remotely exploited when using Windows Media Center or Media Player to play these files. You can expect social engineering vectors to be used here… emails pointing to a DVS file or an iFrame rendering one.
The last two I won’t spend too much time on them, as they fall in line with the not so surprising DLL Hijacking exposures we’ve been seeing from Microsoft. You’ll also see them called “binary planting vulnerabilities”…at the end of the day they’re the same issue. HD has a great post detailing the characteristics of this exposure here.
Below is the official breakdown of the March 2011 Patch Tuesday Release:
MS11-015/KB2510030 – Critical (XP, Vista, 7)/Important (2008 R2) Vulnerabilities in Windows Media Could Allow Remote Code Execution (2510030) This security update resolves one publicly disclosed vulnerability in DirectShow and one privately reported vulnerability in Windows Media Player and Windows Media Center. The more severe of these vulnerabilities could allow remote code execution if a user opens a specially crafted Microsoft Digital Video Recording (.dvr-ms) file. In all cases, a user cannot be forced to open the file; for an attack to be successful, a user must be convinced to do so. **PATCH ASAP**
MS11-016/KB2494047 – Important (Microsoft Groove 2007): Vulnerability in Remote Desktop Client Could Allow Remote Code Execution (2508062) This security update resolves a publicly disclosed vulnerability in Windows Remote Desktop Client. The vulnerability could allow remote code execution if a user opens a legitimate Remote Desktop configuration (.rdp) file located in the same network folder as a specially crafted library file. For an attack to be successful, a user must visit an untrusted remote file system location or WebDAV share and open a document from this location that is then loaded by a vulnerable application.
MS11-017/KB2508062 – Important (CP, Vista, 7, 2003, 2008, 2008 R2): Vulnerability in Microsoft Groove Could Allow Remote Code Execution (2494047) This security update resolves a publicly disclosed vulnerability in Microsoft Groove that could allow remote code execution if a user opens a legitimate Groove-related file that is located in the same network directory as a specially crafted library file. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.
Until next time….
For as long as I’ve been at R7, we’ve struggled with articulating the power JESS has on the assessment process. The ability to emulate human function is priceless when trying to identify exposures.
JESS has one of the more compelling stories in the evolution of multi-layered assessment. The ability for NeXpose to take information found real-time and action on it is game changing. Below Ernest Friedman-Hill demonstrates the AI engine at very basic but consumable level.
The ‘Pose ships with a number of policy checks that are pre-defined however can be modified. Many times this functionality is overlooked because the majority of the templates disable these checks by default. You can always enable them and use the “Exhaustive” scan template if you forget the syntax. There are a number of policy checks shiped, but I will focus on the most extensible.
The policy information is best found by viewing the file directly. You will see there are a number of checks here, but more advanced users typically utilize it as a framework. These files can be customized and used to harden devices or enforce internal policy on Windows, Oracle and Domino.
If you have an organization specific policy that need to be enforce, custom vulnerability checks may be necessary. For example…”Here at Acme having USB drives enabled is a violation of our security policy”. A check would be written to identify this scenario creating a positive or negative condition. On the reporting side the policy report would present a conform or violate on the policy.
NeXpose Scan Template Syntax
To customize the predefined policy use the below syntax. Before you kick off your scan, off make sure credentials are added.
Workstation policy file name – basicwk.inf
Domain controller policy file name – basicdc.inf
The Files Are In The Computer…
If you want to review the predefined policies or create your own, the policy files can be found below.
I think we all knew this was coming…January’s release was just too light. This month Microsoft released 12 updates which address 22 vulnerabilities. There were 3 critical updates this release and 9 important fixes. The honorable mention would have to go to the CSS recursive import fix.
MS11-003 – CVE-2010-3971- This issue effects the way Cascading Style Sheets access memory in IE. By creating a “use-after-free” condition the attacker is given an opportunity to slip in and execute code on the target. This code execution occurs when a C++ object is re-used after it has been de-allocated. Memory that was previously allocated for the object can be re-used by an attacker. This bug would allow full control of the victims machine if exploited… “kinda” a big deal =|
MS11-006 – CVE-2010-3970 – Say Cheese? Those holiday party pics are the perfect place for one of these shady images to be buried. After convincing a user to browse to a network share to view a malious thumbnail, the exploit targets the Windows Shell. Because of IE’s inability to parse a negative “biClrUsed” value, the results is a stack-based buffer overflow. This exploit allows an attacker to then take full control at the users privilege level.
MS11-007 – CVE-2011-0033 – This issue targets the Microsoft/Adobe joint venture OpenType CFF(Compact Font Format). Your users are all smiles knowing that they have a secret admire for Valentines. After browsing a page and rendering the malicious font, “Be Mine” takes on a whole new meaning. This vulnerability targets a weakness in the way that the OpenType CFF validates parameter values. If exploited this would let the attacker run arbitrary code in kernel mode. This is the perfect example of why security awareness trainings shouldn’t be back burnered.
Below is the official breakdown of the February 2011 Patch Tuesday Release:
|Cumulative Security Update for Internet Explorer (2482017)
This security update resolves two privately reported vulnerabilities and two publicly disclosed vulnerabilities in Internet Explorer. The vulnerabilities could allow remote code execution if a user views a specially crafted Web page using Internet Explorer or if a user opens a legitimate HTML file that loads a specially crafted library file. An attacker who successfully exploited any of these vulnerabilities could gain the same user rights as the local user. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.
This security update resolves a publicly disclosed vulnerability in the Windows Shell graphics processor. The vulnerability could allow remote code execution if a user views a specially crafted thumbnail image. An attacker who successfully exploited this vulnerability could gain the same user rights as the logged-on user. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.
This security update resolves a privately reported vulnerability in the Windows OpenType Compact Font Format (CFF) driver. The vulnerability could allow remote code execution if a user views content rendered in a specially crafted CFF font. In all cases, an attacker would have no way to force users to view the specially crafted content. Instead, an attacker would have to convince users to visit a Web site, typically by getting them to click a link in an e-mail message or Instant Messenger message that takes users to the attacker’s Web site.
This security update resolves a publicly disclosed vulnerability in Microsoft Internet Information Services (IIS) FTP Service. The vulnerability could allow remote code execution if an FTP server receives a specially crafted FTP command. FTP Service is not installed by default on IIS.
This security update resolves a publicly disclosed vulnerability in Active Directory. The vulnerability could allow denial of service if an attacker sent a specially crafted packet to an affected Active Directory server. The attacker must have valid local administrator privileges on the domain-joined computer in order to exploit this vulnerability.
This security update resolves two privately reported vulnerabilities in Microsoft Visio. The vulnerabilities could allow remote code execution if a user opens a specially crafted Visio file. An attacker who successfully exploited either of these vulnerabilities could gain the same user rights as the logged-on user. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.
This security update resolves a privately reported vulnerability in the JScript and VBScript scripting engines. The vulnerability could allow information disclosure if a user visited a specially crafted Web site. An attacker would have no way to force users to visit these Web sites. Instead, an attacker would have to convince users to visit the Web site, typically by getting them to click a link in an e-mail message or Instant Messenger message that takes users to the attacker’s Web site.
This security update resolves a privately reported vulnerability in the Microsoft Windows Client/Server Run-time Subsystem (CSRSS) in Windows XP and Windows Server 2003.
The vulnerability could allow elevation of privilege if an attacker logs on to a user’s system and starts a specially crafted application that continues running after the attacker logs off in order to obtain the logon credentials of subsequent users. An attacker must have valid logon credentials and be able to log on locally to exploit this vulnerability. The vulnerability could not be exploited remotely or by anonymous users.
|Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (2393802)
This security update resolves one publicly disclosed vulnerability and one privately reported vulnerability in Microsoft Windows. The vulnerabilities could allow elevation of privilege if an attacker logged on locally and ran a specially crafted application. An attacker must have valid logon credentials and be able to log on locally to exploit these vulnerabilities. The vulnerabilities could not be exploited remotely or by anonymous users.
|Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (2479628)
This security update resolves five privately reported vulnerabilities in Microsoft Windows. The vulnerabilities could allow elevation of privilege if an attacker logged on locally and ran a specially crafted application. An attacker must have valid logon credentials and be able to log on locally to exploit these vulnerabilities. The vulnerabilities could not be exploited remotely or by anonymous users.
|Vulnerabilities in Kerberos Could Allow Elevation of Privilege (2496930)
This security update resolves one privately reported vulnerability and one publicly disclosed vulnerability in Microsoft Windows. The more severe of these vulnerabilities could allow elevation of privilege if a local, authenticated attacker installs a malicious service on a domain-joined computer.
This security update resolves a privately reported vulnerability in the Local Security Authority Subsystem Service (LSASS) in Windows XP and Windows Server 2003.
The vulnerability could allow elevation of privilege if an attacker logs on to a system and runs a specially crafted application. An attacker must have valid logon credentials and be able to log on locally to exploit this vulnerability. The vulnerability could not be exploited remotely or by anonymous users.
As much as I would love to say NeXpose never has issues the reality is,its software. In many cases NeXpose will encounter an unfavorable response from a target or a peer will drop the connection when being probed. While trying to isolate errors, the ability to search through multiple logs at the same time is priceless. [Enters] grep!
I’ve outlined a number of key search phrases that can be used to isolate specific issues.
I recommend the below command to pipe the search findings to a text file for review. If you would just like the output of the search printed to your screen, then replace “ > out.txt” with “| less”. After going into the appropriate log folder (mentioned in my 1/13/10 post) the below string can be used:
grep [search term] ./[log directory]/ns* > out.txt
**Keep in mind that Linux is case sensitive**
- Identify where external/remote scanning starts :
“Connecting to NSE”
- Identify where a local scan starts
- Policy issues :
“nexpose is running as”
- Serial Number *This search is used in the NSC log
- Finished scan *The search is used in the NSE log
- Remote Engine Issues *This command is used in the NSC log
“Failure communicating with NSE”
- Memory Error *This search is used in the NSE log
- Java Heap Space Error
“Java heap space”
- GC Memory Error
“GC overhead limit exceeded”
- Find if scan stopped or started
a) “(userID)” – find the specific user that started or stopped the scanner
b) “<>” – find if a scan was stopped or started
- Beginning of Scan Configuration *This command is used in the NSC log (helpful to find the list of sites)
“Scan configs” – This can be used this to find where the config ids start. You should being reading from Using it with grep will show the beginning of the scan configuration. It’s better to search for it in a program like notepad++ where we can begin to view the ids themselves after it.
- Search config Site by site
- IP’s in a site
- Starting Scan *This command is used in the NSC log
- Scan Stopped
- Look for connection to remote engines
“Updating remote scan engines”
- Look for recent successful connection to host
“Scan engine is current”
- Find complete scans
- If engine is shutdown
“stopped: Scan Engine Shutdown”
- Web service shutting down *This command is used in the NSC log
“HTTPServerMain shutting down…”
- Null Pointer
- Update issue *The search is used in the NSE log
- Alert delivery failure
“Failed to deliver”
- Export issue
“Generating report: Database Export”
As you know PCI is an ever changing beast. Whats nice is that many folks are finding funding for security efforts because of the mandate, but keeping up with the changes is a bit of a task. I’ve included a handy-dandy summary of the most recent changes effective January 1, 2011. You can also find the expanded version of this summary here.
I’ve had alot of people ask why would anyone pay for MS-Pro, when they can just use the Framework. There are a number of things that stand out between the products (like VPN Pivoting and even just basic things you can’t live without like a detailed audit trail). One of the key areas of improvement added to MS-Pro, is the ability to generate valid signed binarys for EXE’s. The payload is also placed in the signature section of the binary which obfuscates it even further.
This allows you to increase the success rate of exploitation substantially…especially when you’re up against white-listing or group policy restrictions. I’ve included the lab break down below.