nodeJS and Web APIs
74.4K views | +4 today
 
Scooped by Srdjan Strbanovic
onto nodeJS and Web APIs
March 19, 2014 5:02 PM
Scoop.it!

Bypassing web application firewalls using HTTP headers

Bypassing web application firewalls using HTTP headers | nodeJS and Web APIs | Scoop.it
Web application firewalls (WAF’s) are part of the defense in depth model
for web applications. While not a substitute for secure code, they offer
great options for filtering malicious input. Below is a story from a
real assessment where an enterprise deployment of such a device was
vulnerable to being bypassed. The vulnerability is one of a bad design
and/or configuration and as an attacker it was very useful. Read below
to find out more! ---------- Testing the security of an app in its
production deployment is important. While this app might have been
assessed in development or QA, when you deploy live you might introduce
new attack vectors due to configuration issues. Such was the case with
our fictional customer Heisenberg Bank. While firing up the assessment I
quickly ran into issues fuzzing all the application points I usually go
after first, see below: Well… that’s both humorous and unsatisfying.
After a bit of investigating I knew that I was up against a WAF that was
triggering on a few things: Rapid succession of POST request to
formsRapid succession of GET requests to *most* pagesLack of a CSRF
token*Bad* characters After one of these conditions were met it would
block me with said error code for 5 minutes. So, how to proceed? The
normal method of encoding payloads to bypass WAF regexes is hit or miss
these days. WAF’s have come a long ways. Still, I gave it a shot, no
dice. While waiting in one of my *timeouts* I decided to do some WAF
research. While going through several WAF implementation guides I found
a forum that mentioned integrating a WAF with your caching
service/device. It described a user’s trouble with standing up something
*like* Varnish or a proxy/accelerator appliance running on a different
host, and that the WAF was blocking that server. Of course the vendor
promptly replied that you can whitelist devices based on IP, allowing
them not be inspected by the WAF. At this point, everything is still
fine. Below is where things went bad for Heisenberg Bank and the WAF.
After reading more, I found that instead of doing a real lookup on
incoming requests (something akin to REMOTE_ADDR or something similar),
the WAF was looking at a *custom* HTTP header. This is how it’s supposed
to work if a user or other server contacts the WAF: Instead, the WAF
checks the requests HTTP Headers. The specific implementation was
checking the request for the header X-originating-IP. So, who would this
WAF be configured to trust? In this instance the default was… Itself!
Since I control all HTTP requests sent out of my browser I can easily
add this header fooling the WAF to think I was itself, allowing me to
bypass its protections completely: After further research there are
several headers that can be defined for WAF’s to whitelist (instead of
doing a proper lookup):
X-forwarded-forX-remote-IPX-originating-IPx-remote-addr There is also a
hit-list of *types* of addresses/configurations that *might* be
whitelisted/vulnerable. (some fictitious examples below): After figuring
out the bypass, the rest of the assessment yielded many other
vulnerabilities and was expedited due to the fact that I could bypass
the WAF. It was as simple as having my inline interception proxy add the
header to all requests. A simple solution is having your frontend proxy
strip all *non-standard* headers but then you’re still playing the cat
and mouse game of blacklisting. Better yet, consult with your WAF vendor
and see what headers are accepted and defaults are enabled. Then find a
solution that doesn’t rely on information that the attacker can forge.
In general you can also audit the security of HTTP headers on your site
using Gethead, a project from our dynamic testing team’s leader, Nathan
LaFollette (@httphacker). As always, feel free to reach out with any
questions via Twitter (@jhaddix) or via email (jason.haddix@hp.com).
Happy hacking! -------- Here at FoD we have a premium tier of our
dynamic application testing service. In this tier we give the app a
thorough grokking with one of our senior web penetration testers and our
industry leading tools. It goes through an extensive methodology driven
assessment. This vulnerability is akin to something that would show up
on that tier of test. To learn more about Fortify on Demand’s dynamic
assessments for web applications or mobile applications, visit the link
below: hp.com/go/fortifyondemand
No comment yet.
nodeJS and Web APIs
about node.js and Web APIs
Your new post is loading...
Your new post is loading...

Popular Tags

