SlideShare a Scribd company logo
Introduction to Hacking Competitions
CTF & CGC
Kir Chou @ Meetup Coffee with Science
1
2017 Nov
About me
Kir Chou
 Taiwanese
 SDE (Pythonista) @ Tokyo
2
note35 kir.choukirchou
Outline
i. What is CTF
ii. Problem categories
iii. Benefit from CTF
iv. Culture of CTF
v. What is CGC
vi. CRS example
3
What is CTF
Capture the flag
4
What is CTF
• CTF a.k.a Capture the Flag
• A Computer security competition – CTF Time
• For educational exercise and reward
• Require several skills
5
Styles of CTF
• Jeopardy (Common) - ジアパディー
• Multiple categories of problems
• Earn the most points in the time frame
6
Styles of CTF
• Attack-Defense (Advance)
• Given a machine (or a small network) to
defend on an isolated network
• Famous Competition: DEFCON | CSAW
• Game Record in DEFCON 2014 [Src]
7
DEFCON – Hacker World Cup
• History
• Found in 1992 / CTF started from 1996
• @Las Vegas in August
• How to enter?
• Champion in seed CTF (Hitcon, Seccon…etc)
• Top10 @ DEFCON Quals in May
8
HITCON
• Found in 2005
• 2017 DEFCON 2nd
• 2016 DEFCON 4th
• 2014 DEFCON 2nd
• Top 1 @ CTFTime Oct. 2017
• Why the name is 217?
9
Problem categories
10
Reverse
Pwnable
Crypto
Forensics
Web
Misc
Reverse
11
Download Find Key Earn Points
Stereotype of typical hacker
Some problems are relied on experience
Some problems are like pwnable problem
Recommend any background
0~ year
[example]
Pwnable
12
Download
Some problems don’t
give you any file
Find exploitable
vulnerability
Earn PointsConnect to server
Use exploitable
vulnerability to get shell
Hard to get started
once you learned, it’s fun but need talent
Recommend CS background
~1 year
[example]
Crypto
13
Very hard to learn
Crypto are usually hard without background
Recommend Math/CS background
4~ years
Various Source
Web, File, String.
Hardware…
Apply Math
(Modern Cryptography)
Earn Points
[example]
Forensics
14
File Apply
Analysis, Simulation…
Earn Points
Some problems are rely on experience
Most of problem need to learn tools
Recommend Any background
0~ year
[example]
Web
15
I have no idea how to explain this
Recommend for web geeek
∞ year
[example]
Misc
16
No one need to learn how to play
puzzle…right?
Recommend any background
0 year
Various Source
Web, File, String.
Hardware…
Play with puzzle Earn Points
Don't be addicted to this
this won’t help you become strong
[example][Maze]
Benefit from CTF
• Digging knowledges
• Be bullied & Bullying
• Earn money
17
Culture of CTF
• Strong is everything 強者至上主義
• Strong teams host famous CONF
• Strong teams host famous CTF
• Co-work workspace (eg. Trello, Slack)
• Write-up after ctf (Blog, SNS)
• writing blog about how you solve problem
18
Trello
19
https://trello.com/
What is CGC
• CGC a.k.a. Cyber Grand Challenge
• Found by DARPA since 2014 (every 2 years)
• Make a CRS(Cyber Reasoning System) to attack
and defense by system itself
• Challenge Qualification Event (Standalone)
• Challenge Final Event (Attack-defense)
20
Techniques
Static
Analysis
Dynamic
Analysis
Symbolic
Execution
Constraint
Solving
Data Flow
Tracking
Fuzz
Testing
[src][example]
Pwnable + Reverse !
How does CRS work?
Finishing all of them automatically
21
Maintain
service in the
system
Find exploit
vulnerabilities
Fix exploit
vulnerabilities
Analysis
program/process
CRS Architecture
22
Thanks for listening
23
Appendix
• An auto patching example of CRS
24
Example Flawed Program
25
void foo(char* str) {
strcpy(str, “1234567890”);
}
int main(void) {
char buf[5];
foo(buf);
return 0;
}
[example]
Example CRS
26
Triage
Fault Localization
27
Attackable path
Patch Flow
28
Patch Buffer Overflow
1.Decrease the bound to a suitable value
strncpy(dst, src, 100) → strncpy(dst, src, 40)
2.Increase the buffer size
char buf[40] → char buf[100]
29

More Related Content

What's hot (20)

PPTX
Caputre the flag
UIT
 
PDF
Capture The Flag
Huu Tung Nguyen
 
PPTX
Play,Learn and Hack- CTF Training
Heba Hamdy Farahat
 
PPTX
A closer look at CTF challenges
DNIF
 
PDF
Getting started with cybersecurity through CTFs by Shruti Dixit & Geethna TK
Cysinfo Cyber Security Community
 
PDF
MITRE ATT&CKcon 2018: Hunters ATT&CKing with the Data, Roberto Rodriguez, Spe...
MITRE - ATT&CKcon
 
PDF
MITRE ATT&CK Framework
n|u - The Open Security Community
 
PDF
Introduction to red team operations
Sunny Neo
 
PDF
Ceh v5 module 07 sniffers
Vi Tính Hoàng Nam
 
PDF
Threat Intelligence 101 - Steve Lodin - Submitted
Steve Lodin
 
PPTX
Introduction to Metasploit
GTU
 
PDF
Purple Team Exercise Workshop December 2020
Jorge Orchilles
 
PDF
Ch 5: Port Scanning
Sam Bowne
 
PDF
Building an InfoSec RedTeam
Dan Vasile
 
PDF
Metasploit for Penetration Testing: Beginner Class
Georgia Weidman
 
PDF
Introduction à la sécurité informatique
Yves Van Gheem
 
PDF
Red Team Framework
👀 Joe Gray
 
PDF
Adversary Emulation and Red Team Exercises - EDUCAUSE
Jorge Orchilles
 
PDF
Purple Team Exercises - GRIMMCon
Jorge Orchilles
 
PPT
13 asymmetric key cryptography
drewz lin
 
Caputre the flag
UIT
 
Capture The Flag
Huu Tung Nguyen
 
Play,Learn and Hack- CTF Training
Heba Hamdy Farahat
 
A closer look at CTF challenges
DNIF
 
Getting started with cybersecurity through CTFs by Shruti Dixit & Geethna TK
Cysinfo Cyber Security Community
 
MITRE ATT&CKcon 2018: Hunters ATT&CKing with the Data, Roberto Rodriguez, Spe...
MITRE - ATT&CKcon
 
MITRE ATT&CK Framework
n|u - The Open Security Community
 
Introduction to red team operations
Sunny Neo
 
Ceh v5 module 07 sniffers
Vi Tính Hoàng Nam
 
Threat Intelligence 101 - Steve Lodin - Submitted
Steve Lodin
 
Introduction to Metasploit
GTU
 
Purple Team Exercise Workshop December 2020
Jorge Orchilles
 
Ch 5: Port Scanning
Sam Bowne
 
Building an InfoSec RedTeam
Dan Vasile
 
Metasploit for Penetration Testing: Beginner Class
Georgia Weidman
 
Introduction à la sécurité informatique
Yves Van Gheem
 
Red Team Framework
👀 Joe Gray
 
Adversary Emulation and Red Team Exercises - EDUCAUSE
Jorge Orchilles
 
Purple Team Exercises - GRIMMCon
Jorge Orchilles
 
13 asymmetric key cryptography
drewz lin
 

Similar to Introduction of CTF and CGC (20)

PDF
A Beginner’s Guide to Capture the flag (CTF) Hacking
infosec train
 
PDF
Capture the flag
Kachkad Narender
 
PPTX
Emotional Support for "48 hours of failure"
GDSC UofT Mississauga
 
PPTX
CTF CyberX-Mind4Future[4].pptx
cifoxo
 
PDF
Capture The Flag
Omar Fathy
 
PDF
earning by s/doing/h4ck1ng/ - Our experience learning application security th...
NECST Lab @ Politecnico di Milano
 
PDF
How to strengthen the ctf web field for beginners(English)
kazkiti
 
PPT
HKUST Computer Science Festival 2013 - Seminar: Computer Science, Hacking and...
Anthony Lai
 
