FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
c2shell/Shellcode/shellcode.asm at main · ac3ss0r/c2shell · GitHub
ac3ss0r
/
c2shell
Public
Notifications
You must be signed in to change notification settings
Fork
7
Star
28
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
c2shell
/
Shellcode
/
shellcode.asm
Copy path
More file actions
More file actions
Latest commit
History
History
History
934 lines (931 loc) · 21.6 KB
Breadcrumbs
c2shell
/
Shellcode
/
shellcode.asm
Copy path
File metadata and controls
934 lines (931 loc) · 21.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.29.30154.0
TITLE C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\Release\shellcode.obj
.686P
.XMM
include listing.
inc
.model fl
at
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
PUBLIC ___local_stdio_printf_options
PUBLIC __vfprintf_l
PUBLIC _fprintf
PUBLIC _printf
PUBLIC ?shellcode@@YAHXZ
; shellcode
PUBLIC ?shellcode_end@@YAXXZ
; shellcode_end
PUBLIC _main
PUBLIC ?_OptionsStorage@?
1
??__local_stdio_printf_options@@
9
@4_KA
; `__local_stdio_printf_options'::`2'::_OptionsStorage
PUBLIC ??_C@_02GMLFBBN@wb@
; `string'
PUBLIC ??_C@_0O@NFBNADIO@shellcode?4bin@
; `string'
PUBLIC ??_C@_0CC@CNIGJHCH@?
$
FLe?
$
FN?5Failed?5to?5open?5shellcode?4bi@
; `string'
PUBLIC ??_C@_0CK@CNHACEFP@?
$
FLi?
$
FN?5Shellcode?5size?
3
?
5
?
$
CFlu?
0
?5locate@
; `string'
PUBLIC ??_C@_0EF@MOLEIFGD@?
$
FLe?
$
FN?5Failed?5to?5dump?5shellcode?5to@
; `string'
PUBLIC ??_C@_0CM@JHEGLBMC@?
$
FLi?
$
FN?5Shellcode?5saved?5to?5file?5she@
; `string'
PUBLIC ??_C@_02JDPG@rb@
; `string'
PUBLIC ??_C@_0CN@KKANALMI@?
$
FLe?
$
FN?5Failed?5to?5allocate?5memory?5f@
; `string'
PUBLIC ??_C@_0BO@KJKJAGIL@?
$
FLe?
$
FN?5Failed?5to?5read?5shellcode?
6
@
; `string'
PUBLIC ??_C@_0CA@FFCIEFBF@?
$
FLi?
$
FN?5Loaded?5shellcode?5size?
3
?
5
?
$
CFld?
6
@
; `string'
PUBLIC ??_C@_0CI@GCOJCDBI@?
$
FLe?
$
FN?5Failed?5to?5change?5memory?5pro@
; `string'
PUBLIC ??_C@_0M@LDNOBAB@Result?
3
?
5
?
$
CFd?
6
@
; `string'
PUBLIC ??_C@_0CN@CMKKBCPN@Shellcode?5execution?5completed?5s@
; `string'
EXTRN __imp____acrt_iob_func:PROC
EXTRN __imp__fclose:PROC
EXTRN __imp__fopen:PROC
EXTRN __imp__fread:PROC
EXTRN __imp__fseek:PROC
EXTRN __imp__ftell:PROC
EXTRN __imp__fwrite:PROC
EXTRN __imp____stdio_common_vfprintf:PROC
EXTRN __imp__malloc:PROC
EXTRN __imp__VirtualProtect@
16
:PROC
EXTRN __imp__VirtualFree@
12
:PROC
; COMDAT ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA
_BSS SEGMENT
?_OptionsStorage@?
1
??__local_stdio_printf_options@@
9
@4_KA DQ
01H
DUP (?)
; `__local_stdio_printf_options'::`2'::_OptionsStorage
_BSS ENDS
; COMDAT ??_C@_0CN@CMKKBCPN@Shellcode?5execution?5completed?5s@
CONST SEGMENT
??_C@_0CN@CMKKBCPN@Shellcode?5execution?5completed?5s@ DB
'Shellcode exec'
DB
'ution completed successfully.'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0M@LDNOBAB@Result?3?5?$CFd?6@
CONST SEGMENT
??_C@_0M@LDNOBAB@Result?
3
?
5
?
$
CFd?
6
@ DB
'Result: %d'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0CI@GCOJCDBI@?$FLe?$FN?5Failed?5to?5change?5memory?5pro@
CONST SEGMENT
??_C@_0CI@GCOJCDBI@?
$
FLe?
$
FN?5Failed?5to?5change?5memory?5pro@ DB
'[e] Fa'
DB
'iled to change memory protection'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0CA@FFCIEFBF@?$FLi?$FN?5Loaded?5shellcode?5size?3?5?$CFld?6@
CONST SEGMENT
??_C@_0CA@FFCIEFBF@?
$
FLi?
$
FN?5Loaded?5shellcode?5size?
3
?
5
?
$
CFld?
6
@ DB
'[i'
DB
'] Loaded shellcode size: %ld'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0BO@KJKJAGIL@?$FLe?$FN?5Failed?5to?5read?5shellcode?6@
CONST SEGMENT
??_C@_0BO@KJKJAGIL@?
$
FLe?
$
FN?5Failed?5to?5read?5shellcode?
6
@ DB
'[e] Fail'
DB
'ed to read shellcode'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0CN@KKANALMI@?$FLe?$FN?5Failed?5to?5allocate?5memory?5f@
CONST SEGMENT
??_C@_0CN@KKANALMI@?
$
FLe?
$
FN?5Failed?5to?5allocate?5memory?5f@ DB
'[e] Fa'
DB
'iled to allocate memory for shellcode'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_02JDPG@rb@
CONST SEGMENT
??_C@_02JDPG@rb@ DB
'rb'
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0CM@JHEGLBMC@?$FLi?$FN?5Shellcode?5saved?5to?5file?5she@
CONST SEGMENT
??_C@_0CM@JHEGLBMC@?
$
FLi?
$
FN?5Shellcode?5saved?5to?5file?5she@ DB
'[i] Sh'
DB
'ellcode saved to file shellcode.bin.'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0EF@MOLEIFGD@?$FLe?$FN?5Failed?5to?5dump?5shellcode?5to@
CONST SEGMENT
??_C@_0EF@MOLEIFGD@?
$
FLe?
$
FN?5Failed?5to?5dump?5shellcode?5to@ DB
'[e] Fa'
DB
'iled to dump shellcode to disk. Check your compiler settings.'
DB
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0CK@CNHACEFP@?$FLi?$FN?5Shellcode?5size?3?5?$CFlu?0?5locate@
CONST SEGMENT
??_C@_0CK@CNHACEFP@?
$
FLi?
$
FN?5Shellcode?5size?
3
?
5
?
$
CFlu?
0
?5locate@ DB
'[i'
DB
'] Shellcode size: %lu, located at 0x%p'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0CC@CNIGJHCH@?$FLe?$FN?5Failed?5to?5open?5shellcode?4bi@
CONST SEGMENT
??_C@_0CC@CNIGJHCH@?
$
FLe?
$
FN?5Failed?5to?5open?5shellcode?4bi@ DB
'[e] Fa'
DB
'iled to open shellcode.bin'
,
0aH
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_0O@NFBNADIO@shellcode?4bin@
CONST SEGMENT
??_C@_0O@NFBNADIO@shellcode?4bin@ DB
'shellcode.bin'
,
00H
; `string'
CONST ENDS
; COMDAT ??_C@_02GMLFBBN@wb@
CONST SEGMENT
??_C@_02GMLFBBN@wb@ DB
'wb'
,
00H
; `string'
CONST ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DW
0bH
DW
0eH
DW
015H
DW
01aH
DW
01dH
DW
022H
DW
027H
DW
02aH
DW
02dH
DW
032H
DW
035H
DW
038H
DW
03dH
DW
040H
DW
043H
DW
048H
DW
04bH
DW
04eH
DW
053H
DW
056H
DW
059H
DW
05eH
DW
061H
DW
064H
DW
069H
DW
06cH
DW
06fH
DW
074H
DW
077H
DW
07aH
DW
07fH
DW
082H
DW
085H
DW
089H
DW
08cH
DW
08fH
DW
092H
DW
097H
DW
09aH
DW
09dH
DW
0a2H
DW
0a5H
DW
0a8H
DW
0adH
DW
0b0H
DW
0b3H
DW
0b8H
DW
0bbH
DW
0beH
DW
0c2H
DW
0e8H
DW
0edH
DW
0faH
DW
0107H
DW
011aH
DW
0124H
DW
012fH
DW
0136H
voltbl ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DB
031H
DB
03aH
DB
047H
DB
054H
DB
067H
DB
071H
DB
07cH
DB
083H
voltbl ENDS
; Function compile flags: /Ogsp
; COMDAT _main
_TEXT SEGMENT
_flOldProtect$ =
-
8
; size = 4
_fileSize
$
1
$ =
-
4
; size = 4
_main PROC
; COMDAT
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shellcode.cpp
; Line 74
push
ebp
mov
ebp
,
esp
push
ecx
push
ecx
push
ebx
; Line 76
push
OFFSET ??_C@_02GMLFBBN@wb@
push
OFFSET ??_C@_0O@NFBNADIO@shellcode?4bin@
call
DWORD PTR __imp__fopen
mov
ebx
,
eax
pop
ecx
pop
ecx
; Line 77
test
ebx
,
ebx
jne
SHORT
$
LN2@main
; Line 78
push
OFFSET ??_C@_0CC@CNIGJHCH@?
$
FLe?
$
FN?5Failed?5to?5open?5shellcode?4bi@
push
2
call
DWORD PTR __imp____acrt_iob_func
pop
ecx
push
eax
call
_fprintf
pop
ecx
; Line 79
xor
eax
,
eax
pop
ecx
inc
eax
jmp
$
LN1@main
$
LN2@main:
push
esi
push
edi
; Line 81
mov
esi
,
OFFSET ?shellcode@@YAHXZ
; shellcode
mov
edi
,
OFFSET ?shellcode_end@@YAXXZ
; shellcode_end
; Line 82
push
esi
sub
edi
,
esi
push
edi
push
OFFSET ??_C@_0CK@CNHACEFP@?
$
FLi?
$
FN?5Shellcode?5size?
3
?
5
?
$
CFlu?
0
?5locate@
call
_printf
; Line 83
push
ebx
push
1
push
edi
push
esi
mov
esi
,
DWORD PTR __imp__fwrite
call
esi
; Line 85
push
ebx
push
1
push
edi
push
OFFSET ?shellcode@@YAHXZ
; shellcode
call
esi
add
esp
,
44
; 0000002cH
test
eax
,
eax
jne
SHORT
$
LN3@main
; Line 86
push
OFFSET ??_C@_0EF@MOLEIFGD@?
$
FLe?
$
FN?5Failed?5to?5dump?5shellcode?5to@
push
2
call
DWORD PTR __imp____acrt_iob_func
pop
ecx
push
eax
call
_fprintf
; Line 87
push
ebx
call
DWORD PTR __imp__fclose
; Line 88
jmp
$
LN13@main
$
LN3@main:
; Line 90
push
ebx
mov
ebx
,
DWORD PTR __imp__fclose
call
ebx
; Line 91
mov
DWORD PTR
[
esp
],
OFFSET ??_C@_0CM@JHEGLBMC@?
$
FLi?
$
FN?5Shellcode?5saved?5to?5file?5she@
call
_printf
; Line 93
mov
DWORD PTR
[
esp
],
OFFSET ??_C@_02JDPG@rb@
push
OFFSET ??_C@_0O@NFBNADIO@shellcode?4bin@
call
DWORD PTR __imp__fopen
mov
edi
,
eax
pop
ecx
pop
ecx
; Line 94
test
edi
,
edi
jne
SHORT
$
LN4@main
; Line 95
push
OFFSET ??_C@_0CC@CNIGJHCH@?
$
FLe?
$
FN?5Failed?5to?5open?5shellcode?4bi@
push
2
call
DWORD PTR __imp____acrt_iob_func
pop
ecx
push
eax
call
_fprintf
pop
ecx
; Line 96
jmp
$
LN12@main
$
LN4@main:
; Line 98
mov
esi
,
DWORD PTR __imp__fseek
push
2
push
0
push
edi
call
esi
; Line 99
push
edi
call
DWORD PTR __imp__ftell
; Line 100
push
0
push
0
push
edi
mov
DWORD PTR _fileSize
$
1
$
[
ebp
],
eax
call
esi
; Line 102
push
DWORD PTR _fileSize
$
1
$
[
ebp
]
call
DWORD PTR __imp__malloc
mov
esi
,
eax
add
esp
,
32
; 00000020H
; Line 104
test
esi
,
esi
jne
SHORT
$
LN5@main
; Line 105
push
OFFSET ??_C@_0CN@KKANALMI@?
$
FLe?
$
FN?5Failed?5to?5allocate?5memory?5f@
push
2
call
DWORD PTR __imp____acrt_iob_func
pop
ecx
push
eax
call
_fprintf
; Line 106
push
edi
call
ebx
$
LN13@main:
; Line 127
add
esp
,
12
; 0000000cH
jmp
$
LN11@main
$
LN5@main:
; Line 109
push
edi
push
DWORD PTR _fileSize
$
1
$
[
ebp
]
push
1
push
esi
call
DWORD PTR __imp__fread
add
esp
,
16
; 00000010H
cmp
eax
,
DWORD PTR _fileSize
$
1
$
[
ebp
]
je
SHORT
$
LN6@main
; Line 110
push
OFFSET ??_C@_0BO@KJKJAGIL@?
$
FLe?
$
FN?5Failed?5to?5read?5shellcode?
6
@
push
2
call
DWORD PTR __imp____acrt_iob_func
pop
ecx
push
eax
call
_fprintf
pop
ecx
pop
ecx
; Line 112
push
32768
; 00008000H
push
0
push
esi
call
DWORD PTR __imp__VirtualFree@
12
; Line 116
push
edi
call
ebx
$
LN12@main:
; Line 127
pop
ecx
jmp
SHORT
$
LN11@main
$
LN6@main:
; Line 119
push
edi
call
ebx
; Line 120
mov
ebx
,
DWORD PTR _fileSize
$
1
$
[
ebp
]
push
ebx
push
OFFSET ??_C@_0CA@FFCIEFBF@?
$
FLi?
$
FN?5Loaded?5shellcode?5size?
3
?
5
?
$
CFld?
6
@
call
_printf
add
esp
,
12
; 0000000cH
; Line 124
lea
eax
,
DWORD PTR _flOldProtect$
[
ebp
]
push
eax
push
64
; 00000040H
push
ebx
push
esi
call
DWORD PTR __imp__VirtualProtect@
16
test
eax
,
eax
jne
SHORT
$
LN7@main
; Line 125
push
OFFSET ??_C@_0CI@GCOJCDBI@?
$
FLe?
$
FN?5Failed?5to?5change?5memory?5pro@
push
2
call
DWORD PTR __imp____acrt_iob_func
pop
ecx
push
eax
call
_fprintf
pop
ecx
pop
ecx
; Line 126
push
32768
; 00008000H
push
0
push
esi
call
DWORD PTR __imp__VirtualFree@
12
$
LN11@main:
; Line 127
xor
eax
,
eax
inc
eax
jmp
SHORT
$
LN9@main
$
LN7@main:
; Line 138
call
esi
push
eax
push
OFFSET ??_C@_0M@LDNOBAB@Result?
3
?
5
?
$
CFd?
6
@
call
_printf
; Line 140
push
OFFSET ??_C@_0CN@CMKKBCPN@Shellcode?5execution?5completed?5s@
call
_printf
add
esp
,
12
; 0000000cH
; Line 142
xor
eax
,
eax
$
LN9@main:
pop
edi
pop
esi
$
LN1@main:
pop
ebx
; Line 143
leave
ret
0
_main ENDP
_TEXT ENDS
; Function compile flags: /Ogsp
; COMDAT ?shellcode_end@@YAXXZ
shcode SEGMENT
?shellcode_end@@YAXXZ PROC
; shellcode_end, COMDAT
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shellcode.cpp
; Line 70
ret
0
?shellcode_end@@YAXXZ ENDP
; shellcode_end
shcode ENDS
; Function compile flags: /Ogsp
; COMDAT ?shellcode@@YAHXZ
shcode SEGMENT
_temp
$
1
=
-
228
; size = 128
_msg$ =
-
100
; size = 30
_u32$ =
-
68
; size = 30
_curr_name
$
1
$ =
-
36
; size = 4
_funcRVA
$
1
$ =
-
36
; size = 4
tv1151 =
-
32
; size = 4
_handle
$
1
$ =
-
32
; size = 4
$
T2 =
-
28
; size = 4
$
T3 =
-
28
; size = 4
tv1149 =
-
24
; size = 4
_base
$
1
$ =
-
24
; size = 4
_funcRVA
$
1
$ =
-
20
; size = 4
_curr_name
$
1
$ =
-
20
; size = 4
_i
$
1
$ =
-
16
; size = 4
tv1142 =
-
16
; size = 4
tv1141 =
-
12
; size = 4
tv1136 =
-
12
; size = 4
tv1137 =
-
8
; size = 4
_i
$
1
$ =
-
8
; size = 4
_curr_module
$
1
$ =
-
8
; size = 4
_a
$
1
$ =
-
4
; size = 4
_a
$
1
$ =
-
4
; size = 4
_i
$
4
=
-
4
; size = 4
_i$ =
-
4
; size = 4
?shellcode@@YAHXZ PROC
; shellcode, COMDAT
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shellcode.cpp
; Line 19
push
ebp
mov
ebp
,
esp
sub
esp
,
228
; 000000e4H
; Line 26
xor
edx
,
edx
mov
DWORD PTR _i$
[
ebp
],
edx
; Line 27
mov
eax
,
DWORD PTR _i$
[
ebp
]
push
ebx
xor
ebx
,
ebx
inc
ebx
mov
BYTE PTR _u32$
[
ebp
+
eax
],
117
; 00000075H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
push
esi
push
edi
mov
BYTE PTR _u32$
[
ebp
+
eax
],
115
; 00000073H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
101
; 00000065H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
114
; 00000072H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
51
; 00000033H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
50
; 00000032H
add
DWORD PTR _i$
[
ebp
],
ebx
; Line 28
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
46
; 0000002eH
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
100
; 00000064H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
108
; 0000006cH
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
108
; 0000006cH
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _u32$
[
ebp
+
eax
],
dl
add
DWORD PTR _i$
[
ebp
],
ebx
; Line 29
mov
DWORD PTR _i$
[
ebp
],
edx
; Line 30
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _msg$
[
ebp
+
eax
],
116
; 00000074H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _msg$
[
ebp
+
eax
],
101
; 00000065H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _msg$
[
ebp
+
eax
],
115
; 00000073H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _msg$
[
ebp
+
eax
],
116
; 00000074H
add
DWORD PTR _i$
[
ebp
],
ebx
mov
eax
,
DWORD PTR _i$
[
ebp
]
mov
BYTE PTR _msg$
[
ebp
+
eax
],
dl
add
DWORD PTR _i$
[
ebp
],
ebx
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shcutils.h
; Line 133
mov
eax
,
DWORD PTR
fs
:
48
; Line 139
mov
eax
,
DWORD PTR
[
eax
+
12
]
mov
esi
,
DWORD PTR
[
eax
+
12
]
jmp
$
LN87@shellcode
$
LL7@shellcode:
; Line 141
cmp
DWORD PTR
[
esi
+
24
],
edx
je
$
LN84@shellcode
; Line 142
cmp
DWORD PTR
[
esi
+
48
],
edx
je
$
LN86@shellcode
; Line 145
mov
DWORD PTR _i
$
4
[
ebp
],
edx
jmp
SHORT
$
LN89@shellcode
$
LL11@shellcode:
; Line 146
mov
ecx
,
DWORD PTR _i
$
4
[
ebp
]
mov
eax
,
DWORD PTR
[
esi
+
48
]
cmp
WORD PTR
[
eax
+
ecx
*
2
],
90
; 0000005aH
ja
SHORT
$
LN15@shellcode
mov
ecx
,
DWORD PTR _i
$
4
[
ebp
]
mov
eax
,
DWORD PTR
[
esi
+
48
]
cmp
WORD PTR
[
eax
+
ecx
*
2
],
65
; 00000041H
jb
SHORT
$
LN15@shellcode
mov
ecx
,
DWORD PTR _i
$
4
[
ebp
]
mov
eax
,
DWORD PTR
[
esi
+
48
]
mov
ax
,
WORD PTR
[
eax
+
ecx
*
2
]
add
ax
,
32
; 00000020H
movzx
ecx
,
ax
jmp
SHORT
$
LN16@shellcode
$
LN15@shellcode:
mov
ecx
,
DWORD PTR _i
$
4
[
ebp
]
mov
eax
,
DWORD PTR
[
esi
+
48
]
movzx
ecx
,
WORD PTR
[
eax
+
ecx
*
2
]
$
LN16@shellcode:
mov
eax
,
DWORD PTR _i
$
4
[
ebp
]
mov
WORD PTR _temp
$
1
[
ebp
+
eax
*
2
],
cx
add
DWORD PTR _i
$
4
[
ebp
],
ebx
$
LN89@shellcode:
; Line 145
movzx
eax
,
WORD PTR
[
esi
+
44
]
cmp
DWORD PTR _i
$
4
[
ebp
],
eax
jl
SHORT
$
LL11@shellcode
; Line 61
mov
ax
,
WORD PTR _temp
$
1
[
ebp
]
mov
edi
,
ebx
mov
ecx
,
edx
mov
ebx
,
edx
test
ax
,
ax
je
SHORT
$
LN82@shellcode
movzx
eax
,
ax
mov
esi
,
65521
; 0000fff1H
$
LL20@shellcode:
; Line 62
movzx
eax
,
ax
add
eax
,
edi
cdq
idiv
esi
mov
edi
,
edx
; Line 63
lea
eax
,
DWORD PTR
[
ecx
+
edi
]
cdq
idiv
esi
movzx
eax
,
WORD PTR _temp
$
1
[
ebp
+
ebx
*
2
+
2
]
inc
ebx
mov
ecx
,
edx
test
ax
,
ax
jne
SHORT
$
LL20@shellcode
mov
esi
,
DWORD PTR _curr_module
$
1
$
[
ebp
]
; Line 65
shl
ecx
,
16
; 00000010H
or
ecx
,
edi
; Line 148
cmp
ecx
,
489227345
; 1d290451H
je
SHORT
$
LN56@shellcode
xor
edx
,
edx
$
LN82@shellcode:
; Line 151
mov
esi
,
DWORD PTR
[
esi
]
xor
ebx
,
ebx
inc
ebx
$
LN87@shellcode:
; Line 141
mov
DWORD PTR _curr_module
$
1
$
[
ebp
],
esi
$
LN86@shellcode:
test
esi
,
esi
jne
$
LL7@shellcode
$
LN84@shellcode:
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shellcode.cpp
; Line 67
xor
eax
,
eax
inc
eax
$
LN1@shellcode:
; Line 68
pop
edi
pop
esi
pop
ebx
leave
ret
0
$
LN56@shellcode:
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shcutils.h
; Line 149
mov
ecx
,
DWORD PTR
[
esi
+
24
]
mov
DWORD PTR _base
$
1
$
[
ebp
],
ecx
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shellcode.cpp
; Line 48
test
ecx
,
ecx
je
SHORT
$
LN84@shellcode
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shcutils.h
; Line 158
mov
eax
,
23117
; 00005a4dH
cmp
WORD PTR
[
ecx
],
ax
jne
SHORT
$
LN84@shellcode
; Line 162
mov
eax
,
DWORD PTR
[
ecx
+
60
]
mov
eax
,
DWORD PTR
[
eax
+
ecx
+
120
]
test
eax
,
eax
je
SHORT
$
LN84@shellcode
; Line 167
mov
ebx
,
DWORD PTR
[
eax
+
ecx
+
24
]
xor
edx
,
edx
mov
DWORD PTR _i
$
1
$
[
ebp
],
edx
mov
DWORD PTR
$
T2
[
ebp
],
ebx
test
ebx
,
ebx
je
SHORT
$
LN84@shellcode
; Line 169
mov
edi
,
DWORD PTR
[
eax
+
ecx
+
32
]
mov
ebx
,
DWORD PTR
[
eax
+
ecx
+
36
]
add
edi
,
ecx
; Line 170
mov
esi
,
DWORD PTR
[
eax
+
ecx
+
28
]
add
ebx
,
ecx
mov
DWORD PTR tv1151
[
ebp
],
esi
mov
DWORD PTR tv1142
[
ebp
],
edi
mov
DWORD PTR tv1141
[
ebp
],
ebx
$
LL25@shellcode:
movzx
eax
,
WORD PTR
[
ebx
]
; Line 60
mov
DWORD PTR _a
$
1
$
[
ebp
],
1
; Line 170
lea
eax
,
DWORD PTR
[
esi
+
eax
*
4
]
; Line 60
xor
esi
,
esi
; Line 170
add
eax
,
ecx
mov
DWORD PTR _funcRVA
$
1
$
[
ebp
],
eax
; Line 171
mov
eax
,
DWORD PTR
[
edi
]
add
eax
,
ecx
mov
DWORD PTR _curr_name
$
1
$
[
ebp
],
eax
; Line 61
mov
al
,
BYTE PTR
[
eax
]
test
al
,
al
je
SHORT
$
LN81@shellcode
mov
ecx
,
DWORD PTR _curr_name
$
1
$
[
ebp
]
; Line 169
mov
edi
,
65521
; 0000fff1H
mov
ebx
,
DWORD PTR _a
$
1
$
[
ebp
]
$
LL33@shellcode:
; Line 62
movsx
eax
,
al
add
eax
,
ebx
cdq
idiv
edi
mov
ebx
,
edx
; Line 63
lea
eax
,
DWORD PTR
[
esi
+
ebx
]
cdq
idiv
edi
inc
ecx
mov
esi
,
edx
mov
al
,
BYTE PTR
[
ecx
]
test
al
,
al
jne
SHORT
$
LL33@shellcode
mov
ecx
,
DWORD PTR _base
$
1
$
[
ebp
]
mov
edi
,
DWORD PTR tv1142
[
ebp
]
mov
DWORD PTR _a
$
1
$
[
ebp
],
ebx
mov
ebx
,
DWORD PTR tv1141
[
ebp
]
; Line 65
shl
esi
,
16
; 00000010H
or
esi
,
DWORD PTR _a
$
1
$
[
ebp
]
; Line 173
cmp
esi
,
494994583
; 1d810497H
je
SHORT
$
LN57@shellcode
mov
edx
,
DWORD PTR _i
$
1
$
[
ebp
]
$
LN81@shellcode:
; Line 167
inc
edx
add
ebx
,
2
add
edi
,
4
mov
DWORD PTR _i
$
1
$
[
ebp
],
edx
mov
DWORD PTR tv1141
[
ebp
],
ebx
mov
DWORD PTR tv1142
[
ebp
],
edi
cmp
edx
,
DWORD PTR
$
T2
[
ebp
]
jae
$
LN84@shellcode
mov
esi
,
DWORD PTR tv1151
[
ebp
]
jmp
SHORT
$
LL25@shellcode
$
LN57@shellcode:
; Line 173
mov
eax
,
DWORD PTR _funcRVA
$
1
$
[
ebp
]
mov
eax
,
DWORD PTR
[
eax
]
add
eax
,
ecx
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shellcode.cpp
; Line 50
je
$
LN84@shellcode
; Line 51
lea
ecx
,
DWORD PTR _u32$
[
ebp
]
push
ecx
call
eax
pop
ecx
mov
ecx
,
eax
mov
DWORD PTR _handle
$
1
$
[
ebp
],
ecx
; Line 52
test
ecx
,
ecx
je
$
LN84@shellcode
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shcutils.h
; Line 158
mov
eax
,
23117
; 00005a4dH
cmp
WORD PTR
[
ecx
],
ax
jne
$
LN85@shellcode
; Line 162
mov
eax
,
DWORD PTR
[
ecx
+
60
]
mov
eax
,
DWORD PTR
[
eax
+
ecx
+
120
]
test
eax
,
eax
je
$
LN85@shellcode
; Line 167
mov
ebx
,
DWORD PTR
[
eax
+
ecx
+
24
]
xor
edx
,
edx
mov
DWORD PTR _i
$
1
$
[
ebp
],
edx
mov
DWORD PTR
$
T3
[
ebp
],
ebx
test
ebx
,
ebx
je
$
LN85@shellcode
; Line 169
mov
edi
,
DWORD PTR
[
eax
+
ecx
+
32
]
mov
ebx
,
DWORD PTR
[
eax
+
ecx
+
36
]
add
edi
,
ecx
; Line 170
mov
esi
,
DWORD PTR
[
eax
+
ecx
+
28
]
add
ebx
,
ecx
mov
DWORD PTR tv1149
[
ebp
],
esi
mov
DWORD PTR tv1137
[
ebp
],
edi
mov
DWORD PTR tv1136
[
ebp
],
ebx
$
LL38@shellcode:
movzx
eax
,
WORD PTR
[
ebx
]
; Line 60
mov
DWORD PTR _a
$
1
$
[
ebp
],
1
; Line 170
lea
eax
,
DWORD PTR
[
esi
+
eax
*
4
]
; Line 60
xor
esi
,
esi
; Line 170
add
eax
,
ecx
mov
DWORD PTR _funcRVA
$
1
$
[
ebp
],
eax
; Line 171
mov
eax
,
DWORD PTR
[
edi
]
add
eax
,
ecx
mov
DWORD PTR _curr_name
$
1
$
[
ebp
],
eax
; Line 61
mov
al
,
BYTE PTR
[
eax
]
test
al
,
al
je
SHORT
$
LN80@shellcode
mov
ecx
,
DWORD PTR _curr_name
$
1
$
[
ebp
]
; Line 169
mov
edi
,
65521
; 0000fff1H
mov
ebx
,
DWORD PTR _a
$
1
$
[
ebp
]
$
LL46@shellcode:
; Line 62
movsx
eax
,
al
add
eax
,
ebx
cdq
idiv
edi
mov
ebx
,
edx
; Line 63
lea
eax
,
DWORD PTR
[
esi
+
ebx
]
cdq
idiv
edi
inc
ecx
mov
esi
,
edx
mov
al
,
BYTE PTR
[
ecx
]
test
al
,
al
jne
SHORT
$
LL46@shellcode
mov
ecx
,
DWORD PTR _handle
$
1
$
[
ebp
]
mov
edi
,
DWORD PTR tv1137
[
ebp
]
mov
DWORD PTR _a
$
1
$
[
ebp
],
ebx
mov
ebx
,
DWORD PTR tv1136
[
ebp
]
; Line 65
shl
esi
,
16
; 00000010H
or
esi
,
DWORD PTR _a
$
1
$
[
ebp
]
; Line 173
cmp
esi
,
427754544
; 197f0430H
je
SHORT
$
LN58@shellcode
mov
edx
,
DWORD PTR _i
$
1
$
[
ebp
]
$
LN80@shellcode:
; Line 167
inc
edx
add
ebx
,
2
add
edi
,
4
mov
DWORD PTR _i
$
1
$
[
ebp
],
edx
mov
DWORD PTR tv1136
[
ebp
],
ebx
mov
DWORD PTR tv1137
[
ebp
],
edi
cmp
edx
,
DWORD PTR
$
T3
[
ebp
]
jae
SHORT
$
LN85@shellcode
mov
esi
,
DWORD PTR tv1149
[
ebp
]
jmp
SHORT
$
LL38@shellcode
$
LN58@shellcode:
; Line 173
mov
eax
,
DWORD PTR _funcRVA
$
1
$
[
ebp
]
mov
eax
,
DWORD PTR
[
eax
]
add
eax
,
ecx
jmp
SHORT
$
LN35@shellcode
$
LN85@shellcode:
; File C:\Users\admin\Documents\GitHub\ShellcodeLab\Shellcode\shellcode.cpp
; Line 54
xor
eax
,
eax
$
LN35@shellcode:
push
0
lea
ecx
,
DWORD PTR _msg$
[
ebp
]
push
ecx
push
ecx
push
0
call
eax
add
esp
,
16
; 00000010H
; Line 55
xor
eax
,
eax
jmp
$
LN1@shellcode
?shellcode@@YAHXZ ENDP
; shellcode
shcode ENDS
; Function compile flags: /Ogsp
; COMDAT _printf
_TEXT SEGMENT
__Form
at
$ =
8
; size = 4
_printf PROC
; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h
; Line 956
push
ebp
mov
ebp
,
esp
; Line 960
lea
eax
,
DWORD PTR __Form
at
$
[
ebp
+
4
]
push
eax
push
0
push
DWORD PTR __Form
at
$
[
ebp
]
push
1
call
DWORD PTR __imp____acrt_iob_func
pop
ecx
push
eax
call
__vfprintf_l
add
esp
,
16
; 00000010H
; Line 963
pop
ebp
ret
0
_printf ENDP
_TEXT ENDS
; Function compile flags: /Ogsp
; COMDAT _fprintf
_TEXT SEGMENT
__Stream$ =
8
; size = 4
__Form
at
$ =
12
; size = 4
_fprintf PROC
; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h
; Line 837
push
ebp
mov
ebp
,
esp
; Line 841
lea
eax
,
DWORD PTR __Form
at
$
[
ebp
+
4
]
push
eax
push
0
push
DWORD PTR __Form
at
$
[
ebp
]
push
DWORD PTR __Stream$
[
ebp
]
call
__vfprintf_l
add
esp
,
16
; 00000010H
; Line 844
pop
ebp
ret
0
_fprintf ENDP
_TEXT ENDS
; Function compile flags: /Ogsp
; COMDAT __vfprintf_l
_TEXT SEGMENT
__Stream$ =
8
; size = 4
__Form
at
$ =
12
; size = 4
__Locale$ =
16
; size = 4
__ArgList$ =
20
; size = 4
__vfprintf_l PROC
; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h
; Line 644
push
ebp
mov
ebp
,
esp
; Line 645
push
DWORD PTR __ArgList$
[
ebp
]
push
DWORD PTR __Locale$
[
ebp
]
push
DWORD PTR __Form
at
$
[
ebp
]
push
DWORD PTR __Stream$
[
ebp
]
call
___local_stdio_printf_options
push
DWORD PTR
[
eax
+
4
]
push
DWORD PTR
[
eax
]
call
DWORD PTR __imp____stdio_common_vfprintf
add
esp
,
24
; 00000018H
; Line 646
pop
ebp
ret
0
__vfprintf_l ENDP
_TEXT ENDS
; Function compile flags: /Ogsp
; COMDAT ___local_stdio_printf_options
_TEXT SEGMENT
___local_stdio_printf_options PROC
; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_stdio_config.h
; Line 92
mov
eax
,
OFFSET ?_OptionsStorage@?
1
??__local_stdio_printf_options@@
9
@4_KA
; `__local_stdio_printf_options'::`2'::_OptionsStorage
; Line 93
ret
0
___local_stdio_printf_options ENDP
_TEXT ENDS
END
Back
|
FazBrowse Home
|
New Git URL