Scooped by Srdjan Strbanovic
February 10, 2012 9:07 AM
Scoop.it!

Cloudshift - A Node.js App Framework for haXe Programmers - AMT Blog

Cloudshift - A Node.js App Framework for haXe Programmers - AMT Blog | nodeJS and Web APIs | Scoop.it
RT @NodeJsCommunity: Cloudshift - A Node.js App Framework for haXe Programmers http://t.co/yGLkECgk #OpenSource #Nodejs #HaXe http://t.co/oUiT0Kh6...
No comment yet.
Scooped by Srdjan Strbanovic
July 26, 2017 6:55 AM
Scoop.it!

Rate limiting for FeathersJS HTTP (REST API) and Web Sockets connections (Express, Node.js)

Rate limiting for FeathersJS HTTP (REST API) and Web Sockets connections (Express, Node.js)
No comment yet.
Scooped by Srdjan Strbanovic
January 31, 2015 8:06 AM
Scoop.it!

CyberAgent/node-easymock

CyberAgent/node-easymock | nodeJS and Web APIs | Scoop.it
node-easymock - A simple but powerful mock server in nodejs
No comment yet.
Suggested by Lanie
January 22, 2015 8:16 AM
Scoop.it!

Free Cron Jobs | Online Webcron Service - EasyCron.com

Free Cron Jobs | Online Webcron Service - EasyCron.com | nodeJS and Web APIs | Scoop.it
EasyCron provides the most stable Cron Job Services. Here you can schedule cron jobs with execution logs, Email notifications, run time predictions and a bunch of other featuers!
No comment yet.
Scooped by Srdjan Strbanovic
January 2, 2015 12:08 PM
Scoop.it!

Design - Developer Center - Joyent

Node.js design best practices
No comment yet.
Scooped by Srdjan Strbanovic
December 23, 2014 11:55 AM
Scoop.it!

The Most Common API Security Hacks of 2014

2014 was the year of the API security hack. Snapchat, Twitter, Tinder – these companies and more all experienced malicious API security attacks that compromised their users’ data, and as a result, their credibility. So we looked at the hard numbers this year to determine the most prevalent types of API hacks and who is most vulnerable to a security breach. Check out the stats below so you can keep your APIs safeguarded for 2015.
No comment yet.
Scooped by Srdjan Strbanovic
December 18, 2014 8:07 AM
Scoop.it!

Roy Fielding on Versioning, Hypermedia, and REST

Roy Fielding on Versioning, Hypermedia, and REST | nodeJS and Web APIs | Scoop.it
Roy Fielding talks to Mike Amundsen about versioning on the Web, why hypermedia is a requirement in his REST style, the process of designing network software that can adapt over time, and the challenge of thinking at the scale of decades.
No comment yet.
Scooped by Srdjan Strbanovic
December 14, 2014 10:59 AM
Scoop.it!

ES6Rocks

ES6Rocks | nodeJS and Web APIs | Scoop.it
Articles and News about ECMA6: Harmony
No comment yet.
Scooped by Srdjan Strbanovic
December 12, 2014 4:55 PM
Scoop.it!

The Node Way - What is The Node Way?

The Node Way - What is The Node Way? | nodeJS and Web APIs | Scoop.it
Design patterns and best practices for building scaleable, maintainable and beautiful Node.js applications.
No comment yet.
Scooped by Srdjan Strbanovic
November 28, 2014 1:13 PM
Scoop.it!

koajs/kick-off-koa

koajs/kick-off-koa | nodeJS and Web APIs | Scoop.it
kick-off-koa - An intro to koa via a set of self-guided workshops
No comment yet.
Scooped by Srdjan Strbanovic
November 28, 2014 10:02 AM
Scoop.it!

Running scripts with npm | Jayway

Running scripts with npm | Jayway | nodeJS and Web APIs | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
November 28, 2014 9:30 AM
Scoop.it!

Moving from PhantomJS to node-webkit - Todd Wolfson

Transferring visual regression tests from PhantomJS to node-webkit for better node_modules/ support and more accurate screenshots.
No comment yet.
Scooped by Srdjan Strbanovic
November 25, 2014 3:52 PM
Scoop.it!

Node.js: "domain-local" storage

