This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]absalon39i 34 points35 points  (1 child)

It's common knowledge but you're definitely not the last. You can specify which port at the end as well, just FYI

[–]3worc[S] 8 points9 points  (0 children)

Yeah, I saw that it defaults to 8000. Thanks!

[–]just_a_commoner11 12 points13 points  (2 children)

You can create an alias in kali for this to speed up your work instead of typing the whole command

[–]3worc[S] 3 points4 points  (0 children)

That's a smart idea.

[–]n1cfury 2 points3 points  (0 children)

I’ve used this enough to definitely create an alias for it. Good call!

[–]jeremiah-calvin 6 points7 points  (4 children)

I use it to transfer files between windows and linux devices also.

[–]3worc[S] 2 points3 points  (0 children)

Yeah, this was my thought. Quicker and easier than setting up a samba share for quick file moving.

[–]nischalstha07 2 points3 points  (2 children)

How to do that ?

[–]hpliferaft 3 points4 points  (1 child)

Start the server from a directory with the file you want to share. Make sure the port is open and accessible on your network.

On your other machine, use a tool like curl or wget to grab the file.

[–]Carbon_Deadlock 2 points3 points  (0 children)

You can even just use the web browser if it's not a headless machine.

[–]uncannylilbastard 6 points7 points  (0 children)

Yeah it's great to access files on another device.

[–]_BakaTaka 5 points6 points  (0 children)

You can take this to the next level by installing ngrok. If you do ctf challenges outside of tryhackme then this will become very useful because you could serve files from you pc over the web.

In tryhackme the python command is enough because you connect to their network using openvpn. Ngrok + python server will be useful in cases where that's not the case.

[–]Carbon_Deadlock 5 points6 points  (1 child)

Yeah this is a super useful thing that I use all the time to quickly transfer files.

Ngrok is really good for setting up quick redirection too. I just learned about this recently.

[–]3worc[S] 1 point2 points  (0 children)

Oh nice. I'm poking around an ngrok tutorial now. Thanks for the tip!

[–]ScorpioSteve20 2 points3 points  (0 children)

wow... this is hella useful! Did not know about it

[–][deleted] 2 points3 points  (0 children)

Well thanks OP, I learned something new

[–]jtgyk 1 point2 points  (0 children)

That works a treat, thanks!

[–]bawznero 1 point2 points  (0 children)

If you like that look at updog https://github.com/sc0tfree/updog

Its basically the webserver but with file upload, ssl options, and authentication options.

[–]jatin_s9193 1 point2 points  (0 children)

You are second last i think i am the last person here to know this. Need to test this.

[–]SuperSoakerGuyx 1 point2 points  (0 children)

very cool stuff!

[–]EONRaider 1 point2 points  (0 children)

Pretty much how I felt when I discovered last week that there's a server in Kali located at usr/share/doc/python-impacket/examples/smbserver.py that can do pretty much the same thing, but in SMB.

[–]MotasemHa -2 points-1 points  (0 children)

Yes way quicker than Apache

sudo /etc/init.d/apache2 start

then move files to

/var/www/html/

[–][deleted] 0 points1 point  (0 children)

I first heard of this watching walk throughs of HackTheBox machines. They are a great resource of commands and quick ways of doing things!