Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

No Country For Old Vulnerabilities

Finding a common cross-site scripting vulnerability in Cisco's new IOS Software Checker Feature.

During my normal day-to-day work I interface with a number of websites while researching the details of recently released vulnerabilities. It was a pleasant surprise when one day this mundane task turned into unearthing a vulnerability in one vendor's security checker web interface.

Now, everyone makes mistakes. I know I do, Little Flippant Inaccuracies happen. It's always good to remember how small the security community can be and engaging your peers with respect is smarter than taking pot shots at them. This post is not intended to be a jab at the vendor in question, their web developers were quick to understand the issue and produce a patch, but not before I could have a little fun practicing some web application filter evasion techniques.

The day started like any other, I was looking into a few new vulnerabilities reports provided by Cisco. With each new vulnerability report I looked into though, instead of getting a list of affected software versions I was directed to the new "Cisco IOS Software Checker" tool. It's a useful tool for administrators who need to identify whether a version of Cisco IOS is missing security patches/updates. Unfortunately this tool is not so useful for identifying what advisories affect which versions of IOS (what I needed to do).

Inconvenienced by a minor change, I half jokingly submit some garbage into their form field and was rejected for not inputting a valid IOS version string - which I expected.

9929_72adddc7-3d73-4f48-9aa9-80c2c520d43e

Knowing that IOS version strings can contain a lot of various characters, I try again leading with a valid IOS version string. "15.1" followed by a bunch of A's. I was surprised to see the "AAAAAA" injection made it through onto the destination page.

Screen Shot 2014-11-13 at 8.12.40 AM

Seeing what looked like a weakness in the app, I felt compelled to poke around a bit. Looking through the HTML, I found one injection point with promise: an input field's onclick attribute.

9824_6ddf5202-cedf-4ce6-a3d6-04a546177728

Now I needed to figure out what, if any, useful characters I would have to work with. I submitted a sample string of HTML-specific characters and found a few that did not get mangled or changed in the response.

10582_90678055-2aa0-40f7-ab82-5d5958605a2d

That double quote and parenthesis they let through there, that made my day. I now knew what I would be able to inject into that input field and that was all that was needed.

The first step was to escape into that <input> tag, the onclick="…" attribute was my way in, with a basic double quote added to the attack string I would be able to add elements into the <input> tag. Here is the input tag after submitting 15.1"INJECTION_STUFF_HERE into the form.

<input … onclick="redrawRSS('15.1"INJECTION_STUFF_HERE … >

Now that I was outside of the onclick attribute, but stuck inside input, my first thought was to change the input field to an image type so I could get some visual response from their web tool.

<input … onclick="redrawRSS('15.1" type=image src=… >

This worked perfectly, but I wanted one to be sure I could execute javacsript as well … with a basic onload="" attribute added to the <input> tag. I was easily able to alert(1); on the destination page.

... but a basic alert(1); wouldn't suffice for the Spiderlabs Blog. I've spiced it up a little in the example walk through below:

11831_cb8dbdbe-03ab-429d-a5bd-40b342f47137

10390_86bb1d38-8416-4e9f-9877-def6431c4a2d

With the attack validated, the information was sent over to Cisco who quickly addressed the issue. Now, any similar requests to the Cisco IOS Software Checker are denied.

The moral of this story is: never trust user input, and blacklists fail. Blocking just the characters that are assumed bad did not work, allowing just one character too many left the application vulnerable to this old and basic attack method.

ABOUT TRUSTWAVE

Trustwave is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo