CS学习记录-探测_提取配置

<title></title>
C S
-
&
B e a c o n
C o b a l t ¨NBSP; S t r i k e
pa y l o a d
B e a c o n
Me t a s p l o i t F r a m e w o r k P a y l o a d
透过
⼊到
加到
Wo r d
通过
B e a c o n
h t t p s : //c o b a l t - s t r i k e . g i t h u b . i o /c o m m u n i t y _k i t / <https://cobalt-strike.github.io/community_kit/>
C o b a l t S t r i k e
⼀个
认证
D e f a u l t c e r t :
s s l . c e r t . s e r i a l : 1 4647 3198
h t t p s : //w w w . s h o d a n . i o /s e a r c h ? q u e r y = s s l . c e r t . s e r i a l % 3A 1 4647 31 98 <https://www.shodan.io/search?query=ssl.cert.serial%3A146473198>
以使
shod a n
8 0 0 +
号匹
C o b a l t S t r i k e
B e a c o n
什么
具包
C &C
认证
h t t p s : //w w w . s h o d a n . i o /h o s t /103. 1 53. 1 38. 248 <https://www.shodan.io/host/103.153.138.248>
3. 1 3 <https://download.cobaltstrike.com/releasenotes.txt>
C o b a l t S t r i k e
h t t p
h t t p
⼀个
h t t p s : //t r i a l . c o b a l t s t r i k e . c o m /h e l p - m a l l e a b l e - c 2 <https://trial.cobaltstrike.com/help-malleable-c2>
ma l l e a b l e C 2 p r o f i l e
例使
m a l l e a b l e C 2 p r o f i l e
以使
w w w [ . ] w i n d o w s u p d a t e . c o m
⼀个
h t t p s : //g i t h u b . c o m /b l u s c r e e n o f j e f f /M a l l e a b l e - C 2- R a n d o m i z e r /b l o b /m a s t e r /S a m p l e % 20T e m p l a t e s /m i c r o s o f t u p d a t e _g e t o n l y . p r o f i l e
< h t t p s : //g i t h u b . c o m /b l u s c r e e n o f j e f f / M a l l e a b l e - C 2- R a n d o m i z e r /b l o b /m a s t e r /S a m p l e % 20T e m p l a t e s /m i c r o s o f t u p d a t e _g e t o n l y . p r o f i l e >
s s l . c e r t . s u b j e c t . c n : " w w w . w i n d o w s u p d a t e . c o m "
H T T P
m a l l e a b l e C 2 p r o f i l e
T o p 1 0 J A R M f i n g e r p r i n t s
h t t p s : //g i t h u b . c o m /c a r b o n b l a c k /a c t i v e _c 2_i o c _p u b l i c /b l o b /m a i n /c o b a l t s t r i k e /J A R M /j a r m _c s _2021 07 _u n i q _s o r t e d . t x t
< h t t p s : //g i t h u b . c o m /c a r b o n b l a c k /a c t i v e _c 2_i o c _p u b l i c /b l o b /m a i n /c o b a l t s t r i k e /J A R M /j a r m _c s _2021 07 _u n i q _s o r t e d . t x t >
J A R M
(
T L S
)
h t t p s : //w w w . s h o d a n . i o /s e a r c h ? q u e r y = s s l . j a r m % 3A 07 d 1 4d 1 6d 21 d 21 d 00042d 41 d 00041 d e 5f b 30381 04f 457 d 92b a 02e 931 1 51 2c 2
< h t t p s : //w w w . s h o d a n . i o /s e a r c h ? q u e r y = s s l . j a r m % 3A 07 d 1 4d 1 6d 21 d 21 d 00042d 41 d 00041 d e 5f b 30381 04f 457 d 92b a 02e 931 1 51 2c 2>
00014d16d21d21d00042d41d00041df1e57cd0b3bf64d18696fb4fce056610
00014d16d21d21d07c42d41d00041d47e4e0ae17960b2a5b4fd6107fbb0926
05d02d16d04d04d05c05d02d05d04d4606ef7946105f20b303b9a05200e829
05d02d20d21d20d05c05d02d05d20dd7fc4c7c6ef19b77a4ca0787979cdc13
05d13d20d21d20d05c05d13d05d20dd7fc4c7c6ef19b77a4ca0787979cdc13
07d00016d21d21d00042d41d00041df1e57cd0b3bf64d18696fb4fce056610
07d0bd0fd06d06d07c07d0bd07d06d9b2f5869a6985368a9dec764186a9175
07d0bd0fd21d21d07c07d0bd07d21d9b2f5869a6985368a9dec764186a9175
07d13d15d21d21d07c07d13d07d21dd7fc4c7c6ef19b77a4ca0787979cdc13
07d14d16d21d21d00007d14d07d21d3fe87b802002478c27f1c0da514dbf80
07d14d16d21d21d00042d41d00041d47e4e0ae17960b2a5b4fd6107fbb0926
07d14d16d21d21d00042d41d00041de5fb3038104f457d92ba02e9311512c2
07d14d16d21d21d07c07d14d07d21d4606ef7946105f20b303b9a05200e829
07d14d16d21d21d07c07d14d07d21d9b2f5869a6985368a9dec764186a9175
07d14d16d21d21d07c07d14d07d21dee4eea372f163361c2623582546d06f8
07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1
07d14d16d21d21d07c42d41d00041d58c7162162b6a603d3d90a2b76865b53
07d14d16d21d21d07c42d43d00041d24a458a375eef0c576d23a7bab9a9fb1
07d19d1ad21d21d00007d19d07d21d25f4195751c61467fa54caf42f4e2e61
15d15d15d3fd15d00042d42d00042d1279af56d3d287bbc5d38e226153ba9e
15d3fd16d21d21d00042d43d000000fe02290512647416dcf0a400ccbc0b6b
15d3fd16d29d29d00015d3fd15d29d1f9d8d2d24bf6c1a8572e99c89f1f5f0
15d3fd16d29d29d00042d43d000000ed1cf37c9a169b41886e27ba8fad60b0
15d3fd16d29d29d00042d43d000000fbc10435df141b3459e26f69e76d5947
15d3fd16d29d29d00042d43d000000fe02290512647416dcf0a400ccbc0b6b
16d16d16d00000022c43d43d00043d370cd49656587484eb806b90846875a0
1dd28d28d00028d00042d41d00041df1e57cd0b3bf64d18696fb4fce056610
1dd28d28d00028d1dc1dd28d1dd28d3fe87b802002478c27f1c0da514dbf80
21b10b00021b21b21b21b10b21b21b3b0d229d76f2fd7cb8e23bb87da38a20
21d10d00021d21d21c21d10d21d21d696c1bb221f80034f540b6754152d3b8
21d19d00021d21d21c42d43d000000624c0617d7b1f32125cdb5240cd23ec9
29d29d00029d29d00029d29d29d29de1a3c0d7ca6ad8388057924be83dfc6a
29d29d00029d29d08c29d29d29d29dcd113334714fbefb4b0aba4000bcef62
29d29d00029d29d21c29d29d29d29dce7a321e4956e8298ba917e9f2c22849
29d29d15d29d29d21c29d29d29d29d7329fbe92d446436f2394e041278b8b2
2ad00016d2ad2ad22c42d42d00042ddb04deffa1705e2edc44cae1ed24a4da
2ad2ad0002ad2ad0002ad2ad2ad2ade1a3c0d7ca6ad8388057924be83dfc6a
2ad2ad0002ad2ad00042d42d000000301510f56407964db9434a9bb0d4ee4a
2ad2ad0002ad2ad00042d42d0000005d86ccb1a0567e012264097a0315d7a7
2ad2ad0002ad2ad22c2ad2ad2ad2ad6a7bd8f51d54bfc07e1cd34e5ca50bb3
2ad2ad0002ad2ad22c2ad2ad2ad2adce7a321e4956e8298ba917e9f2c22849
2ad2ad16d2ad2ad00042d42d00042ddb04deffa1705e2edc44cae1ed24a4da
2ad2ad16d2ad2ad22c42d42d00042d58c7162162b6a603d3d90a2b76865b53
2ad2ad16d2ad2ad22c42d42d00042de4f6cde49b80ad1e14c340f9e47ccd3a
3fd3fd15d3fd3fd00042d42d00000061256d32ed7779c14686ad100544dc8d
3fd3fd15d3fd3fd21c3fd3fd3fd3fdc110bab2c0a19e5d4e587c17ce497b15
3fd3fd15d3fd3fd21c42d42d0000006f254909a73bf62f6b28507e9fb451b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
P l a i n T e x t
h t t p s : //g i t h u b . c o m /w h i c k e y - r 7 /g r a b _b e a c o n _c o n f i g <https://github.com/whickey-r7/grab_beacon_config>
有时
组织
0
0
C o b a l t S t r i k e
的破
他们
使
更有
305419896
1359593325
1 580103814
100
N m a p
305419896
M a z e
h t t p s : //l a b s . s e n t i n e l o n e . c o m /e n t e r - t h e - m a z e - d e m y s t i f y i n g - a n - a f f i l i a t e - i n v o l v e d - i n - m a z e - s n o w /
< h t t p s : //l a b s . s e n t i n e l o n e . c o m /e n t e r - t h e - m a z e - d e m y s t i f y i n g - a n - a f f i l i a t e - i n v o l v e d - i n - m a z e - s n o w />
/s ub m i t . p h p
/j q ue r y - 3 . 3 . 2 . m i n . j s
在团
SSL
与⼀个
S S L
/
C o b a l t e S t r i k e
/
C 2
HT T P S
S S L
对完
Beac o n
S S L
供了
以保
通过
下,
使
使
他们
37%
供了
5
SS L
A P T
组织
O S I N T
Bea c o n I P
⼀个
S S L
下,
除⾮
IP
地址
情报
C2
情报
组织
和历史
h t t p s : //w w w . s h o d a n . i o /s e a r c h ? q u e r y = s e r v e r . p u b l i c k e y _m d 5% 3A + d e f b 5d 95c e 99e 1 e b b f 421 a 1 a 38d 9c b 64 <https://www.shodan.io/search?
q u e r y = s e r v e r . p u b l i c k e y _m d 5% 3A + d e f b 5d 95c e 99e 1 e b b f 421 a 1 a 38d 9c b 64>
s e r v e r . p u b l i c k e y _m d 5: d e f b 5d 95c e 99e 1 e b b f 421 a 1 a 38d 9c b 64
URI
s s l p u b l i c k e y s
组织
使
SSL
defb 5d 95ce 99e1ebbf 421a 1a 38d 9cb 64
e 9ae 865f 5ce 035176457188409f 6020a
81 a3 eeb8 ceb74 cf508 f6 bcfc408e0305
79 b6e333634 c506 f6 f710 dde179796 ed
1186914578623 be126e5 f3e8 c058 d719
8 ac540617 dddcdf575 f6 dc207 abb7344
f 61884abc 8f 4ba 7a 0caa 288b 326a 70ee
94 a0 ea78 a00 b04 d14 d25e55 dacba3 ac3
c 4fdbd 072a 73ab 1b 9087f 716d 5399807
0 ce7 b6482 c1 f24e42 f2935 f5026 d338 d
1
2
3
4
5
6
7
8
9
10
m d 5
J S O N
M D 5 B e a c o n
组织
1 1 8 6 9 1 4 5 7 8 6 2 3 b e 1 2 6 e 5 f 3 e 8 c 0 5 8 d 7 1 9
1 4 1 2
M A N 1
8 a c 5 4 0 6 1 7 d d d c d f 5 7 5 f 6 d c 2 0 7 a b b 7 3 4 4
1 3 1 8
D o p p e l P a y m e r
f 6 1 8 8 4 a b c 8 f 4 b a 7 a 0 c a a 2 8 8 b 3 2 6 a 7 0 e e
6 2 1
K e g t a p
0 c e 7 b 6 4 8 2 c 1 f 2 4 e 4 2 f 2 9 3 5 f 5 0 2 6 d 3 3 8 d
2 5 7
T A 5 7 5 /D r i d e x
b 3 e 6 b 9 d d 8 4 d a e 6 b e 6 8 c b 4 0 c d a 4 3 6 6 b 7 7
2 3
A P T 4 1
e 9ae 865f 5ce 035176457188409f 6020a
defb 5d 95ce 99e1ebbf 421a 1a 38d 9cb 64
79 b6e333634 c506 f6 f710 dde179796 ed
58 c3 c0 a918 d473 ecd9 f39285 d17379 ef
c 4fdbd 072a 73ab 1b 9087f 716d 5399807
c 9e300c 118949adc 574287b 2a 1264ec 5
c 2897b 1cf 5ecaee 579935f 2a 31cd 35a 9
0 ce7 b6482 c1 f24e42 f2935 f5026 d338 d
8 ccc9 bf8410 deef2 f2008 cde472662 a5
13 eb42 adf1 b78 ea4e1 ac3 c87 b4e3 dd56
1
2
3
4
5
6
7
8
9
10
S S L
m d 5
J S O N
⼤多
Bea c o n
S S L
数据
⼀个
B e a c o n
D N S
De t e c t i n g E x p o s e d C o b a l t S t r i k e D N S R e d i r e c t o r s
h t t p s : //l a b s . f - s e c u r e . c o m /b l o g /d e t e c t i n g -
e x p o s e d - c o b a l t - s t r i k e - d n s - r e d i r e c t o r s / <https://labs.f-secure.com/blog/detecting-exposed-cobalt-strike-dns-redirectors/>
s h o d a n
Be a c o n
I P
为使
0. 0. 0. 0
作为
D N S
I P
F- S e c u r e
的研
0. 0. 0. 0 D N S
,不
中使
a
DN S
0. 0. 0. 0
以作为
C o b a l t S t r i k e D N S
from scapy. all import *
from scapy. layers. dns import DNSRR, DNS, DNSQR
from scapy. layers. inet import IP, UDPc
def checkDNS(name):
ip = name
try:
ans = sr1(IP(dst=ip)/UDP(sport=RandShort(), dport=53)/DNS(rd=1,qd=DNSQR(qname="google.com",qtype="TXT")),
verbose =False, timeout =0.5)
ansTXT = ans[DNSRR][0].rdata
ans = sr1(IP(dst=ip)/UDP(sport=RandShort(), dport=53)/DNS(rd=1,qd=DNSQR(qname="amazon.com",qtype="A")), ve
rbose =False, timeout =0.5)
ansA1 = ans[DNSRR][0].rdata
ans = sr1(IP(dst=ip)/UDP(sport=RandShort(), dport=53)/DNS(rd=1,qd=DNSQR(qname="google.com",qtype="A")), ve
rbose =False, timeout =0.5)
ansA2 = ans[DNSRR][0].rdata
if ansTXT == ansA1 and ansA1 == ansA2 and ansA2 != '' and valid_ip(ansA1):
print( "[+] Cs Detected: " + ip + " replied with: " + ansTXT)
except Exception as e:
pass
def nslookup(target: str) -> None :
DNS_PORT = 53
DNS_SERVER = "8.8.8.8"
msg = IP(dst=DNS_SERVER) / UDP(dport=DNS_PORT) / DNS(rd=1, qd=DNSQR(qname=target))
ans = sr1(msg, verbose=0)
print(ans[DNSRR].rdata)
if __name__ == '__main__':
#name = "49.232.161.221"
#checkDNS(name)
#nslookup("google.com")
with open("cobalt.txt", 'r', encoding='UTF-8', errors='ignore') as f:
while True:
line = f.readline()
if not line:
break
checkDNS(line.strip())
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
c h e c k D N S . p y
P y t h o n
些信
⽹络
DN S
DNS
D N S C 2
助内
证调
h t t p s : //w w w . s h o d a n . i o /s e a r c h ? q u e r y = p r o d u c t % 3A % 22C o b a l t + S t r i k e + B e a c o n % 22 <https://www.shodan.io/search?
q u e r y = p r o d u c t % 3A % 22C o b a l t + S t r i k e + B e a c o n % 22>
C 2
情报
S h o d a n
> pip install shodan
> shodan init YOUR_API_KEY
> shodan search --fields ip_str,port,org,hostnames server.publickey_md5: defb5d95ce99e1ebbf421a1a38d9cb64
101 .43.208.122 80 Tencent Cloud Computing (Beijing) Co., Ltd
110 .42.159.151 443 Tencent cloud computing (Beijing) Co., Ltd.
101 .43.208.122 8443 Tencent Cloud Computing (Beijing) Co., Ltd
147 .78.47.231 443 M Nets SAL undefined.hostname.localhost
31 .44.184.187 443 Petersburg Internet Network ltd.
39 .109.68.117 443 HONG KONG BRIDGE INFO-TECH LIMITED
47 .96.120.47 80 Aliyun Computing Co., LTD
116 .204.211.180 80
5 .199.162.174 80 UAB Cherry Servers
49 .232.161.221 443 Tencent cloud computing (Beijing) Co., Ltd.
5 .199.162.174 443 UAB Cherry Servers
81 .71.133.220 80 Tencent Cloud Computing (Beijing) Co., Ltd
103 .146.179.94 443 HONGKONG NEWS COMMENTARY AGENCY CO. ,LIMITED
117 .50.37.182 80 Shanghai UCloud Information Technology Company Limited
103 .146.179.94 80 HONGKONG NEWS COMMENTARY AGENCY CO. ,LIMITED
31 .44.184.73 80 Petersburg Internet Network ltd.
120 .53.232.55 443 Shandong Servsd Technology Co. Ltd.
82 .156.29.211 9999 Tencent Cloud Computing (Beijing) Co., Ltd
193 .201.9.199 443 Infolink LLC
31 .44.184.187 8080 Petersburg Internet Network ltd.
121 .41.89.180 443 Aliyun Computing Co., LTD
124 .222.177.70 82 Tencent cloud computing (Beijing) Co., Ltd.
47 .98.164.231 443 Aliyun Computing Co., LTD
31 .44.184.232 80 Petersburg Internet Network ltd.
101 .43.208.122 443 Tencent Cloud Computing (Beijing) Co., Ltd
81 .71.133.220 443 Tencent Cloud Computing (Beijing) Co., Ltd
31 .44.184.187 80 Petersburg Internet Network ltd.
175 .24.62.158 4443 Tencent cloud computing (Beijing) Co., Ltd.
103 .146.179.94 4433 HONGKONG NEWS COMMENTARY AGENCY CO. ,LIMITED
110 .42.159.151 8080 Tencent cloud computing (Beijing) Co., Ltd.
31 .44.184.84 443 Petersburg Internet Network ltd.
116 .204.211.180 443
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
B a s h
h t t p s : //c o m m u n i t y . r i s k i q . c o m /s e a r c h /c o m p o n e n t s /C o m m a n d % 20a n d % 20C o n t r o l % 20S e r v e r /C o b a l t % 20S t r i k e /
< h t t p s : //c o m m u n i t y . r i s k i q . c o m /s e a r c h /c o m p o n e n t s /C o m m a n d % 20a n d % 20C o n t r o l % 20S e r v e r /C o b a l t % 20S t r i k e />
h t t p s : //q u a k e . 360. c n /q u a k e /#/s e a r c h R e s u l t ?
s e a r c h V a l = a p p % 3A % 22C o b a l t S t r i k e % 22& s e l e c t I n d e x = q u a k e _s e r v i c e & i g n o r e _c a c h e = f a l s e & t i m e R a n g e = 2021 - 08-
25% 2000% 3A 00% 3A 00&t i m e Ra n g e = 2022- 08- 25% 2000% 3A 00% 3A 00& t = 1 661 39201 31 92 <https://quake.360.cn/quake/#/searchResult?
s e a r c h V a l = a p p % 3A % 22C o b a l t S t r i k e % 22& s e l e c t I n d e x = q u a k e _s e r v i c e & i g n o r e _c a c h e = f a l s e & t i m e R a n g e = 2021 - 08-
25% 2000% 3A 00% 3A 00&t i m e Ra n g e = 2022- 08- 25% 2000% 3A 00% 3A 00& t = 1 661 39201 31 92>
r i s k i q
3 6 0 q u a k e
h t t p s : //g i t h u b . c o m /f o x - i t /c o b a l t s t r i k e - b e a c o n - d a t a <https://github.com/fox-it/cobaltstrike-beacon-data>
B e a c o n C o n f i g
b e a c o n c o n f i g
解读
S l e e p T i m e
{
"BeaconType": [ "HTTP"],
"Port": 81,
"SleepTime": 450000,
"MaxGetSize": 1048576,
"Jitter": 37, //
37% * 450000
(
166500
)
间隔
283000
450000
(
4.7 - 7.5
)
"MaxDNS": "Not Found",
"PublicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmmpL6y1jDqhxvFx5mTgprRUYNG2IchQmPW05GBhd5Gp0HhuY3JH7lfcecW6
pYLjDCx6WYubVwWY1mHj7+Ae8zbrhWVtlAlMcZOSpZqmqrJ03JS1B7grZsbcsfCptHZF+cTl4THGSfloBm2AsqNVN/93Y/6l8gt8YVauRlDbBzowID
AQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAA==" , //Cobalt Strike TeamServer
使
使
数据
(
curl
)
访
C 2
使
TLS
TeamServer
使
此此
Teamserver
使
⼀个
TeamServer
数据
组织
"PublicKey_MD5": "fe1a19bb796adc7029eac04bc5d07139",
"C2Server": "8.142.124.166,/j.ad",
"UserAgent": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)",
"HttpPostUri": "/submit.php",
"Malleable_C2_Instructions": [],
"HttpGet_Metadata": {
"ConstHeaders": [],
"ConstParams": [],
"Metadata": [ "base64", "header \"Cookie\"" ],
"SessionId": [],
"Output": []
},
"HttpPost_Metadata": {
"ConstHeaders": [ "Content-Type: application/octet-stream" ],
"ConstParams": [],
"Metadata": [],
"SessionId": [ "parameter \"id\"" ],
"Output": [ "print"]
},
"SpawnTo": "AAAAAAAAAAAAAAAAAAAAAA==",
"PipeName": "Not Found",
"DNS_Idle": "Not Found",
"DNS_Sleep": "Not Found",
"SSH_Host": "Not Found",
"SSH_Port": "Not Found",
"SSH_Username": "Not Found",
"SSH_Password_Plaintext": "Not Found",
"SSH_Password_Pubkey": "Not Found",
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
J S O N
" S l e e p T i m e " : 450000,
" J i t t e r " : 37 ,
37 % * 450000
(
166500
)
间隔
283000
450000
(
4. 7 - 7 . 5
)
" P r o c I n j e c t _S t u b " : " B O C h G + W RR6j X P S s + n + q D L A = = " ,
s t u b
Co b a l t S t r i k e J a r
MD5
Ba s e 64
通过
访
h t t p s : //v e r i f y . c o b a l t s t r i k e . c o m / <https://verify.cobaltstrike.com/>
使
C o b a l t S t r i k e
S H A 2 5 6
J a r
P r o c I n j e c t _S t u b
W a t e r m a r k ( l i c e n s e _i d )
9
以修
p r o c e s s - i n j e c t . s t u b
p u b l i c k e y
(上
讨论
)
使
组织
C o b a l t S t r i k e P a r s e r
Wa t e r m a r k
l i b c s c e
l i c e n s e _i d
0
st a g e
#!/usr/bin/python3
import requests
import rstr
import sys
import urllib3
if len(sys. argv) < 2:
print( "Usage: %s http[s]://<server_address>" % ( sys.argv[0]))
sys.exit(1)
url = sys .argv[1]
urllib3 .disable_warnings(urllib3 .exceptions.InsecureRequestWarning)
headers = {"User-Agent":""}
def generate_checksum8_uri(arch):
# x86 = 92
# x64 = 93
value = 0
while value != arch:
rand = rstr.xeger(r'[A-Za-z0-9]{4}')
value = ( sum([ord(ch) for ch in rand]) % 0x100)
return "/" + str(rand)
def get_shellcode(url,uri):
f_url = url + uri
try:
resp = requests.get(f_url, timeout=5, headers=headers, verify=False)
except requests.exceptions.RequestException as e:
print( '[!] Connection error %s' % ( e))
sys.exit(1)
if(resp.status_code==200):
print( '[+] Got response from %s' % ( url))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
g e t _x 8 6 _s t a g e
P y t h o n
F C - > c l d
寄存
Flag
D F
E 8- > c a l l
s t a g e l e s s
线
shel l c o d e
b e a c o n
C o b a l t S t r i k e P a r s e r
(
S t a g e d
S t a g e l e s s
.
C 2
接收
P a y l o a d ,
,
S t a g e l e s s
接收
P a y l o a d
. S t a g e l e s s
P a y l o a d
S t a g e d
,
)
h t t p s : //g i t h u b . c o m /S e n t i n e l - O n e /C o b a l t S t r i k e P a r s e r <https://github.com/Sentinel-One/CobaltStrikeParser>
sh e l l c od e
b e a c o n
PS E:\cs_beacon_conf> python .\get_x86_stage.py http://8.142.124.166:81
[ + ] Generating x86 check8 uri
[ + ] Making request to suspected C2 server
[ + ] Got response from http://8.142.124.166:81
[ + ] Response written to /out, response might be shellcode
1
2
3
4
5
B a s h
%
E
%
E
%
A
%
E
%
B
%
B
%
%
E
%
F
%
%
E
%
F
%
%
E
%
%
D
%
E
%
B D
%
A E
%
%
C
%
C
o
b a l
t
%
h t t p s : //g i t h u b . c o m /s t r o z f r i e d b e r g /c o b a l t s t r i k e - c o n f i g - e x t r a c t o r <https://github.com/strozfriedberg/cobaltstrike-config-extractor>
h t t p s : //w w w . a n q u a n k e . c o m /p o s t /i d /224535 <https://www.anquanke.com/post/id/224535>
h t t p s : //w w w . b l a c k b e r r y . c o m /u s /e n /f o r m s /e n t e r p r i s e /e b o o k - b e a c o n s - i n - t h e - d a r k <https://www.blackberry.com/us/en/forms/enterprise/ebook-
b e a c o n s - i n - t h e - d a r k >
PS E:\tools\CobaltStrikeParser-master\CobaltStrikeParser-master\samples> python ..\parse_beacon_config.py --json
.\8.142.124.166.shellcode
{ "BeaconType" : [ "HTTP" ], "Port" : 81 , "SleepTime" : 60000 , "MaxGetSize" : 1048576 , "Jitter" : 0 , "MaxDNS" : "Not Found"
, "PublicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmmpL6y1jDqhxvFx5mTgprRUYNG2IchQmPW05GBhd5Gp0HhuY3JH7lfcecW6p
YLjDCx6WYubVwWY1mHj7+Ae8zbrhWVtlAlMcZOSpZqmqrJ03JS1B7grZsbcsfCptHZF+cTl4THGSfloBm2AsqNVN/93Y/6l8gt8YVauRlDbBzowIDAQ
ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAA==" , "PublicKey_MD5" : "fe1a19bb796adc7029eac04bc5d07139" , "C2Server" : "8.142.124.166,/j.ad" , "UserAgen
t" : "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)", "HttpPostUri" : "/submit.php" , "Malleable_C2_Instructions"
: [], "HttpGet_Metadata": { "ConstHeaders": [], "ConstParams": [], "Metadata": [ "base64", "header \"Cookie\""], "Ses
sionId" : [], "Output" : []}, "HttpPost_Metadata" : {"ConstHeaders" : ["Content-Type: application/octet-stream"], "Cons
tParams" : [], "Metadata" : [], "SessionId" : ["parameter \"id\""], "Output" : ["print" ]}, "SpawnTo" : "AAAAAAAAAAAAAAAA
AAAAAA==" , "PipeName" : "Not Found", "DNS_Idle" : "Not Found", "DNS_Sleep" : "Not Found", "SSH_Host" : "Not Found", "SS
H_Port" : "Not Found", "SSH_Username" : "Not Found", "SSH_Password_Plaintext" : "Not Found", "SSH_Password_Pubkey" : "N
ot Found" , "SSH_Banner" : "" , "HttpGet_Verb" : "GET" , "HttpPost_Verb" : "POST" , "HttpPostChunk" : 0, "Spawnto_x86" : "%w
indir%\\syswow64\\rundll32.exe" , "Spawnto_x64" : "%windir%\\sysnative\\rundll32.exe" , "CryptoScheme" : 0, "Proxy_Conf
ig" : "Not Found", "Proxy_User" : "Not Found", "Proxy_Password" : "Not Found", "Proxy_Behavior" : "Use IE settings", "W
atermark" : 100000, "bStageCleanup" : "False" , "bCFGCaution" : "False" , "KillDate" : 0, "bProcInject_StartRWX" : "True"
, "bProcInject_UseRWX": "True", "bProcInject_MinAllocSize": 0, "ProcInject_PrependAppend_x86": "Empty", "ProcInject
_PrependAppend_x64" : "Empty" , "ProcInject_Execute" : ["CreateThread" , "SetThreadContext" , "CreateRemoteThread" , "Rtl
CreateUserThread" ], "ProcInject_AllocationMethod" : "VirtualAllocEx" , "ProcInject_Stub" : "BOChG+WRR6jXPSs+n+qDLA=="
, "bUsesCookies": "True", "HostHeader": "", "smbFrameHeader": "AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAA=" , "tcpFrameHeader" : "AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" , "headersToRemove" : "Not Foun
d" , "DNS_Beaconing" : "Not Found", "DNS_get_TypeA" : "Not Found", "DNS_get_TypeAAAA" : "Not Found", "DNS_get_TypeTXT"
: "Not Found", "DNS_put_metadata": "Not Found", "DNS_put_output": "Not Found", "DNS_resolver": "Not Found", "DNS_st
rategy" : "round-robin" , "DNS_strategy_rotate_seconds" : -1, "DNS_strategy_fail_x" : -1, "DNS_strategy_fail_seconds" :
-1 }
PS E:\tools\CobaltStrikeParser-master\CobaltStrikeParser-master\samples> python ..\parse_beacon_config.py --json
.\8.142.124.166.shellcode > .\8.142.124.166.shellcode.conf
1
2
3
B a s h

点击关注,共同学习!安全狗的自我修养

github haidragon

https://github.com/haidragon

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

C-haidragon

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值