fbsamples / fbctf-2019-challenges
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 767 units with 9,524 lines of code in units (58.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (346 lines of code)
    • 25 medium complex units (1,095 lines of code)
    • 77 simple units (2,381 lines of code)
    • 662 very simple units (5,702 lines of code)
0% | 3% | 11% | 25% | 59%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go0% | 8% | 35% | 17% | 39%
cc0% | 31% | 9% | 0% | 58%
cpp0% | 13% | 17% | 36% | 32%
py0% | 0% | 4% | 15% | 79%
c0% | 0% | 3% | 41% | 55%
php0% | 0% | 15% | 30% | 53%
h0% | 0% | 0% | 45% | 54%
rs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
misc/homework_assignment_13370% | 10% | 33% | 13% | 41%
pwnables/raddest_db0% | 23% | 7% | 0% | 69%
misc/osquery_game0% | 20% | 26% | 34% | 18%
misc/j0hnny_50% | 0% | 45% | 29% | 24%
reversing/matryoshka0% | 0% | 16% | 31% | 52%
web/secret_note_keeper0% | 0% | 14% | 23% | 62%
crypto/keybaseish0% | 0% | 14% | 15% | 70%
crypto/frank0% | 0% | 6% | 0% | 93%
crypto/storagespace0% | 0% | 7% | 10% | 82%
web/products-manager0% | 0% | 15% | 30% | 53%
pwnables/asciishop0% | 0% | 0% | 37% | 62%
reversing/SOMBRERO_ROJO0% | 0% | 0% | 59% | 40%
reversing/nomoreseacrypts0% | 0% | 0% | 37% | 62%
pwnables/kpets0% | 0% | 0% | 33% | 66%
misc/whysapp0% | 0% | 0% | 68% | 31%
web/events0% | 0% | 0% | 63% | 36%
crypto/postquantumsig0% | 0% | 0% | 20% | 79%
pwnables/babylist0% | 0% | 0% | 19% | 80%
web/pdfme0% | 0% | 0% | 63% | 36%
pwnables/otp_server0% | 0% | 0% | 0% | 100%
crypto/netscream0% | 0% | 0% | 0% | 100%
pwnables/rusty_shop0% | 0% | 0% | 0% | 100%
pwnables/rank0% | 0% | 0% | 0% | 100%
pwnables/overfloat0% | 0% | 0% | 0% | 100%
reversing/go_get_the_flag0% | 0% | 0% | 0% | 100%
misc/evil0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
cc
void eval()
in pwnables/raddest_db/raddest_db.cc
100 31 1
func main()
in misc/homework_assignment_1337/src/gen-go/ping/ping_bot-remote/ping_bot-remote.go
155 29 0
QueryData generate()
in misc/osquery_game/challenge.cpp
91 27 1
std::set getDstPositions()
in misc/osquery_game/challenge.cpp
62 24 1
func process_double()
in misc/j0hnny_5/server.go
62 20 3
func()
in misc/homework_assignment_1337/src/gen-go/ping/ping.go
57 20 1
func process_single()
in misc/j0hnny_5/server.go
54 17 3
func()
in misc/homework_assignment_1337/src/gen-go/ping/ping.go
47 16 1
def generate_smooth_prime()
in crypto/keybaseish/dsks.py
40 16 4
func process_upload()
in misc/j0hnny_5/server.go
42 15 1
func main()
in misc/homework_assignment_1337/src/main.go
63 15 0
bool tryValidMove()
in misc/osquery_game/challenge.cpp
28 14 2
function validate_secret()
in web/products-manager/src/add.php
18 14 1
cc
void RaddestDBDatabase::AddGetter()
in pwnables/raddest_db/raddest_db_database.cc
31 14 2
func process_triple()
in misc/j0hnny_5/server.go
43 13 3
def report_bugs()
in web/secret_note_keeper/web/app/app/main.py
43 13 0
func()
in misc/homework_assignment_1337/src/gen-go/ping/ping.go
37 12 1
func()
in misc/homework_assignment_1337/src/gen-go/ping/ping.go
37 12 1
func()
in misc/homework_assignment_1337/src/gen-go/ping/ping.go
37 12 1
func()
in misc/homework_assignment_1337/src/gen-go/ping/ping.go
37 12 1