Professional Documents
Culture Documents
LINUX Knowledge - Pen Testing Course Link
LINUX Knowledge - Pen Testing Course Link
Link: https://www.youtube.com/watch?v=3Kq1MIfTWCE
https://github.com/hmaverickadams/Beginner-Network-Pentesting
https://app.cybrary.it/immersive/10994631/activity/7212
https://www.codecademy.com/learn/learn-python
Information
Questions that I’m doing for myself because I don’t know how I will take this straight
away. I don’t know if I can wrap this around my head. So, these are the questions:
How many days it will take me to end it?
How can I understand this course?
How will I study?
It this a complement to the course that I’m taking in netcad, or this will take me
to investigate more intel?
Will I finish this course?
Lesson 1:
- Taking notes
*take notes with a lot of child patches
*always screenshot
*Be organized
- Linux
Navigation Commands:
*passwd - change password
*ls = list directory (Can point at any point on the machine) (-la a flag that lists
all + permissions and hidden files)
*pwd - print working directory - check where I am at
*cd - change directory (Can address at any point on the machine)
*mkdir - make directory
*rmdir - remove a directory
*rm - remove files
*echo sends data (if not destination is given the echo will print the data to the
terminal)
*cp - copy a file (source] [destination])
*mv - move a file ([source] [destination])
*locate - locate a file (locate [filename])
*updatedb - updates the directory database (must run this before running locate)
*man - manual page of any command
*grep - search for the following words (can be used to check if a file contains
specific info)
:
*cat - reads a file to the terminal
*chmod - change permissions for a file (perms go from level 0 - 7 and are typed
with 3 number for (user group everyone) for a detailed explanation on Linux
permissions visit the node “Linux perms” (+x executes perms))
*adduser - make a new user
*sudo - give root permissions to the next command (sudo ..... [the command])
*su - switch user
Network Commands:
*ifconfig - print network information
*iwconfig - wireless network information
*ping - ping an ip address (-c flag let’s you say how much times you want to
ping a machine)
*arp -a - send out an arp request to check for machines on the network
*netstat -a - shows all open ports and what is connected to those ports
*route - shows a routing table
Webserver Commands:
*service apache2 start - start a webserver
*service ssh start - start a ssh server
*service PostgreSQL start - a service that starts with Metasploit
*service apache2 stop - stops the webserver
*systemctl enable [program name] - start the service when the machine turns on
-Python Basics:
*if you write a python script in a normal text editor (not an ide) your program
should start with “#!/bin/ python3” to point at the fact that we are using python.
*print - print(string) - prints to the terminal (string must be with “” or ‘’)
Math Operators:
* + - add
* - - subtract
* * - multiply
* / - divide
* ** - exponent - power of
* % - modulo - the remainder of a division
* // - number without leftovers - cleans a number - float -> int
* += - add a number into the already existing value in the variable
* -= - subtract a number from an the already existing value in the variable
String Methods:
* len - len([var name]) checks the length of a variable
* upper - [var].upper() - Capitalizes the letters in the variable
* lower - [var].lower() - returns the letters to normal (reverse capitalization)
* title - [var].title() - Capitalizes the first letter of every word in a variable
Declaring Variables:
data also means variables!
* [name] = [data] - This type of declaration will automatically set the type of the
variable
* [name] int([data]) - This type of declaration will set the var type to int
* [name] float([data]) - This type of declaration will set the var type to float
* [name] str([data]) - type of declaration will set the var type to String.
* To convert a variable to a different type you can just use [type]([data])
example:
heya int(29)
str(heya)
print(heya)
**lists count from 0 - ... so to print the second value we use [name][1]
** we can call multiple values by calling out +1 more value then we want. for
example, to print value 1 and 2 we will use [name][0:2] this will print 0 and 1.
** we can print the entire list from a certain point up to (or down to) the entire
list by not giving a value. [0:] or [ :3] this will print all the list or everything up to the
4th item.
** negative items (-1) will pull the last item in the list
Tuples:
**A tuple is like a list but cannot be modified.
** to make a tuple you need to use () instead of [] in a list
Loops:
For Loops:
for [variable] in [Something with value (can be a list, variable....): - This
loop will add 1 to the first variable until it reaches the end of the second variable (print
all the list, all the numbers in an int...)
While loop:
while [statement]: - this loop will execute if the statement is true