So Cybersecurity... This field is all about finding exploitable areas in code and closing it off before the bad guys exploit the vulnerablities.
For Cybersecurity testing,you must first know how to spot exploits and vulnerablities in a Code that will provide a way to get in and also how to get in and exploit a system.
Exploiting can be anything from accessing data you shouldn't access, breach privileges, control stuff etc.,
I'll try to share some resources that will see how we can do that. First, some Insight into Linux, commandlines will help.
This will take a peek at Linux OS, Linux filesystem,permissions,commands, endianness
What is an OS?
OS is basically a software that helps to make,execute and work with other programs.
GNU/Linux or Linux as it is called nowadays is one such operating system. It has supportive programs like text editors, compiler (most are by GNU) etc in addition to the kernel(Linux)
Kernel is responsible for dividing the memory and system resources among various processes.
Examples for Linux distributions is Ubuntu, Kali Linux etc
First lets see about - Linux Filesystem Linux has a single root filesystem. There is a root directory/folder - "/" and the entire system is attached as branches to this root. Every directory is there for a specific purpose to store files of some specific nature.
Every file has a owning user and a owning "group"(A group is a group of users other than the owning user).
Every file has a permission associated with it in Linux.
There are three sets of permissions
1) User permissions - Permission that a user has over a file
2) Group permissions - Permission that the owning group has over a file
3) Other permissions - Permission that others other than the owning user and group have over the file.
Each of User,Group and Other has 3 permissions - Read,Write,Execute.
This can be set by using u,g,o and add/remove (+/-) and r/w/x for read write and execute addition or removal
Also can be set through octal values for set of ugo in that order.
0777 means read,write,execute for all UGO.
0666 means read,write only for all UGO
Owning user/group can be changed through chown command
Permissions can be changed through chmod command
Syntax:
chown user(:group) filename
chmod (+/-)permission filename
Part inside () means that field is optional
chmod 0777 afile
chmod -x afile
chmod u+rwx afile
chmod g-x afile
chmod o+r a file
chown a:b afile
0777, same as u+rwx g+rwx o+rwx -Adds Read,Write,Execute permissions to afile Endianness is how bytes are stored in memory locations. For example the data "0x0a0b0c0d" can be stored in two ways.(0x,\x represents data has a hexadecimal base)