Posts: 109 Threads: 0 Joined: N/A November 2, 2022 at 2:12 AM 1. tracert a. route of packets and to find ips/locations where they are dropped2. chmod a. example uses: i. chmod 644 file.txt 1. sets file permissions (6 – owner can read and write, 4 – group can only read, 4 – others can only read) 2. same can be achieved with – chmod u=rwx, g=rx, o=rx file.txt 3. chmod 777 file.txt will give everyone access to this file.3. nslookup OR dig (linux) a. displays information that can be used to diagnose DNS infrastructure i. Two modes 1. Interactive 2. Non-interactive4. tcpdump –i a. linux command only b. example use i. tcpdump –I eth1 tcp port80 1. this dumps all captured traffic from eth1 on tcp port 805. netsh advfirewall firewall a. use this command to add or delete firewall rules b. example uses: i. To enable/disable a program 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= program=<”path to program”> enable= ii. To enable/disable a port 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= protocol= localport= iii. To delete enabled programs or ports 1. netsh advfirewall firewall delete rule name= program= 2. netsh advfirewall firewall delete rule name= protocol= localport= iv. To enable specific services 1. Netsh advfirewall firewall set rule group=<”group name”> new enable= a. Netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes b. Netsh advfirewall firewall set rule group=”remote desktop” new enable=Yes6. netstat a. Provides network statistics and other information i. To show active connections 1. netstat –a ii. Show binaries / Show associated programs associated with connections 1. netstat –b iii. Do not resolve domain names 1. netstat –n iv. Show connection PIDs 1. netstat -o7. netcat or nc a. reads or writes to a network i. Can listen on port, transfer data, scan ports and send data to port 1. Check whether a port is open a. nc –v 2. Port scanning a. nc –vzu 3. Listening server a. nc –l i. To establish connection to the listening server above, use: 1. nc 4. Transfer a file a. On a server, open a listener like in step(3) but attached an output file to save all data received by the port. i. ex. nc –l 4444 > output b. On another machine, make or use existing file and send contents of the file to listening server with: i. cat file | nc ii. If using the example above, it would look like this: cat filename | nc –l 192.168.0.1 4444 iii. This will transfer all contents from file to output on listening server 5. Binding program to port and access it a. Bind CMD program to the port number (SERVER) i. nc –nlvp -e 1. ex. nc –nlvp 4444 –e cmd.exe b. Establish connection with a server ( CLIENT ) i. nc –nv 1. nc –nv 192.168.0.1 4444 c. These commands will open a command prompt of the server from the client machine.8. arp –a a. view local ARP(Address Resolution Protocol) table9. ipconfig(windows) OR ifconfig(linux) a. Shows TCP/IP and network adapter information. b. ipconfig /all i. shows more indepth information such as MAC addresses, DNS servers etc..10. nmap a. used for mapping, port scanning, operating system scan, services scan b. examples of common nmap commands: i. nmap ii. nmap –p iii. nmap –A - this is for detecting OS and Services iv. nmap –sV - Standard service detection v. nmap –sV –version-intensity <1-5> - Aggressiveness of service detection vi. nmap –sV –sC - Scan using default safe scripts vii. nmap –script-help= - Get help with a script viii. nmap –sV –p -script= - Scan using specific NSE script ix. nmap -p- OR nmap –p0-65535 –T5 – Scan all ports with threads x. nmap –sU –sT –p-65535 - Scans all TCP and UDP ports xi. nmap –script <”exploit”> -p- - Scan all ports to find vulnerabilities aggressively xii. nmap –sV –script= - Scan with a set of scripts “*” xiii. nmap –script=asn-query,whois,ip-geolocation-maxmind - Scan to find information about IP address xiv. USE –T1-5 to scan with more threads (faster)11. pathping a. combination of ping and traceroute i. First phase runs traceroute ii. Second phase finds round-trip time and packet loss12. cat a. view contents of a file, create a new file, combine two files into one etc. i. cat ii. cat > iii. cat > iv. cat >> b. can also be used to view contents of file in reverse by using: i. tac 13. grep a. Searches for a string in groups of files i. Example uses: 1. grep <”string”> a. grep “mellon” myfile.txt 2. Common flags a. –E – run grep with extended regular expressions b. –i – ignore case c. –v – return all lines which don’t match the pattern d. –w – only matches that form whole words e. –c – print count of matching lines f. –l – print the name of each file which contains match g. –n – print the line number before each line that matches h. –r – recursively read all files in given directory and subdirectories14. Findstr a. Find file names or strings within files b. Useful findstr command to find all strings within all files in current directory i. findstr /sin “searchstring” *.* > output.txtPosts: 582 Threads: 0 Joined: N/A November 2, 2022 at 2:34 PM Is there any deeper idea behind this collection? Posts: 109 Threads: 0 Joined: N/A November 3, 2022 at 10:58 AM (November 2, 2022, 02:34 PM)trollinator321 Wrote: Is there any deeper idea behind this collection? For some of them for sure, but they are just common commands you have to get used to. :) Posts: 32 Threads: 0 Joined: N/A November 3, 2022 at 6:36 PM Thank you! Posts: 582 Threads: 0 Joined: N/A November 7, 2022 at 2:34 PM ok, nice collection then :) Posts: 44 Threads: 0 Joined: N/A November 7, 2022 at 3:30 PM [quote="zal" pid="749863" dateline="1667355164"]1. tracert a. route of packets and to find ips/locations where they are dropped2. chmod a. example uses: i. chmod 644 file.txt 1. sets file permissions (6 – owner can read and write, 4 – group can only read, 4 – others can only read) 2. same can be achieved with – chmod u=rwx, g=rx, o=rx file.txt 3. chmod 777 file.txt will give everyone access to this file.3. nslookup OR dig (linux) a. displays information that can be used to diagnose DNS infrastructure i. Two modes 1. Interactive 2. Non-interactive4. tcpdump –i a. linux command only b. example use i. tcpdump –I eth1 tcp port80 1. this dumps all captured traffic from eth1 on tcp port 805. netsh advfirewall firewall a. use this command to add or delete firewall rules b. example uses: i. To enable/disable a program 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= program=<”path to program”> enable= ii. To enable/disable a port 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= protocol= localport= iii. To delete enabled programs or ports 1. netsh advfirewall firewall delete rule name= program= 2. netsh advfirewall firewall delete rule name= protocol= localport= iv. To enable specific services 1. Netsh advfirewall firewall set rule group=<”group name”> new enable= a. Netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes b. Netsh advfirewall firewall set rule group=”remote desktop” new enable=Yes6. netstat a. Provides network statistics and other information i. To show active connections 1. netstat –a ii. Show binaries / Show associated programs associated with connections 1. netstat –b iii. Do not resolve domain names 1. netstat –n iv. Show connection PIDs 1. netstat -o7. netcat or nc a. reads or writes to a network i. Can listen on port, transfer data, scan ports and send data to port 1. Check whether a port is open a. nc –v 2. Port scanning a. nc –vzu 3. Listening server a. nc –l i. To establish connection to the listening server above, use: 1. nc 4. Transfer a file a. On a server, open a listener like in step(3) but attached an output file to save all data received by the port. i. ex. nc –l 4444 > output b. On another machine, make or use existing file and send contents of the file to listening server with: i. cat file | nc ii. If using the example above, it would look like this: cat filename | nc –l 192.168.0.1 4444 iii. This will transfer all contents from file to output on listening server 5. Binding program to port and access it a. Bind CMD program to the port number (SERVER) i. nc –nlvp -e 1. ex. nc –nlvp 4444 –e cmd.exe b. Establish connection with a server ( CLIENT ) i. nc –nv 1. nc –nv 192.168.0.1 4444 c. These commands will open a command prompt of the server from the client machine.8. arp –a a. view local ARP(Address Resolution Protocol) table9. ipconfig(windows) OR ifconfig(linux) a. Shows TCP/IP and network adapter information. b. ipconfig /all i. shows more indepth information such as MAC addresses, DNS servers etc..10. nmap a. used for mapping, port scanning, operating system scan, services scan b. examples of common nmap commands: i. nmap ii. nmap –p iii. nmap –A - this is for detecting OS and Services iv. nmap –sV - Standard service detection v. nmap –sV –version-intensity <1-5> - Aggressiveness of service detection vi. nmap –sV –sC - Scan using default safe scripts vii. nmap –script-help= - Get help with a script viii. nmap –sV –p -script= - Scan using specific NSE script ix. nmap -p- OR nmap –p0-65535 –T5 – Scan all ports with threads x. nmap –sU –sT –p-65535 - Scans all TCP and UDP ports xi. nmap –script <”exploit”> -p- - Scan all ports to find vulnerabilities aggressively xii. nmap –sV –script= - Scan with a set of scripts “*” xiii. nmap –script=asn-query,whois,ip-geolocation-maxmind - Scan to find information about IP address xiv. USE –T1-5 to scan with more threads (faster)11. pathping a. combination of ping and traceroute i. First phase runs traceroute ii. Second phase finds round-trip time and packet loss12. cat a. view contents of a file, create a new file, combine two files into one etc. i. cat ii. cat > iii. cat > iv. cat >> b. can also be used to view contents of file in reverse by using: i. tac 13. grep a. Searches for a string in groups of files i. Example uses: 1. grep <”string”> a. grep “mellon” myfile.txt 2. Common flags a. –E – run grep with extended regular expressions b. –i – ignore case c. –v – return all lines which don’t match the pattern d. –w – only matches that form whole words e. –c – print count of matching lines f. –l – print the name of each file which contains match g. –n – print the line number before each line that matches h. –r – recursively read all files in given directory and subdirectories14. Findstr a. Find file names or strings within files b. Useful findstr command to find all strings within all files in current directory i. findstr /sin “searchstring” *.* > output.txt[/quote]thanks i guessPosts: 16 Threads: 0 Joined: N/A November 9, 2022 at 10:35 AM [quote="zal" pid="749863" dateline="1667355164"]1. tracert a. route of packets and to find ips/locations where they are dropped2. chmod a. example uses: i. chmod 644 file.txt 1. sets file permissions (6 – owner can read and write, 4 – group can only read, 4 – others can only read) 2. same can be achieved with – chmod u=rwx, g=rx, o=rx file.txt 3. chmod 777 file.txt will give everyone access to this file.3. nslookup OR dig (linux) a. displays information that can be used to diagnose DNS infrastructure i. Two modes 1. Interactive 2. Non-interactive4. tcpdump –i a. linux command only b. example use i. tcpdump –I eth1 tcp port80 1. this dumps all captured traffic from eth1 on tcp port 805. netsh advfirewall firewall a. use this command to add or delete firewall rules b. example uses: i. To enable/disable a program 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= program=<”path to program”> enable= ii. To enable/disable a port 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= protocol= localport= iii. To delete enabled programs or ports 1. netsh advfirewall firewall delete rule name= program= 2. netsh advfirewall firewall delete rule name= protocol= localport= iv. To enable specific services 1. Netsh advfirewall firewall set rule group=<”group name”> new enable= a. Netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes b. Netsh advfirewall firewall set rule group=”remote desktop” new enable=Yes6. netstat a. Provides network statistics and other information i. To show active connections 1. netstat –a ii. Show binaries / Show associated programs associated with connections 1. netstat –b iii. Do not resolve domain names 1. netstat –n iv. Show connection PIDs 1. netstat -o7. netcat or nc a. reads or writes to a network i. Can listen on port, transfer data, scan ports and send data to port 1. Check whether a port is open a. nc –v 2. Port scanning a. nc –vzu 3. Listening server a. nc –l i. To establish connection to the listening server above, use: 1. nc 4. Transfer a file a. On a server, open a listener like in step(3) but attached an output file to save all data received by the port. i. ex. nc –l 4444 > output b. On another machine, make or use existing file and send contents of the file to listening server with: i. cat file | nc ii. If using the example above, it would look like this: cat filename | nc –l 192.168.0.1 4444 iii. This will transfer all contents from file to output on listening server 5. Binding program to port and access it a. Bind CMD program to the port number (SERVER) i. nc –nlvp -e 1. ex. nc –nlvp 4444 –e cmd.exe b. Establish connection with a server ( CLIENT ) i. nc –nv 1. nc –nv 192.168.0.1 4444 c. These commands will open a command prompt of the server from the client machine.8. arp –a a. view local ARP(Address Resolution Protocol) table9. ipconfig(windows) OR ifconfig(linux) a. Shows TCP/IP and network adapter information. b. ipconfig /all i. shows more indepth information such as MAC addresses, DNS servers etc..10. nmap a. used for mapping, port scanning, operating system scan, services scan b. examples of common nmap commands: i. nmap ii. nmap –p iii. nmap –A - this is for detecting OS and Services iv. nmap –sV - Standard service detection v. nmap –sV –version-intensity <1-5> - Aggressiveness of service detection vi. nmap –sV –sC - Scan using default safe scripts vii. nmap –script-help= - Get help with a script viii. nmap –sV –p -script= - Scan using specific NSE script ix. nmap -p- OR nmap –p0-65535 –T5 – Scan all ports with threads x. nmap –sU –sT –p-65535 - Scans all TCP and UDP ports xi. nmap –script <”exploit”> -p- - Scan all ports to find vulnerabilities aggressively xii. nmap –sV –script= - Scan with a set of scripts “*” xiii. nmap –script=asn-query,whois,ip-geolocation-maxmind - Scan to find information about IP address xiv. USE –T1-5 to scan with more threads (faster)11. pathping a. combination of ping and traceroute i. First phase runs traceroute ii. Second phase finds round-trip time and packet loss12. cat a. view contents of a file, create a new file, combine two files into one etc. i. cat ii. cat > iii. cat > iv. cat >> b. can also be used to view contents of file in reverse by using: i. tac 13. grep a. Searches for a string in groups of files i. Example uses: 1. grep <”string”> a. grep “mellon” myfile.txt 2. Common flags a. –E – run grep with extended regular expressions b. –i – ignore case c. –v – return all lines which don’t match the pattern d. –w – only matches that form whole words e. –c – print count of matching lines f. –l – print the name of each file which contains match g. –n – print the line number before each line that matches h. –r – recursively read all files in given directory and subdirectories14. Findstr a. Find file names or strings within files b. Useful findstr command to find all strings within all files in current directory i. findstr /sin “searchstring” *.* > output.txt[/quote]awk is missingPosts: 109 Threads: 0 Joined: N/A November 15, 2022 at 5:12 AM [quote="furydiablus" pid="789072" dateline="1667990149"][quote="zal" pid="749863" dateline="1667355164"]1. tracert a. route of packets and to find ips/locations where they are dropped2. chmod a. example uses: i. chmod 644 file.txt 1. sets file permissions (6 – owner can read and write, 4 – group can only read, 4 – others can only read) 2. same can be achieved with – chmod u=rwx, g=rx, o=rx file.txt 3. chmod 777 file.txt will give everyone access to this file.3. nslookup OR dig (linux) a. displays information that can be used to diagnose DNS infrastructure i. Two modes 1. Interactive 2. Non-interactive4. tcpdump –i a. linux command only b. example use i. tcpdump –I eth1 tcp port80 1. this dumps all captured traffic from eth1 on tcp port 805. netsh advfirewall firewall a. use this command to add or delete firewall rules b. example uses: i. To enable/disable a program 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= program=<”path to program”> enable= ii. To enable/disable a port 1. netsh advfirewall firewall add rule name=<”anyname”> dir= action= protocol= localport= iii. To delete enabled programs or ports 1. netsh advfirewall firewall delete rule name= program= 2. netsh advfirewall firewall delete rule name= protocol= localport= iv. To enable specific services 1. Netsh advfirewall firewall set rule group=<”group name”> new enable= a. Netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes b. Netsh advfirewall firewall set rule group=”remote desktop” new enable=Yes6. netstat a. Provides network statistics and other information i. To show active connections 1. netstat –a ii. Show binaries / Show associated programs associated with connections 1. netstat –b iii. Do not resolve domain names 1. netstat –n iv. Show connection PIDs 1. netstat -o7. netcat or nc a. reads or writes to a network i. Can listen on port, transfer data, scan ports and send data to port 1. Check whether a port is open a. nc –v 2. Port scanning a. nc –vzu 3. Listening server a. nc –l i. To establish connection to the listening server above, use: 1. nc 4. Transfer a file a. On a server, open a listener like in step(3) but attached an output file to save all data received by the port. i. ex. nc –l 4444 > output b. On another machine, make or use existing file and send contents of the file to listening server with: i. cat file | nc ii. If using the example above, it would look like this: cat filename | nc –l 192.168.0.1 4444 iii. This will transfer all contents from file to output on listening server 5. Binding program to port and access it a. Bind CMD program to the port number (SERVER) i. nc –nlvp -e 1. ex. nc –nlvp 4444 –e cmd.exe b. Establish connection with a server ( CLIENT ) i. nc –nv 1. nc –nv 192.168.0.1 4444 c. These commands will open a command prompt of the server from the client machine.8. arp –a a. view local ARP(Address Resolution Protocol) table9. ipconfig(windows) OR ifconfig(linux) a. Shows TCP/IP and network adapter information. b. ipconfig /all i. shows more indepth information such as MAC addresses, DNS servers etc..10. nmap a. used for mapping, port scanning, operating system scan, services scan b. examples of common nmap commands: i. nmap ii. nmap –p iii. nmap –A - this is for detecting OS and Services iv. nmap –sV - Standard service detection v. nmap –sV –version-intensity <1-5> - Aggressiveness of service detection vi. nmap –sV –sC - Scan using default safe scripts vii. nmap –script-help= - Get help with a script viii. nmap –sV –p -script= - Scan using specific NSE script ix. nmap -p- OR nmap –p0-65535 –T5 – Scan all ports with threads x. nmap –sU –sT –p-65535 - Scans all TCP and UDP ports xi. nmap –script <”exploit”> -p- - Scan all ports to find vulnerabilities aggressively xii. nmap –sV –script= - Scan with a set of scripts “*” xiii. nmap –script=asn-query,whois,ip-geolocation-maxmind - Scan to find information about IP address xiv. USE –T1-5 to scan with more threads (faster)11. pathping a. combination of ping and traceroute i. First phase runs traceroute ii. Second phase finds round-trip time and packet loss12. cat a. view contents of a file, create a new file, combine two files into one etc. i. cat ii. cat > iii. cat > iv. cat >> b. can also be used to view contents of file in reverse by using: i. tac 13. grep a. Searches for a string in groups of files i. Example uses: 1. grep <”string”> a. grep “mellon” myfile.txt 2. Common flags a. –E – run grep with extended regular expressions b. –i – ignore case c. –v – return all lines which don’t match the pattern d. –w – only matches that form whole words e. –c – print count of matching lines f. –l – print the name of each file which contains match g. –n – print the line number before each line that matches h. –r – recursively read all files in given directory and subdirectories14. Findstr a. Find file names or strings within files b. Useful findstr command to find all strings within all files in current directory i. findstr /sin “searchstring” *.* > output.txt[/quote]awk is missing[/quote]well, well, well....aint that awkward.Posts: 11 Threads: 0 Joined: N/A November 16, 2022 at 5:32 PM Very helpful thanks Posts: 140 Threads: 0 Joined: N/A November 22, 2022 at 3:17 AM thanks for this |