┌──(kali㉿kali)-[~/HTB/codetwo] └─$ sudo nmap -p- --min-rate 10000 10.10.11.82 -oA ports Starting Nmap 7.95 ( https://nmap.org ) at 2025-09-04 Nmap scan report for 10.10.11.82 Host is up (0.090s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 8000/tcp open http-alt
Nmap done: 1 IP address (1 host up) scanned in 8.86 seconds
┌──(kali㉿kali)-[~/HTB/codetwo] └─$ sudo nmap -sT -sC -sV -O -p 22,8000 --min-rate 10000 10.10.11.82 -oA details Starting Nmap 7.95 ( https://nmap.org ) at 2025-09-04 Nmap scan report for 10.10.11.82 Host is up (0.095s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.13 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 a0:47:b4:0c:69:67:93:3a:f9:b4:5d:b3:2f:bc:9e:23 (RSA) | 256 7d:44:3f:f1:b1:e2:bb:3d:91:d5:da:58:0f:51:e5:ad (ECDSA) |_ 256 f1:6b:1d:36:18:06:7a:05:3f:07:57:e1:ef:86:b4:85 (ED25519) 8000/tcp open http Gunicorn 20.0.4 |_http-title: Welcome to CodePartTwo |_http-server-header: gunicorn/20.0.4 Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.19 Network Distance: 2 hops Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
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 13.51 seconds
┌──(kali㉿kali)-[~/HTB/codetwo] └─$ curl 'http://10.10.11.82:8000/download' --output app.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10708 100 10708 0 0 57535 0 --:--:-- --:--:-- --:--:-- 57569
┌──(kali㉿kali)-[~/HTB/codetwo] └─$ ssh marco@10.10.11.82 marco@10.10.11.82's password: Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-216-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro System information as of Thu 04 Sep 2025 07:40:31 AM UTC System load: 0.09 Usage of /: 57.2% of 5.08GB Memory usage: 24% Swap usage: 0% Processes: 276 Users logged in: 0 IPv4 address for eth0: 10.10.11.82 IPv6 address for eth0: dead:beef::250:56ff:feb9:c568 => There are 3 zombie processes. Expanded Security Maintenance for Infrastructure is not enabled. 0 updates can be applied immediately. Enable ESM Infra to receive additional future security updates. See https://ubuntu.com/esm or run: sudo pro status The list of available updates is more than a week old. To check for new updates run: sudo apt update marco@codeparttwo:~$
marco@codeparttwo:~$ sudo -l Matching Defaults entries for marco on codeparttwo: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User marco may run the following commands on codeparttwo: (ALL : ALL) NOPASSWD: /usr/local/bin/npbackup-cli
Portable Network Backup Client This program is distributed under the GNU General Public License and comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; Please type --license for more info.
optional arguments: -h, --help show this help message and exit -c CONFIG_FILE, --config-file CONFIG_FILE Path to alternative configuration file (defaults to current dir/npbackup.conf) --repo-name REPO_NAME Name of the repository to work with. Defaults to 'default'. This can also be a comma separated list of repo names. Can accept special name '__all__' to work with all repositories. --repo-group REPO_GROUP Comme separated list of groups to work with. Can accept special name '__all__' to work with all repositories. -b, --backup Run a backup -f, --force Force running a backup regardless of existing backups age -r RESTORE, --restore RESTORE Restore to path given by --restore, add --snapshot-id to specify a snapshot other than latest -s, --snapshots Show current snapshots --ls [LS] Show content given snapshot. When no snapshot id is given, latest is used --find FIND Find full path of given file / directory --forget FORGET Forget given snapshot (accepts comma separated list of snapshots) --policy Apply retention policy to snapshots (forget snapshots) --housekeeping Run --check quick, --policy and --prune in one go --quick-check Deprecated in favor of --'check quick'. Quick check repository --full-check Deprecated in favor of '--check full'. Full check repository (read all data) --check CHECK Checks the repository. Valid arguments are 'quick' (metadata check) and 'full' (metadata + data check) --prune [PRUNE] Prune data in repository, also accepts max parameter in order prune reclaiming maximum space --prune-max Deprecated in favor of --prune max --unlock Unlock repository --repair-index Deprecated in favor of '--repair index'.Repair repo index --repair-packs REPAIR_PACKS Deprecated in favor of '--repair packs'. Repair repo packs ids given by --repair-packs --repair-snapshots Deprecated in favor of '--repair snapshots'.Repair repo snapshots --repair REPAIR Repair the repository. Valid arguments are 'index', 'snapshots', or 'packs' --recover Recover lost repo snapshots --list LIST Show [blobs|packs|index|snapshots|keys|locks] objects --dump DUMP Dump a specific file to stdout (full path given by --ls), use with --dump [file], add --snapshot-id to specify a snapshot other than latest --stats [STATS] Get repository statistics. If snapshot id is given, only snapshot statistics will be shown. You may also pass "--mode raw-data" or "--mode debug" (with double quotes) to get full repo statistics --raw RAW Run raw command against backend. Use with --raw "my raw backend command" --init Manually initialize a repo (is done automatically on first backup) --has-recent-snapshot Check if a recent snapshot exists --restore-includes RESTORE_INCLUDES Restore only paths within include path, comma separated list accepted --snapshot-id SNAPSHOT_ID Choose which snapshot to use. Defaults to latest --json Run in JSON API mode. Nothing else than JSON will be printed to stdout --stdin Backup using data from stdin input --stdin-filename STDIN_FILENAME Alternate filename for stdin, defaults to 'stdin.data' -v, --verbose Show verbose output -V, --version Show program version --dry-run Run operations intest mode, no actual modifications --no-cache Run operations without cache --license Show license --auto-upgrade Auto upgrade NPBackup --log-file LOG_FILE Optional path for logfile --show-config Show full inherited configuration for current repo. Optionally you can set NPBACKUP_MANAGER_PASSWORD env variable for more details. --external-backend-binary EXTERNAL_BACKEND_BINARY Full path to alternative external backend binary --group-operation GROUP_OPERATION Deprecated command to launch operations on multiple repositories. Not needed anymore. Replaced by --repo-name x,y or --repo-group x,y --create-key CREATE_KEY Create a new encryption key, requires a file path --create-backup-scheduled-task CREATE_BACKUP_SCHEDULED_TASK Create a scheduled backup task, specify an argument interval via interval=minutes, or hour=hour,minute=minute for a daily task --create-housekeeping-scheduled-task CREATE_HOUSEKEEPING_SCHEDULED_TASK Create a scheduled housekeeping task, specify hour=hour,minute=minute for a daily task --check-config-file Check if config file is valid
首先要 -c 来指定 config 文件,否则没法使用。刚好在 marco 的家目录下就有 npbackup.conf ,可以直接用。
System information as of Thu 04 Sep 2025 07:58:37 AM UTC
System load: 0.02 Usage of /: 57.2% of 5.08GB Memory usage: 25% Swap usage: 0% Processes: 244 Users logged in: 2 IPv4 address for eth0: 10.10.11.82 IPv6 address for eth0: dead:beef::250:56ff:feb9:c568
=> There are 3 zombie processes.
Expanded Security Maintenance for Infrastructure is not enabled.
0 updates can be applied immediately.
Enable ESM Infra to receive additional future security updates. See https://ubuntu.com/esm or run: sudo pro status
The list of available updates is more than a week old. To check for new updates run: sudo apt update Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings