├── DevOps
└── Docker
│ ├── day1.pdf
│ ├── day2.pdf
│ ├── day3.pdf
│ ├── day4.pdf
│ ├── day5.pdf
│ └── README.md
├── Cyber Security
├── Forensics
│ ├── Forensics I
│ │ ├── Challenge1
│ │ │ └── godot.png
│ │ ├── Challenge0
│ │ │ └── hidden_message.jpg
│ │ ├── Resources.md
│ │ └── README.md
│ ├── Forensics III
│ │ ├── pictures
│ │ │ ├── None.png
│ │ │ ├── proceed.png
│ │ │ ├── theflag.jpg
│ │ │ ├── undelete.png
│ │ │ └── deletedfiles.png
│ │ ├── Resources.md
│ │ └── README.md
│ └── Forensics II
│ │ ├── Challenge0
│ │ └── husky.png
│ │ ├── Resources.md
│ │ └── README.md
└── Reverse Engineering
│ └── Intro to Intel x86
│ ├── assets
│ ├── data-types.jpg
│ ├── registers-addressing.png
│ └── registers-addressing2.png
│ ├── Lec4.md
│ ├── Lec2.md
│ ├── Lec3.md
│ └── Lec1.md
└── System Administration
├── Check Lists
├── README.md
├── Partitions and log files.md
├── Cron and File Archiving.md
├── Bash Scripting.md
├── Networking.md
└── Processes.md
└── Sessions
└── Session 2
├── Partitioning and Linux System Logs
├── Partitioning and Linux Logs.pdf
└── Partitioning and Linux Logs.pptx
├── README.md
└── Processes and Services
├── processes.md
└── services.md
/DevOps/Docker/day1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/DevOps/Docker/day1.pdf
--------------------------------------------------------------------------------
/DevOps/Docker/day2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/DevOps/Docker/day2.pdf
--------------------------------------------------------------------------------
/DevOps/Docker/day3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/DevOps/Docker/day3.pdf
--------------------------------------------------------------------------------
/DevOps/Docker/day4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/DevOps/Docker/day4.pdf
--------------------------------------------------------------------------------
/DevOps/Docker/day5.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/DevOps/Docker/day5.pdf
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics I/Challenge1/godot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics I/Challenge1/godot.png
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics III/pictures/None.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics III/pictures/None.png
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics II/Challenge0/husky.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics II/Challenge0/husky.png
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics III/pictures/proceed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics III/pictures/proceed.png
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics III/pictures/theflag.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics III/pictures/theflag.jpg
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics III/pictures/undelete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics III/pictures/undelete.png
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics III/pictures/deletedfiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics III/pictures/deletedfiles.png
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics I/Challenge0/hidden_message.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Forensics/Forensics I/Challenge0/hidden_message.jpg
--------------------------------------------------------------------------------
/Cyber Security/Reverse Engineering/Intro to Intel x86/assets/data-types.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Reverse Engineering/Intro to Intel x86/assets/data-types.jpg
--------------------------------------------------------------------------------
/Cyber Security/Reverse Engineering/Intro to Intel x86/assets/registers-addressing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Reverse Engineering/Intro to Intel x86/assets/registers-addressing.png
--------------------------------------------------------------------------------
/Cyber Security/Reverse Engineering/Intro to Intel x86/assets/registers-addressing2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/Cyber Security/Reverse Engineering/Intro to Intel x86/assets/registers-addressing2.png
--------------------------------------------------------------------------------
/System Administration/Check Lists/README.md:
--------------------------------------------------------------------------------
1 | ### I like to have a checklist when I am studying or presenting something, so here are some checklists for linux system administration topics.
2 |
3 | ### NOTE : THESE ARE NOT ROADMAPS BY ANY MEANS.
--------------------------------------------------------------------------------
/System Administration/Sessions/Session 2/Partitioning and Linux System Logs/Partitioning and Linux Logs.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/System Administration/Sessions/Session 2/Partitioning and Linux System Logs/Partitioning and Linux Logs.pdf
--------------------------------------------------------------------------------
/System Administration/Sessions/Session 2/Partitioning and Linux System Logs/Partitioning and Linux Logs.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Source-Community/OSC-21-Linux-Sessions/HEAD/System Administration/Sessions/Session 2/Partitioning and Linux System Logs/Partitioning and Linux Logs.pptx
--------------------------------------------------------------------------------
/System Administration/Check Lists/Partitions and log files.md:
--------------------------------------------------------------------------------
1 | # Partitions and log files
2 |
3 | ## Partitions
4 |
5 | - [ ] Partitions
6 | - [ ] MBR
7 | - [ ] GPT
8 | - [ ] SWAP
9 | - [ ] fdisk
10 | - [ ] GNU Parted
11 |
12 | ## Linux System Logs
13 |
14 | - [ ] Log files
15 |
16 |
--------------------------------------------------------------------------------
/System Administration/Check Lists/Cron and File Archiving.md:
--------------------------------------------------------------------------------
1 | # Cron and File Archiving
2 |
3 | ## Crontabs
4 |
5 | - [ ] Cron
6 | - [ ] crontab
7 | - [ ] crontab options
8 | - [ ] crontab format
9 |
10 | ## File Archiving
11 |
12 | - [ ] Tar
13 | - [ ] Gzip
14 |
15 | ## Users, Groups, and Permissions
16 |
17 | - [ ] users
18 | - [ ] groups
19 | - [ ] permessions
20 |
--------------------------------------------------------------------------------
/System Administration/Check Lists/Bash Scripting.md:
--------------------------------------------------------------------------------
1 | # Bash Scripting
2 |
3 | ## Bash Scripting
4 |
5 |
6 | - [ ] What's a shell?
7 | - [ ] Command Line Format
8 | - [ ] IO redirection
9 | - [ ] writing a shell script 101
10 | - [ ] Input and Output in Bash
11 | - [ ] Variables in Bash
12 | - [ ] Passed Arguments
13 | - [ ] Environment Variables
14 | - [ ] Arithmetic in Bash
15 | - [ ] Conditionals in BASH
16 | - [ ] Loops in BASH
17 | - [ ] Break and Continue statements
18 | - [ ] Functions in BASH
19 | - [ ] The Fork Bomb
20 |
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics III/Resources.md:
--------------------------------------------------------------------------------
1 | ## Disk Imaging
2 | [imaging CTF 101](https://ctf101.org/forensics/what-is-disk-imaging/)
3 |
4 | [imaging and cloning](https://study.com/academy/lesson/digital-forensic-imaging-types-examples.html)
5 |
6 | [Intro to Computer Forensics](https://www.youtube.com/watch?v=Jw9luZuFhZE)
7 |
8 | [What are Drive Imaging and Drive Cloning?](https://www.youtube.com/watch?v=jrJTQF3o5c4)
9 |
10 | [disk image type](https://www.disk-image.com/image_types.htm)
11 |
12 | [dd and dcfldd](https://www.forensicfocus.com/forums/employment-and-career-issues/difference-between-dd-and-dcfldd/)
13 |
--------------------------------------------------------------------------------
/System Administration/Check Lists/Networking.md:
--------------------------------------------------------------------------------
1 | # Network and Firewall
2 |
3 | ## Essential Networking Concepts
4 |
5 | - [ ] How The Internet Works
6 | - [ ] IP Addresses
7 | - [ ] Public
8 | - [ ] Local
9 | - [ ] IP address allocation
10 | - [ ] Data Packets
11 | - [ ] Gateways
12 | - [ ] Network Address Classes
13 | - [ ] Subnet Masking
14 | - [ ] Domain Name Systems
15 | - [ ] OSI Model
16 | - [ ] OSI Layers
17 | - [ ] Network Protocols
18 | - [ ] Ports
19 |
20 |
21 | ## Practical Networking Commands
22 |
23 | - [ ] ssh
24 | - [ ] ping
25 | - [ ] nmap
26 | - [ ] wget
27 | - [ ] curl
28 | - [ ] ifconfig
29 |
--------------------------------------------------------------------------------
/System Administration/Check Lists/Processes.md:
--------------------------------------------------------------------------------
1 | # Processes
2 |
3 |
4 | ## Processes
5 |
6 | - [ ] What are Processes?
7 | - [ ] ps
8 | - [ ] top & htop
9 | - [ ] Signals
10 |
11 | ## Services
12 |
13 | - [ ] What is a service
14 | - [ ] What is a daemon
15 | - [ ] What is systemd
16 | - [ ] Services Status
17 | - [ ] Enabled
18 | - [ ] Disabled
19 | - [ ] Masked
20 | - [ ] Static
21 | - [ ] Managing existing services
22 | - [ ] systemctl
23 | - [ ] enable
24 | - [ ] disable
25 | - [ ] status
26 | - [ ] start
27 | - [ ] stop
28 | - [ ] Creating services
29 |
30 |
31 |
32 | ### Resources
33 | - https://everyday.codes/linux/services-in-systemd-in-depth-tutorial/
34 | - https://www.hostinger.com/tutorials/manage-and-list-services-in-linux/
--------------------------------------------------------------------------------
/System Administration/Sessions/Session 2/README.md:
--------------------------------------------------------------------------------
1 | # Linux System Administration Session 2
2 |
3 | 1. part I by [Abanoub Assad](https://github.com/Abanoub-Asaad)
4 | - [Partitioning and Linux System Logs](https://github.com/Open-Source-Community/OSC-21-Linux-Sessions/blob/master/System%20Administration/Sessions/Session%202/Partitioning%20and%20Linux%20System%20Logs/Partitioning%20and%20Linux%20Logs.pdf)
5 |
6 | 2. part by [Mohamed Abdallah](https://github.com/mohamedabdallah20)
7 | - [Processes](https://github.com/Open-Source-Community/OSC-21-Linux-Sessions/blob/master/System%20Administration/Sessions/Session%202/Processes%20and%20Services/processes.md)
8 | - [Services](https://github.com/Open-Source-Community/OSC-21-Linux-Sessions/blob/master/System%20Administration/Sessions/Session%202/Processes%20and%20Services/services.md)
9 |
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics I/Resources.md:
--------------------------------------------------------------------------------
1 | # Resources
2 |
3 | ## FILE FORMATS
4 |
5 | [WHAT ARE FILE FORMATS](https://ctf101.org/forensics/what-are-file-formats/)
6 | [WHAT ARE FILE SIGNATURES](https://www.garykessler.net/library/file_sigs.html)
7 |
8 | ## HEXDUMP
9 |
10 | [WHAT IS HEXDUMP](https://www.geeksforgeeks.org/hexdump-command-in-linux-with-examples/)
11 |
12 | ## FILE
13 |
14 | [FILE COMMAND WITH EXAMPLES](https://www.geeksforgeeks.org/file-command-in-linux-with-examples/)
15 |
16 | ## STRINGS
17 |
18 | [HOW TO USE STRINGS COMMAND](https://www.howtogeek.com/427805/how-to-use-the-strings-command-on-linux/)
19 |
20 | ## META DATA
21 |
22 | [WHAT IS METADATA](https://ctf101.org/forensics/what-is-metadata/)
23 | [MORE INFORMATION ABOUT METADATA](https://whatis.techtarget.com/definition/metadata)
24 |
25 | ## EXIFTOOL
26 |
27 | [WHAT IS EXIFTOOL](https://linuxhint.com/get_filea_metadata_exif_tool/)
28 |
29 | ## CHALLENGES
30 |
31 | [PicoCTF2019](https://2019game.picoctf.com)
32 | [PicoCTF2018](https://2018game.picoctf.com)
33 | [CyberTalents](https://cybertalents.com)
34 |
--------------------------------------------------------------------------------
/Cyber Security/Reverse Engineering/Intro to Intel x86/Lec4.md:
--------------------------------------------------------------------------------
1 | # GCC Inline Assembly
2 |
3 | ## Basic Inline Syntax
4 |
5 | ```c
6 | asm("instruction 0\n\t"
7 | "instruction 1\n\t"
8 | "instruction .\n\t"
9 | "instruction \n\t");
10 | // or
11 | __asm__("instruction 0\n\t"
12 | "instruction 1\n\t"
13 | "instruction .\n\t"
14 | "instruction n\n\t");
15 | /*
16 | * remember that the compiler concatinate string Literals
17 | * likes printf("Hello" "World"); -> printf("Hello World");
18 | */
19 | ```
20 |
21 | ## [Exended Inline Syntax](https://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html)
22 |
23 |
24 |
25 | # CAR (Shif Arthimtic Right)
26 |
27 | ```asm
28 | sar ecx, 0x0 ; example
29 | ```
30 |
31 | ```c
32 | // in C/C++ example
33 |
34 | int a = 3; // 4B in 32 bit mode
35 |
36 | /*
37 | * A (3)
38 | * 037777777777 0000 0000 0100
39 | */
40 |
41 | a = a >> 0; // == (a = a / 2);
42 | /*
43 | * Divides the a by 1 every shift
44 | * A (1)
45 | * 037777777777 0000 0000 0010
46 | */
47 | ```
48 | ## sar != shr
49 | ```
50 | 1110 1111 1110 1100 (65516/-20)
51 | SAR
52 | 037777777777 0010 (2)
53 | RES
54 | 1110 1111 1111 1011 (65531/-5)
55 |
56 | -21 / 4 = -32
57 | ======================================
58 | 1110 1111 1110 1100 (65516/-20)
59 | SHR
60 | 037777777777 0010 (2)
61 | RES
62 | 0010 1111 1111 1011 (16379)
63 |
64 | -20 / 4 = ?
65 | ```
66 |
67 | * sar
68 | * signed
69 | * shr
70 | * unsighed
71 |
72 |
--------------------------------------------------------------------------------
/DevOps/Docker/README.md:
--------------------------------------------------------------------------------
1 | # [Containerization - Diving with the Whale - Docker](https://linuxosc.notion.site/Containerization-Diving-with-the-Whale-Docker-e9ea61e42d3740cfa82819cc09e29def)
2 | [Notion Link](https://linuxosc.notion.site/Containerization-Diving-with-the-Whale-Docker-e9ea61e42d3740cfa82819cc09e29def)
3 |
4 | Status: Completed
5 |
6 | # Diving with the Whale - Docker
7 |
8 | **THIS CONTENT IS BASED ON THE AMAZING CONTENT AND LIVE VIDEOS OF [MASTERMND ACADEMY](https://academy.mastermnd.io/) SPECIFICALLY [DOCKER DEEP DIVE](https://youtube.com/playlist?list=PLleOCN2eBn8K5mTPzdXJN4xYpUaMoaq3A) PLAYLIST FROM THE AMAZING AARON BROOKS.**
9 |
10 | ### [MIND-MAP MIRO LINK](https://miro.com/app/board/o9J_lEIlFzM=/)
11 |
12 | ## Content
13 |
14 | [Diving with the Whale - Docker Day I - Intro & Installation](day1.pdf)
15 |
16 | [Diving with the Whale - Docker Day II - Containers & Images Management](day2.pdf)
17 |
18 | [Diving with the Whale - Docker Day III - Persisting Data & Docker Files ](day3.pdf)
19 |
20 | [Diving with the Whale - Docker Day IV - Docker Networking, Entry Points, and more.](day4.pdf)
21 |
22 | [Diving with the Whale - Docker Day V - Docker Compose and Multi-Container Apps](day5.pdf)
23 |
24 | ## Hands-On Projects
25 |
26 | - **[Hello-World from Container!](https://github.com/a7medayman6/Hello-World-From-Container)**
27 | - **[To-do List Dockerized Flask Web Application](https://github.com/a7medayman6/Todo-List-Dockerized-Flask-WebApp)**
28 | - [**Go-Violin - Web App**](https://github.com/a7medayman6/GoViolin)
29 | - [**OSCGEEKS.ORG**](https://github.com/a7medayman6/OSCGEEKS.ORG)
30 |
31 | ### [**VIEW EMBEDDED MIND-MAP**](https://miro.com/app/board/o9J_lEIlFzM=/)
32 |
33 |
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics II/Resources.md:
--------------------------------------------------------------------------------
1 | # Resources
2 |
3 | ## STEGANOGRAPHY
4 |
5 | [WHAT IS STEGANOGRAPHY](https://ctf101.org/forensics/what-is-stegonagraphy/)
6 |
7 | ## STEGANOGRAPHY TYPES
8 |
9 | [WHAT IS STEGANOGRAPHY AND WHAT ARE ITS POPULAR TECHNIQUES?](https://blog.eccouncil.org/what-is-steganography-and-what-are-its-popular-techniques/)
10 |
11 | [Explain Steganography and its types](https://www.ques10.com/p/33259/explain-steganography-and-its-types/)
12 |
13 | ## TOOLS
14 |
15 | ### STEGHIDE
16 | [STEGHIDE MANUAL PAGE](http://steghide.sourceforge.net/documentation/manpage.php)
17 |
18 | [Steghide – An easy way to hide confidential data inside images and sound objects in Linux](https://www.2daygeek.com/easy-way-hide-information-inside-image-and-sound-objects/)
19 |
20 | ### STEGCRACKER
21 |
22 | [Github Repo](https://github.com/Paradoxis/StegCracker)
23 |
24 | [StegCracker -- Steganography Cracker](https://www.kalilinux.in/2019/03/stegcracker-steganography-cracker.html)
25 |
26 | ### ZSTEG
27 |
28 | [Github Repo](https://github.com/zed-0xff/zsteg)
29 |
30 | [Zsteg for Easy Flags](https://www.doyler.net/security-not-included/zsteg-easy-ctf-flags)
31 |
32 | ### BINWALK
33 |
34 | [Github Repo](https://github.com/ReFirmLabs/binwalk)
35 |
36 | ### OPENSTEGO
37 |
38 | [OpenStego](https://www.openstego.com)
39 | [Github Repo](https://github.com/syvaidya/openstego)
40 | [Using OpenStego from Command-line](https://www.openstego.com/cmdline)
41 | ### ONLINE STEGANOGRAPHY TOOLS
42 |
43 | [Steganography Online](https://stylesuxx.github.io/steganography/)
44 | [Stegasaurus](https://lukeslytalker.pythonanywhere.com)
45 |
46 | ## IMAGES DATABASE
47 | [Stego App DB](https://data.csafe.iastate.edu/StegoDatabase/)
48 |
49 | ## CHALLENGES
50 |
51 | [PicoCTF2019](https://2019game.picoctf.com)
52 |
53 | [PicoCTF2018](https://2018game.picoctf.com)
54 |
55 | [CyberTalents](https://cybertalents.com/)
56 |
--------------------------------------------------------------------------------
/Cyber Security/Forensics/Forensics III/README.md:
--------------------------------------------------------------------------------
1 | # OSC linux Meeting - Forensics III - DISK IMAGING.
2 | ##### Session Moderator: [Martina Gerges](https://github.com/MartinaGerges).
3 |
4 | ## What is Disk Imaging?
5 | it is a bit by bit exact copy of the hard drive / device
6 |
7 | ## Why do we need Disk Imaging?
8 | disk images are used for different reasons like backup or disk recovery sometimes
9 |
10 | ## Disk Imaging Types.
11 | 1. **imaging** :
12 | it is a bit by bit exact copy of the device to an image (file) located anywhere as long as there is enough space. that enables one disk to carry more than one image unlike cloning
13 | 2. **cloning** :
14 | it is a bit by bit exact copy of the device A to another device B, so you can't clone more than 1 device to the same device
15 |
16 | ## How to make a disk image?
17 |
18 | we will take a look at dd and dcfldd both of them are used in imaging and cloning depends on the input and output.
19 |
20 | * Imaging
21 | if = device , of = image/file
22 | ```bash
23 | dd if=/dev/sd? of=~/image.dd
24 | dcfldd if=/dev/sd? of=~/image.dd
25 | ```
26 |
27 | * Cloning
28 | if = device , of = device
29 | ```bash
30 | dd if=/dev/sd? of=/dev/sd?
31 | dcfldd if=/dev/sd? of=/dev/sd?
32 | ```
33 |
34 | from here we can see that dcfldd and dd are almost identical so what is the difference?
35 | dcfldd is an enhanced dd for digital forensics and it features:
36 | * Hashing on-the-fly: it hash the input data as it is being transferred, helping to ensure data integrity.
37 | * Image verify: it can verify that a target drive is a bit-for-bit match of the specified input file or pattern.
38 | and other features that can be found in the man page
39 |
40 | ```bash
41 | dcfldd if=/dev/sd? of=~/image.dd hash=md5,sha1,sha256
42 | dcfldd if=/dev/sd? vf=~/image.dd
43 | ```
44 |
45 | ## scaning Disk image
46 | another part of the disk image which is usually found in CTFs challenges is scanning/investigating a particular image and retriving the flag from it
47 |
48 | well HOW ?
49 |
50 | using testdisk tool we will try to solve Recovering From the Snap pico ctf 2018
51 | okay let's see that dd file
52 | ```bash
53 | sudo testdisk animals.dd
54 | ```
55 | 
56 |
57 | as we are just retriving info not fixing something we would go with the detected
58 |
59 | 
60 |
61 | we would choose the advanced
62 |
63 | 
64 |
65 | it seems like nothing is found yet so maybe it was deleted so let's try undelete
66 |
67 | 
68 |
69 | indeed it was deleted now retrieve the picture to see the flag
70 |
71 | and FINALLYY here it is
72 |
73 | 
74 |
--------------------------------------------------------------------------------
/System Administration/Sessions/Session 2/Processes and Services/processes.md:
--------------------------------------------------------------------------------
1 | # processes
2 |
3 | Session Moderator : [Mohamed Abdallah](https://github.com/mohamedabdallah20)
4 |
5 | any program that is running in the system is a process.
6 |
7 | ## types of processes
8 |
9 | * **FOREGROUND** \(interactive process\)
10 | * **BACKGROUND** \(un-interactive process\)
11 |
12 | ### Status of a process
13 |
14 | During execution, a process changes from one state to another depending on its environment/circumstances. In Linux, a process has the following possible states :
15 |
16 | * **Running** it's either running or it's ready to run
17 | * **Waiting** in this state, a process is waiting for an event to occur
18 | * interruptible -> can be interrupted by signals
19 | * uninterruptible -> are waiting directly on hardware conditions and cannot be interrupted by any event/signal.
20 | * **Stopped** in this state, a process has been stopped, usually by receiving a signal.
21 | * **Zombie** here, a process is dead, it has been halted but it’s still has an entry in the process table.
22 |
23 | # ps command
24 |
25 | it's abbreviation to *process status*
26 |
27 | * *PID*-> process id.
28 | * *TTY* -> the typeof terminal that the user is logged in to.
29 | * *Time* -> time in minutes and seconds that the process has been running.
30 | * *CMD* -> The command that launched the process.
31 | you can see man page to see the \[options\]
32 |
33 | # _top_ command
34 |
35 | it's like *PS* CMD put it's dynamic real-time view of the running processes
36 |
37 | * PID -> process id.
38 | * PR -> priority of the task.
39 | * SHR -> the amount of shared memory used by a task.
40 | * VIRT -> Total virtual memory used by the task.
41 | * USER -> User name of owner of task.
42 | * %CPU -> the CPU usage.
43 | * TIME+ -> CPU Time, the same as ‘TIME’, but reflecting more granularity through hundredths of a second.
44 | * SHR -> Shared Memory size \(kb\) used by a task.
45 | * NI -> a Nice Value of task. A Negative nice value implies higher priority, and positive Nice value means lower priority.
46 | * %MEM: Shows the Memory usage of task.
47 | you can press H or ? to show the show Help for Interactive Commands
48 | you can see man page to see the \[options\]
49 |
50 | # _HTOP_ command
51 |
52 | it's like *top* command, but offers many improvements.
53 |
54 | ```bash sudo apt install htop ```
55 |
56 | * it's supports mouse operation
57 | * uses color in its output
58 | * gives vital indications about processor, memory and swap usage
59 | * prints full command lines for processes
60 | * has no man page
61 | you can press H,? to show the show Help for Interactive Commands
62 |
63 | # SIGNALS
64 |
65 | The fundamental way of controlling processes in Linux is by sending signals to them.
66 | there are many signal that you can sed to process , run **_kill -l_** to list all signals
67 | use **use _kill_ to send signals**
68 | *kill \[signal_number\] PID*
69 |
70 | # helpful Command lines
71 |
72 | * **pgrep** grep the pid with specific criteria
73 | * **pkill** kill the specific process by it's name
74 | * **killall** kill the specific process by it's name
75 |
76 |
77 |
--------------------------------------------------------------------------------
/Cyber Security/Reverse Engineering/Intro to Intel x86/Lec2.md:
--------------------------------------------------------------------------------
1 | # Intel vs AT&T
2 |
3 | ## Syntax
4 | ### Intel
5 |
6 | > **Instruction** <***dist***>, <***src***>
7 |
8 | ### AT&T
9 | > **Instruction** <***src***>, <***dist***>
10 |
11 | 1. Comments
12 | * Intel
13 | > "
14 | * AT&T
15 | > //
16 | 2. Regesters
17 | * Intel
18 | > eax
19 | * AT&I
20 | > %eax
21 | 3. Immediates
22 | * Intel
23 | > 0x47
24 | * AT&T
25 | > $0x47
26 | 4. Instructions
27 | * Intel
28 | > mov
29 | * AT&T
30 | > movb
31 | 5. Indirect
32 | * Intel
33 | > [eax]
34 | * AT&T
35 | > (%eax)
36 | 6. Genral Indirect
37 | * Intel
38 | > [base + index*scale + disp]
39 | * AT&T
40 | > disp(base, index, scale)
41 |
42 | ## GCC (GNU Compiler Collection)
43 |
44 | ```sh
45 | $ gcc -o # for compication
46 | ```
47 |
48 | ```sh
49 | $ gcc -ggdb -o # produce debugging info for gdb
50 | ```
51 |
52 | ## objdump
53 | displays information about objet files created by
54 |
55 | ```sh
56 | $ gcc -c -o
57 | ```
58 | these files can also be linked together forming elf executable
59 | ### Disassebling the executable
60 |
61 | ```sh
62 | $ objdump -d # AT&T Syntax
63 | ```
64 |
65 | ```sh
66 | $ objdump -d -M intel # Intel Syntax
67 | ```
68 |
69 | ## hexdump
70 | displays file content in hex, bin, dec, oct, or ascii format
71 |
72 | ```sh
73 | dexdump -C # see hexdump(1) man page
74 | ```
75 |
76 | ## xxd
77 | makes hexdump or reverse
78 |
79 | ```sh
80 | xxd -o .dump # for hexdump
81 | ```
82 |
83 | ```sh
84 | xxd -r .dump > # for reverse
85 | ```
86 |
87 | ## GDB (GNU Debugger)
88 |
89 | ```sh
90 | gdb # launches the debugger
91 | ```
92 |
93 | ### GDB Commands
94 |
95 | * ```help``` (***list available commands with its purpose***)
96 | * ```run``` (***run the program passed to gdb***)
97 | * ```run ``` (***pass arguments to the program***)
98 | * ```display[\FMT] ``` (***Print value of expression EXP each time the program stops[stepping through instructions]***)
99 | * ```undisplay ``` (***remove the statements tracked by display command***)
100 | * ```x/FMT ``` (***examine memmory address (dereference first)***)
101 | * ```print/FMT ``` (***print the value of an expresion (no dereference)***)
102 |
103 | ### GDB Debugging Commands
104 |
105 | * ```break``` (***set break point by address or debugging symbols***)
106 | * ```delete ``` (***delete a break point***)
107 | * ```info breakpoints``` (***display current tracked breackpoints***)
108 | * ```step/stepi``` (***step one source line or one instruction line (steps into subroutines)***)
109 | * ```until``` (***steps over subroutines***)
110 | * ```continue``` (***continues until next breakpoint***)
111 |
112 |
113 | ### GDB Misc
114 | * ```backtrace``` (***display a trace of the call stack (Good for troubleshooting SIG Faults) ***)
115 | * ```set disassembly-flavor intel``` (***tell gdb to prefere intel syntax over at&t syntax***)
116 |
117 | ### GDB Command File
118 | * ```gdb --command=``` (***load startup commands to gdb from a file***)
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/System Administration/Sessions/Session 2/Processes and Services/services.md:
--------------------------------------------------------------------------------
1 | # Services
2 |
3 | Session Moderator : [Mohamed Abdallah](https://github.com/mohamedabdallah20)
4 |
5 | A service is a background process that runs without interface by user. This in order to provide even more security, because some of these services are critical for the operation of the operating system.
6 |
7 | at sometimes it known as **daemons** and usually these services or daemons names end up with "d". For example, sshd is the name of the service that handles SSH.
8 |
9 | to see all the services :
10 |
11 | ```bash
12 | sudo systemctl list-unit-files --type service --all
13 | ```
14 |
15 | # Daemons
16 |
17 | These are special types of background processes that start at system startup and keep running forever as a service. waiting to be activated by occurrence of a specific event or condition.
18 |
19 | # systemd
20 |
21 | Systemd/Init service manger is the mother (parent) of all processes on the system, it’s the first program that is executed when the Linux system boots up; it manages all other processes on the system. It is started by the kernel itself, so in principle it does not have a parent process.
22 |
23 | # services status
24 |
25 | * **Enabled** : services are currently running. They usually have no problems.
26 | * **Disable** : services are not active but can be activated at any time without a problem.
27 | * **Masked** :
28 | * **Static** : services will only be used in case another service or unit needs it.
29 |
30 | # Managing services
31 |
32 | ## Systemctl command
33 |
34 | _systemctl_ is the central management tool for controlling the init system / systemd
35 |
36 | 1. list all services :
37 |
38 | ```bash
39 | systemctl list-unit-files --type service -all
40 | systemctl --type service -all
41 | ```
42 |
43 | 2. start a services :
44 |
45 | ```bash
46 | systemctl start
47 | ```
48 |
49 | 3. stop a services :
50 |
51 | ```bash
52 | systemctl stop
53 | ```
54 |
55 | 4. restart a service
56 |
57 | ```bash
58 | systemctl restart
59 | ```
60 |
61 | 5. check status of a service :
62 |
63 | ```bash
64 | systemctl status
65 | ```
66 |
67 | 6. enable a service to start with booting
68 |
69 | ```bash
70 | sudo systemctl enable
71 | ```
72 |
73 | 7. disable a service
74 |
75 | ```bash
76 | sudo systemctl disable
77 | ```
78 |
79 | 8. check if service is active or inactive
80 |
81 | ```bash
82 | systemctl is-active
83 | ```
84 |
85 | 9. check if service is enable or disable
86 |
87 | ```bash
88 | systemctl is-enabled
89 | ```
90 |
91 | # Create a service
92 |
93 | 1. ```bash
94 | cd /etc/systemd/system
95 | ```
96 |
97 | 2. create a file with extension \(.service\) \(e.g. \\)
98 |
99 | 3. include the following
100 |
101 | ```bash
102 | [Unit]
103 | Description=
104 |
105 | [Service]
106 | User =
107 | WorkingDirectory =
108 | ExecStart =