No comment yet.
Scooped by Srdjan Strbanovic
July 26, 2017 6:55 AM
Scoop.it!

supersamples

supersamples | nodeJS and Web APIs | Scoop.it
Up-to-date documentation for your Node.js REST API
No comment yet.
Scooped by Srdjan Strbanovic
January 31, 2015 8:08 AM
Scoop.it!

Building a simple REST API using Node.js , Restify.js and MongoDB (Mongoose.js) – Part 3 – Defining a schema and using a Model

Building a simple REST API using Node.js , Restify.js and MongoDB (Mongoose.js) – Part 3 – Defining a schema and using a Model | nodeJS and Web APIs | Scoop.it
Reblogged on WordPress.com
P1xt's curator insight, January 31, 2015 2:26 PM

Restify looks interesting

Scooped by Srdjan Strbanovic
January 31, 2015 7:52 AM
Scoop.it!

StrongLoop Arc aims to manage the whole Node.js API lifecycle - Gigaom

StrongLoop Arc aims to manage the whole Node.js API lifecycle - Gigaom | nodeJS and Web APIs | Scoop.it
As we know from the recent dustup around the forking of Node.js, people are passionate about that server-side JavaScript run-time environment.
No comment yet.
Scooped by Srdjan Strbanovic
January 7, 2015 1:42 PM
Scoop.it!

tejasmanohar/npm-algos

tejasmanohar/npm-algos | nodeJS and Web APIs | Scoop.it
npm-algos - Curated List of Node.js Modules Implementing Computer Science Concepts
No comment yet.
Scooped by Srdjan Strbanovic
January 2, 2015 12:03 PM
Scoop.it!

Top 10 Mistakes Node.js Developers Make

Top 10 Mistakes Node.js Developers Make | nodeJS and Web APIs | Scoop.it
Node.js expert Alexandru Vladutu discusses some of the most common mistakes that developers make when working with Node.
Scooped by Srdjan Strbanovic
December 19, 2014 11:13 AM
Scoop.it!

Node.js Best Practices - Part 2

Node.js Best Practices - Part 2 | nodeJS and Web APIs | Scoop.it
The next chapter of node.js best practices, featuring pre-commit checks, JavaScript code style checker and configuration best practices...
No comment yet.
Scooped by Srdjan Strbanovic
December 16, 2014 10:21 AM
Scoop.it!

BDD/TDD development from scratch with node.js/express

BDD/TDD development from scratch with node.js/express | nodeJS and Web APIs | Scoop.it
Clearly, the world is in dire need of another blogging engine, right? OK, perhaps not so much but I am very much in need of a website where I can show off my best work and a blog where I...
No comment yet.
Scooped by Srdjan Strbanovic
December 13, 2014 11:31 AM
Scoop.it!

RestfulGit: an open source web service for accessing git data « Hulu Tech Blog

RestfulGit: an open source web service for accessing git data « Hulu Tech Blog | nodeJS and Web APIs | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
December 11, 2014 8:16 AM
Scoop.it!

JavaScript Testing Recipes

JavaScript Testing Recipes | nodeJS and Web APIs | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
November 28, 2014 12:57 PM
Scoop.it!

The Basics of Node.js Streams

This article explores the basics of Node's readable and writable streams.
No comment yet.
Scooped by Srdjan Strbanovic
November 28, 2014 9:33 AM
Scoop.it!

The Blockchain Application Stack

The Blockchain Application Stack | nodeJS and Web APIs | Scoop.it
Last week I led a workshop at NYU’s Bitcoin Hackathon, HackBit, where I talked about Bitcoin as a Protocol, alternative uses for the Blockchain, and a little bit about the challenges and opportunities...
No comment yet.
Scooped by Srdjan Strbanovic
November 28, 2014 9:25 AM
Scoop.it!

Using Command Line Arguments in a Node Script

Using Command Line Arguments in a Node Script | nodeJS and Web APIs | Scoop.it
UX guy. Javascript hacker. Founder of Madera Labs and Drawer.
No comment yet.
Scooped by Srdjan Strbanovic
November 25, 2014 3:49 PM
Scoop.it!

Fighting Node callback hell with PureScript

No comment yet.