Wednesday, October 8, 2014

Cisco ASA | SSL VPN | Information Disclosure | CVE-2014-3392 | CSCuq29136

Cisco ASA Clientless SSL VPN Information Disclosure and Denial of Service Vulnerability


The following information is in regards to Cisco's ASA SSL VPN Information Disclosure. It will explain, in no great detail, the result of altering the value of a single parameter, and the data returned by the server. (http://tools.cisco.com/security/center/viewAlert.x?alertId=35916)
(http://www.securityfocus.com/bid/70306)
(http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3392)

Please note that no Cisco ASA SSL VPN equipment is owned by the author, therefore, information concerning the vulnerability is limited to an external perspective.

When testing, the first request made on the login page, of the SSL VPN, was a false username/password combination. The result of the request was a url similar to the following:

https://example.com/+CSCOE+/logon.html?a0=88&a1=5468652061757468656E7469636174696F6E20736696365206973206F66666C696E652E&a2=&a3=1

In the response URL it was noted that the parameter a0 was configured to be a means of displaying login error messages:


As a second request, a hyphen was prepended to the value 88 which resulted in the following error:

https://example.com/+CSCOE+/logon.html?a0=-88


Noting that the error had no direct reference to the login form, additional values were tested to confirm that the server was in actuality displaying “random” information.

After submitting various negative values to the server, the following request appeared to disclose the SNMP MIB (1) version used on the server:

https://example.com/+CSCOE+/logon.html?a0=-99999


With confirmation that negative values were some how being interpreted by the server, an automated process was than used to cycle through negative values.

The vast majority of responses contained data that was not directly readable. However, some requests, such as the following, were clearly understood:

https://example.com/+CSCOE+/logon.html?a0=-21494


Additional information disclosed by the server contained various listings of endpoint.os.hotfix's as noted in the following screen shot:

https://example.com/+CSCOE+/logon.html?a0=-34894


It should be noted that with the exception of -99999 the same request could seldom be made twice. The random data being returned has been confirmed by Cisco (2) as being “random memory locations”.

Contained in various other requests were what appeared to be, vpn certificates, file content, and additional system command USAGE information.

Although the above information is limited, it hopefully shows the potential this issue has in regards to obtaining information from the vulnerable system(s).

*** UPDATE ***
There is now a shell script to test for this issue:
github.com/monsi/CRAM



References:
1. Appendix C - MIB Support (http://www.cisco.com/c/en/us/td/docs/security/nac/appliance/configuration_guide/48/cam/48cam-book/m_apx_mib.pdf)
2. http://tools.cisco.com/security/center/viewAlert.x?alertId=35917

Wednesday, November 16, 2011

QEMU - VNC - Stupid keyboard issue

So, I ran across an issue that was rather frustrating. Here is the background.

I had installed a plain-vanilla debian machine and then installed libvirt, kvm/qemu and virt-manager (with some other packages but those aren't important).

I had tried to do X11 forwarding on the machine but ran into an issue when trying to use virt-manager to install a guest machine. When ever I would type it would print something other than what I pressed. asdf = abfh.

This wasn't just an issue with X11 forwarding. I also installed tightvncserver and found the same issue. When I would vnc to the Host machine everything would be fine, but when I tried to do an installation through virt-manager I would run into the issue as previously stated.

After looking at everything else I finally took a look at the default keyboard for debian (/etc/default/keyboard) and found that it was "pc105" rather than the plain PC keyboard "pc104" (or pc101).

I know, you are all think "well duh...!" but I didn't know that. After changing the keyboard and rebooting everything started to work fine.

Stupid keyboard layouts.


---UPDATE---
So, I was right but I was wrong. It looks like in Virt-Manager they removed the default keymap for the new guest machines. If you go and delete the current display and add a new one you can uncheck "Keymap [] same as host" and input "en-us". This should fix the issue. (I hope)

Sunday, October 30, 2011

AUTH TLS + FEAT

I ran across a vulnerability a little while ago that was rather interesting. FTP/FTPS has a "FEAT" or Features command that can be passed to the server in order to find out what features are available. But with FTPS this should only work "After" you are authenticated.

Nessus reported the issue but gave the following output for steps to duplicate:
Nessus sent the following two commands in a single packet :

AUTH TLS\r\nFEAT\r\n

And the server sent the following two responses :

234 AUTH command ok. Expecting TLS Negotiation.
211-Extended features supported:
LANG EN*
UTF8
AUTH TLS;TLS-C;SSL;TLS-P;
PBSZ
PROT C;P;
CCC
HOST
SIZE
MDTM
211 END
Now, I may not be the smartest person when it comes to telnet but I am pretty sure you are not able to pass '\r\n' into a telnet session. After making a few attempts my suspicions were confirmed and I was left wondering what it was I needed to do to get the command to execute properly.

I turned to google for help and found a forum that answered my question: control character for 'return'/'enter' = ^J. By using ^J I was able to insert a 'return' but not have the return executed until after I physically hit the return button when I was done with the commands I wanted to execute.

testing:~ hyrum$ telnet www.testsite.com 21
Trying 1.2.3.4...
Connected to www.testsite.com.
Escape character is '^]'.
220 Microsoft FTP Service
AUTH TLS^JFEAT
234 AUTH command ok. Expecting TLS Negotiation.
211-Extended features supported:
 LANG EN*
 UTF8
 AUTH TLS;TLS-C;SSL;TLS-P;
 PBSZ
 PROT C;P;
 CCC
 HOST
 SIZE
 MDTM
211 END
By inserting ^J after the 'AUTH TLS' it was possible to add the FEAT command which according to the rftc (rfc4217) if you pass the FEAT command to the server the server must respond with the available features:

"If a server supports the FEAT command, then it MUST advertise supported AUTH, PBSZ, and PROT commands in the reply, as described in section 3.2 of [RFC-2389]."


It ended up being that simple. Control Characters really do come in handy sometimes. So, the next time you want to pass two commands while in a telnet session don't forget about ^J.