7. 臓
void foo()
{
int x = source();
if (x < MAX)
{
int y = 2 * x;
sink(y);
}
}
Abstract Syntax Trees (ASTs) Control Flow Graph Program Dependency Graph
8. 臓
void foo()
{
int x = source();
if (x < MAX)
{
int y = 2 * x;
sink(y);
}
}
Abstract Syntax Trees (ASTs)
Bi畛u di畛n c畉u
tr炭c m達 ngu畛n
Thi畉u th担ng tin
lu畛ng ho畉t 畛ng
Control Flow Graph
Bi畛u di畛n
lu畛ng th畛c thi
Kh担ng bi畛u di畛n c畉u
tr炭c c炭 ph叩p chi ti畉t
Control Flow Graph
Th畛 hi畛n r探 ph畛 thu畛c
d畛 li畛u v i畛u khi畛n
Kh担ng bi畛u di畛n c畉u
tr炭c c炭 ph叩p chi ti畉t
9. 臓
void foo()
{
int x = source();
if (x < MAX)
{
int y = 2 * x;
sink(y);
}
}
Code Property Graphs
= AST + CFG + PDG
10. Joern c嘆n b畛 sung th棚m c叩c l畛p th担ng tin cho CPGs
Code Property Graphs
26. >Detect Integer Overflow
畉u ti棚n ph畉i 畛nh ngh挑a 動畛c khu担n m畉u: Nh動 th畉 no l m畛t bug Integer Overflow?
L khi m畛t untrusted data 畛 d畉ng Integer, v r董i vo m畛t ph辿p t鱈nh c畛ng (ho畉c tr畛)
joern> val source = cpg.call("atoi")
val sink = cpg.call(Operators.addition)
sink.reachableByFlows(source).p
Integer Overflow in C
35. Zimbra Collaboration (aka ZCS) 8.8.15 and 9.0 has mboximport functionality that receives a ZIP archive and extracts files from
it. An authenticated user with administrator rights has the ability to upload arbitrary files to the system, leading to directory
traversal.
Description
CVE-2022-27925 Detail
Severity
PATH TRAVERSAL: REALWORLD
Scenario: reproduce l畉i cve v t狸m bi畉n th畛
36. PATH TRAVERSAL: REALWORLD
Approach: reproduce l畉i cve v t狸m bi畉n th畛
Untrusted data l file Zip, x叩c 畛nh source l c叩c method li棚n quan 畉n extract file
joern> val source = cpg.call.typeFullName(".*java.util.zip.ZipEntry.*")
Define sinks l m畛t vi sink c董 b畉n c畛a Path Traversal 畛 Java
T狸m t畉t c畉 動畛ng i m c坦 th畛 ch畉m 動畛c sink
joern> val path = sink.reachableByFlows(source).p
40. CyberJutsu Academy
WE TRAIN YOUR TEAM!
CyberJutsu JSC, since 2017.
Professionals training and cutting-edge penetration testing services.
We transform learners and fortify businesses.
Contact us: contact@cyberjutsu.io
Website: https://cyberjutsu.io