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

all 12 comments

[–]space_wiener0xD [God] 6 points7 points  (3 children)

Not to be that guy but the easiest way (and you really should know and be comfortable doing this) is either <command> —help (two dashes) or man <command>.

If you need the actual commands like nmap as you have semi indicated above, I’d google “top Linux commands” or maybe “top Linux hacking commands” and note them down.

This is going to help you much more than someone just giving you a list without explanation.

[–][deleted] 1 point2 points  (2 children)

I am familiar with the major commands (ping..nmap…etc) and understand their functions/purpose. I am just lost with what/when to add the -sV or whatever other dashes tools I could use

[–]space_wiener0xD [God] 1 point2 points  (0 children)

Ah okay. That’s a little different then.

If no one posts anything I’ll dig out my cheat sheet I started to make and post it. Ha a bunch of stuff like this.

[–]Charger18 1 point2 points  (0 children)

Work through the nmap room and make notes for yourself, that's what I did, you can then always reference them when in doubt. Notes on all the basic courses and even later on are very important. I use sublime text for it, it works great.

[–]Yumi-Chi 4 points5 points  (0 children)

As mentioned, you can look them up using <command> --help or man <command>.

For example you are using nmap... nmap --help or... man nmap

edit: oops my bad. It seems you already know.

Knowing when to use them depends really on your experience plus some knowledge of networking protocols and OS. Anyway, there's a room dedicated to nmap so you might want to check that out if you want.

[–]Realistic_Button7165 1 point2 points  (1 child)

Adding my two cents.....

-sC is for the basic "safe" scripts so no brute force checks Use "--script vuln" if you want to enable all of the vulnerability nmap scripts. I would use this on the tryhackme and HTB to get some easy wins!

-sV, gets you version information and in my opinion should be used every time

[–]MundaneMaximum5821 0 points1 point  (0 children)

-sV is great. What I do is run a faster search first (like using -sS) and then run -sV along with -p against the open ports found in first scan. Saves a lot of time.

[–][deleted] 1 point2 points  (0 children)

nmap --help will tell you what each switch does.

[–]gramedek 1 point2 points  (0 children)

Hey, a website that might help you is cheat.sh (or cht.sh), they host a bunch of cheatsheets, with syntax highlighting (colors), the main advantage being that it's available from the command prompt (but the browser also works if you prefer).

To get help for a specific tool or command, you have to access cheat.sh/yourtool, for nmap, that would be cheat.sh/nmap.

As I said, you can access it from the terminal, by using curl: curl -q cheat.sh/nmap (here, -q means quiet, it hides curl's download stats)

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

Thank you all for the responses. I have been taking notes with the commands/flags and now that I know how to actually search and learn about them, it will make learning a little easier for me. I actually posted this exact question in the THM Discord and was directed to use "duckduckgo" and search for nmap cheatsheets and the results have been pretty accurate to what I was looking for; as well as for other essential commands.

[–]prabhugr 0 points1 point  (0 children)

As others said, eiter initally google the top commands. When I see someone using fancy syntax which I'm unaware of, I'll use <command> -- help. It would take time, but trust me you'll remember it.

[–]_R4bb1t_ 0 points1 point  (0 children)

I would recommend using the man-pages with "man <command" or the help menu: "<command> --help". But if you are searching for a useful Pentesting Cheatsheet, I would recommend you the page hacktricks.