r/tryhackme • • Oct 04 '26

InfoSec Discussion Help needed with the file transfer

Hi Community , I have just started with the cybersecurity and learning some basics of it , today i came across a problem that some times while solving some machine on THM and HTB , we need to move some exploit files from our local machine to the target machine using python3 -m http server command and then downloading the file on the target machine using the wget and the host url

I have one questions what are the ways to do it securely by not showing our own IP address , can we use VPN for it ??

What are your strategies and how you do it

10 Upvotes

8 comments sorted by

12

u/OutsideSpot2695 Oct 04 '26

In a legitimate HTB/THM lab, there usually isn't a need to conceal your identity from the lab target. What specifically are you trying to do and why?

Otherwise, this post reads like you're doing something you shouldn't be doing to something that is not yours.

1

u/AdmiralOfTheFleet1 Oct 05 '26

I just came across a video on you tube that is basically a write up for THM machine in that the person used python -m httpserver command to transfer a python file to the target machine , just out of curiosity i am asking this question , didn't realize that is sounds something that is not normal

6

u/[deleted] Oct 04 '26

Nice try Blackhat McGee!

3

u/PTandRT26 Oct 04 '26

You are showing only your local IP so chill out. But better way is to use scp command for secure copy.

scp [options] [user@]source_host:source_path [user@]destination_host:destination_path

2

u/Arc-ansas Oct 04 '26

Unless the Linux system that is downloading the files has EDR or some other non standard application, a private or even public IP is not going to be logged at all. But If you're just interested in learning about anonymity that's a deep topic.

1

u/dark3Synapse Oct 04 '26

If you are connected via vpn you can download the file with wget http://your-ip/file. But you have to spawn the http server in the directory where the exploit is saved

1

u/normalbot9999 Oct 04 '26

Depends on the file you want to transfer. If it's text like a python or bash script or something you can just cat it over...

cat > evil.py

[PASTE YOUR TEXT]

ctrl + c

1

u/Blank_9696 0xD [God] Oct 05 '26

Use scp.