PDF
Why should you consider playing CTF.pdf
infosec train
 
PDF
Flag4 CTF
ijtsrd
 
PDF
Why everybody should do CTF / Wargames?
Miroslav Stampar
 
PPTX
Winter Hacks CTF.pptx
PRIYATHAMDARISI
 
PDF
CTFs, Bugbounty and your security career
Ibrahim El-Sayed
 
PPTX
Playing CTFs for Fun & Profit
impdefined
 
PPTX
Cyber Security Career
Hesham Elzoghby
 
PDF
Ctf hello,world!
Hacks in Taiwan (HITCON)
 
PDF
Capture the Flag Exercise Using Active Deception Defense
Fidelis Cybersecurity
 
PDF
20240921 - HITCON 社群活動《CTF 轉生-到了業界就拿出真本事》- bruce30262 講師分享
Hacks in Taiwan (HITCON)
 
PDF
[2012 CodeEngn Conference 06] posquit0 - Defcon 20th : The way to go to Las V...
Code Engn
 
PDF
CyberX_Slides_Melloni.Daniele.pdf
cifoxo
 
A Beginner’s Guide to Capture the flag (CTF) Hacking
infosec train
 
Capture the flag
Kachkad Narender
 
Emotional Support for "48 hours of failure"
GDSC UofT Mississauga
 
CTF CyberX-Mind4Future[4].pptx
cifoxo
 
Capture The Flag
Omar Fathy
 
earning by s/doing/h4ck1ng/ - Our experience learning application security th...
NECST Lab @ Politecnico di Milano
 
How to strengthen the ctf web field for beginners(English)
kazkiti
 
HKUST Computer Science Festival 2013 - Seminar: Computer Science, Hacking and...
Anthony Lai
 
Why should you consider playing CTF.pdf
infosec train
 
Flag4 CTF
ijtsrd
 
Why everybody should do CTF / Wargames?
Miroslav Stampar
 
Winter Hacks CTF.pptx
PRIYATHAMDARISI
 
CTFs, Bugbounty and your security career
Ibrahim El-Sayed
 
Playing CTFs for Fun & Profit
impdefined
 
Cyber Security Career
Hesham Elzoghby
 
Ctf hello,world!
Hacks in Taiwan (HITCON)
 
Capture the Flag Exercise Using Active Deception Defense
Fidelis Cybersecurity
 
20240921 - HITCON 社群活動《CTF 轉生-到了業界就拿出真本事》- bruce30262 講師分享
Hacks in Taiwan (HITCON)
 
[2012 CodeEngn Conference 06] posquit0 - Defcon 20th : The way to go to Las V...
Code Engn
 
CyberX_Slides_Melloni.Daniele.pdf
cifoxo
 
Ad

More from Kir Chou (20)

PDF
Learn from LL(1) to PEG parser the hard way
Kir Chou
 
PDF
Time travel: Let’s learn from the history of Python packaging!
Kir Chou
 
PDF
Python パッケージの影響を歴史から理解してみよう!
Kir Chou
 
PDF
The str/bytes nightmare before python2 EOL
Kir Chou
 
PPTX
PyCon TW 2018 - A Python Engineer Under Giant Umbrella (巨大保護傘下的 Python 碼農辛酸史)
Kir Chou
 
PPTX
PyCon TW 2017 - Why do projects fail? Let's talk about the story of Sinon.PY
Kir Chou
 
PPTX
GCC
Kir Chou
 
PPT
Spime - personal assistant
Kir Chou
 
PPTX
Ch9 package & port(2013 ncu-nos_nm)
Kir Chou
 
PPTX
Ch8 file system management(2013 ncu-nos_nm)
Kir Chou
 
PPTX
Ch7 user management(2013 ncu-nos_nm)
Kir Chou
 
PPTX
Ch10 firewall(2013 ncu-nos_nm)
Kir Chou
 
PDF
Knowledge Management in Distributed Agile Software Development
Kir Chou
 
PDF
Cms part2
Kir Chou
 
PDF
Cms part1
Kir Chou
 
PDF
Sitcon2014 community by server (kir)
Kir Chou
 
PDF
Webapp(2014 ncucc)
Kir Chou
 
PDF
廢除雙二一議題 保留方論點 (2013ncu全幹會)
Kir Chou
 
PPTX
Ch6 ssh(2013 ncu-nos_nm)
Kir Chou
 
PPTX
Ch5 network basic(2013 ncu-nos_nm)
Kir Chou
 
Learn from LL(1) to PEG parser the hard way
Kir Chou
 
Time travel: Let’s learn from the history of Python packaging!
Kir Chou
 
Python パッケージの影響を歴史から理解してみよう!
Kir Chou
 
The str/bytes nightmare before python2 EOL
Kir Chou
 
PyCon TW 2018 - A Python Engineer Under Giant Umbrella (巨大保護傘下的 Python 碼農辛酸史)
Kir Chou
 
PyCon TW 2017 - Why do projects fail? Let's talk about the story of Sinon.PY
Kir Chou
 
Spime - personal assistant
Kir Chou
 
Ch9 package & port(2013 ncu-nos_nm)
Kir Chou
 
Ch8 file system management(2013 ncu-nos_nm)
Kir Chou
 
Ch7 user management(2013 ncu-nos_nm)
Kir Chou
 
Ch10 firewall(2013 ncu-nos_nm)
Kir Chou
 
Knowledge Management in Distributed Agile Software Development
Kir Chou
 
Cms part2
Kir Chou
 
Cms part1
Kir Chou
 
Sitcon2014 community by server (kir)
Kir Chou
 
Webapp(2014 ncucc)
Kir Chou
 
廢除雙二一議題 保留方論點 (2013ncu全幹會)
Kir Chou
 
Ch6 ssh(2013 ncu-nos_nm)
Kir Chou
 
Ch5 network basic(2013 ncu-nos_nm)
Kir Chou
 
Ad

Recently uploaded (20)

PDF
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
 
PDF
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
PDF
custom development enhancement | Togglenow.pdf
aswinisuhu
 
PDF
Instantiations Company Update (ESUG 2025)
ESUG
 
PDF
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
PPTX
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
PPTX
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
PDF
Odoo Customization Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
PPTX
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
PDF
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
PDF
Notification System for Construction Logistics Application
Safe Software
 
PPTX
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PPTX
Processing with Claim Management Automation Solutions
Insurance Tech Services
 
PDF
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
PPTX
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
 
PDF
Australian Enterprises Need Project Service Automation
Navision India
 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
PDF
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
 
PDF
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
 
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
custom development enhancement | Togglenow.pdf
aswinisuhu
 
Instantiations Company Update (ESUG 2025)
ESUG
 
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
 
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
 
Odoo Customization Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
Transforming Lending with IntelliGrow – Advanced Loan Software Solutions
Intelli grow
 
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
Notification System for Construction Logistics Application
Safe Software
 
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
Processing with Claim Management Automation Solutions
Insurance Tech Services
 
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
 
Australian Enterprises Need Project Service Automation
Navision India
 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
 
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 

Introduction of CTF and CGC

  • 1. Introduction to Hacking Competitions CTF & CGC Kir Chou @ Meetup Coffee with Science 1 2017 Nov
  • 2. About me Kir Chou  Taiwanese  SDE (Pythonista) @ Tokyo 2 note35 kir.choukirchou
  • 3. Outline i. What is CTF ii. Problem categories iii. Benefit from CTF iv. Culture of CTF v. What is CGC vi. CRS example 3
  • 4. What is CTF Capture the flag 4
  • 5. What is CTF • CTF a.k.a Capture the Flag • A Computer security competition – CTF Time • For educational exercise and reward • Require several skills 5
  • 6. Styles of CTF • Jeopardy (Common) - ジアパディー • Multiple categories of problems • Earn the most points in the time frame 6
  • 7. Styles of CTF • Attack-Defense (Advance) • Given a machine (or a small network) to defend on an isolated network • Famous Competition: DEFCON | CSAW • Game Record in DEFCON 2014 [Src] 7
  • 8. DEFCON – Hacker World Cup • History • Found in 1992 / CTF started from 1996 • @Las Vegas in August • How to enter? • Champion in seed CTF (Hitcon, Seccon…etc) • Top10 @ DEFCON Quals in May 8
  • 9. HITCON • Found in 2005 • 2017 DEFCON 2nd • 2016 DEFCON 4th • 2014 DEFCON 2nd • Top 1 @ CTFTime Oct. 2017 • Why the name is 217? 9
  • 11. Reverse 11 Download Find Key Earn Points Stereotype of typical hacker Some problems are relied on experience Some problems are like pwnable problem Recommend any background 0~ year [example]
  • 12. Pwnable 12 Download Some problems don’t give you any file Find exploitable vulnerability Earn PointsConnect to server Use exploitable vulnerability to get shell Hard to get started once you learned, it’s fun but need talent Recommend CS background ~1 year [example]
  • 13. Crypto 13 Very hard to learn Crypto are usually hard without background Recommend Math/CS background 4~ years Various Source Web, File, String. Hardware… Apply Math (Modern Cryptography) Earn Points [example]
  • 14. Forensics 14 File Apply Analysis, Simulation… Earn Points Some problems are rely on experience Most of problem need to learn tools Recommend Any background 0~ year [example]
  • 15. Web 15 I have no idea how to explain this Recommend for web geeek ∞ year [example]
  • 16. Misc 16 No one need to learn how to play puzzle…right? Recommend any background 0 year Various Source Web, File, String. Hardware… Play with puzzle Earn Points Don't be addicted to this this won’t help you become strong [example][Maze]
  • 17. Benefit from CTF • Digging knowledges • Be bullied & Bullying • Earn money 17
  • 18. Culture of CTF • Strong is everything 強者至上主義 • Strong teams host famous CONF • Strong teams host famous CTF • Co-work workspace (eg. Trello, Slack) • Write-up after ctf (Blog, SNS) • writing blog about how you solve problem 18
  • 20. What is CGC • CGC a.k.a. Cyber Grand Challenge • Found by DARPA since 2014 (every 2 years) • Make a CRS(Cyber Reasoning System) to attack and defense by system itself • Challenge Qualification Event (Standalone) • Challenge Final Event (Attack-defense) 20 Techniques Static Analysis Dynamic Analysis Symbolic Execution Constraint Solving Data Flow Tracking Fuzz Testing [src][example] Pwnable + Reverse !
  • 21. How does CRS work? Finishing all of them automatically 21 Maintain service in the system Find exploit vulnerabilities Fix exploit vulnerabilities Analysis program/process
  • 24. Appendix • An auto patching example of CRS 24
  • 25. Example Flawed Program 25 void foo(char* str) { strcpy(str, “1234567890”); } int main(void) { char buf[5]; foo(buf); return 0; } [example]
  • 29. Patch Buffer Overflow 1.Decrease the bound to a suitable value strncpy(dst, src, 100) → strncpy(dst, src, 40) 2.Increase the buffer size char buf[40] → char buf[100] 29

Editor's Notes

  • #12: http://katc.hateblo.jp/entry/2016/10/10/122013
  • #13: https://poning.me/2016/10/29/secret-holder/
  • #14: https://193s.github.io/blog/2015/10/19/hitcon-2015-rsabin-writeup/
  • #15: http://lockboxx.blogspot.jp/2014/08/hitcon-2014-ctf-writeup-g8la-forensics.html
  • #16: http://icheernoom.blogspot.jp/2016/10/hitcon-ctf-2016-web-write-up.html
  • #17: https://blog.m157q.tw/posts/2015/10/19/hitcon-ctf-2015-quals-write-up/ https://www.youtube.com/watch?v=uPXhLQjpInU
  • #21: https://github.com/CyberGrandChallenge/ https://github.com/CyberGrandChallenge/samples/tree/master/examples/CADET_00001 http://archive.darpa.mil/cybergrandchallenge/ https://www.darpa.mil/program/cyber-grand-challenge
  • #26: https://github.com/SQLab/pin/tree/master/0ops_app http://www.thegeekstuff.com/2013/06/buffer-overflow https://dhavalkapil.com/blogs/Buffer-Overflow-Exploit/