Security Capture the Flag

30
Security Capture the Flag Enrico Bacis - Università degli Studi di Bergamo

Transcript of Security Capture the Flag

Page 1: Security Capture the Flag

Security Capture the FlagEnrico Bacis - Università degli Studi di Bergamo

Page 2: Security Capture the Flag

Hacker (def.)

~ A person who enjoys the intellectual challenge of creatively overcoming or circumventing limitations

Page 3: Security Capture the Flag

Cosa è una CTF?

“gioco” orientato alla sicurezza informatica

si prova a rompere dei sistemi (finti)“per divertimento” e per imparare

L’obiettivo è catturare delle flags

Page 4: Security Capture the Flag

FLAG{THi5_iS_4_f1aG}

Page 5: Security Capture the Flag

Perché?

● Divertimento

● Maturare esperienza in Information Security● Sfide modellate sulla base di problemi reali

○ A volte problemi reali modellati sulla base delle CTF?

● Reputazione (a volte)

Page 6: Security Capture the Flag

Online o sul posto

Page 7: Security Capture the Flag

Come?

Jeopardy Attack - Defense

Page 8: Security Capture the Flag

Tipi di challenges

cryptography

reverse engineering

binary exploitation

web application

stego / forensics

… e altri

team forti hanno generalmente

skills e esperienza in tutte queste

aree

Page 9: Security Capture the Flag

Cryptography

Tux Tux cifrato (male)

Page 10: Security Capture the Flag

Reverse Engineering

Page 11: Security Capture the Flag

Binary Exploitation (pwn)

Exploits:

● Buffer overflow● String format

exploit● ….

reverse

analyse

exploit

Page 12: Security Capture the Flag

Web application security

● SQL injection● Cross Site Scripting● Local File Inclusion● ...

Page 13: Security Capture the Flag

Steganography

Page 14: Security Capture the Flag

Forensics

HEY THESE ARE THE BEST ITALIAN SPIES TALKING. WE SENT OUR COLLEGUE TO DO A LITTLE JOB, HE SHOULD STOLE A SECRET CODE FROM A BAD GUY. BUT THE BAD GUY STILL DOESN'T HAVE A COMPUTER! -> !!!THAT'S CRAZY!!! INSTEAD, HE HAS A VERY GOOD STYLOGRAPHIC PEN. BUT OUR COLLEGUE WAS SO SMART THAT HE DID IT! HE STOLE THE SECRET FROM THAT BAD GUY! HE TOLD US "HEY GUYS, I STOLE THAT!" AAANDDD... WE KILLED HIM BECAUSE HE KNOWS TOO MUCH AHAHAHAHAHAHAHAHAHAHAHAH! NOW WE CAN'T FIGURE OUT HOW TO OPEN THE FILE THAT HE SENT US. PLZ HELP US :)

PoliCTF 2015

Page 15: Security Capture the Flag

Forensics

$ cat italian-spies-lost-a-file

Page 16: Security Capture the Flag

Forensics

g?

Page 17: Security Capture the Flag

Forensics

XYZ

Page 18: Security Capture the Flag

Forensics

Page 19: Security Capture the Flag

Good challenges = fun

● No guessing○ Non si deve tirare ad indovinare

● No bruteforcing○ sfida le persone, non i loro processori

● No standard challenges○ Google non deve saper risolvere le challenges

● Se ha il formato di una flag e sembra una flag, è una flag!

Page 20: Security Capture the Flag

Gli scriptssono tuoi amici

● Sii a tuo agio ad automatizzare

● Usa lo strumento più comodo:○ Bash, zsh, ...○ Python

Page 21: Security Capture the Flag

Livello automazione: OVER 9000!

Page 22: Security Capture the Flag

command-line-fu

● GNU/Linux utilities: grep, sed, awk, sort, cut, uniq● Network utilities: nc, dig, nmap● HTTP: curl, wget● . . .

Usa le UNIX pipesper concatenarei comandi tra loro

Page 23: Security Capture the Flag

È solo un gioco?

● Google○ CTF https://capturetheflag.withgoogle.com

● Facebook○ Piattaforma per CTF open source

https://github.com/facebook/fbctf

● Stripe○ CTF su web application security e sistemi distribuiti

● MOLTI altri

Page 24: Security Capture the Flag

“ a fool with a tool is still a fool ”

Page 25: Security Capture the Flag

CTF Time ( prossimi eventi )

https://ctftime.org/event/list/upcoming

Page 26: Security Capture the Flag

CTF Time ( write-ups )

https://ctftime.org/writeups

Page 27: Security Capture the Flag

CTF Time ( classifica )

https://ctftime.org/stats

Page 28: Security Capture the Flag

GitHub - CTF Write-ups

https://github.com/ctfs

Page 29: Security Capture the Flag

vimvaders: unibg-seclab CTF team

● Gruppo di persone interessate a temi di sicurezza informatica

● Principalmente studenti/ricercatori UniBG○ ma siamo aperti a proposte esterne○ magari anche tu!

vimvaders: http://vimvaders.github.io

UniBG seclab: http://seclab.unibg.it

Page 30: Security Capture the Flag

domande ?