Welcome to the first week of the first module of Year of Security (YoS)!
The topics we will study this week are Linux and Shell Scripting.
Linux is an operating system just like Windows and MacOS. An operating system is a piece of code that enables the computer software to communicate and operate with the computer hardware easily. Unlike Windows and MacOS though, Linux is free and open-source. What this means is that you don't need to pay to use Linux and can even look at the source code yourself (unlike other operating systems where the source code is a trade secret).
The freedom and simplicity Linux offers make it a popular choice among developers and hackers. Hence, many applications that we will use throughout this course are exclusively available on Linux systems. Apart from all this, Linux is much more reliable, performant and customizable than other operating systems.
An average linux user's desktop
There are a lot of ways to get a Linux system running on your computer : you may choose to dual boot Linux with Windows, install WSL2 on windows (Window's Subsystem for Linux) or use Linux in a Virtual Machine.
For the sake of this course, you are recommended to use CSec Club's very own Virtual Machine which comes preinstalled with most of the cybersecurity tools you will ever need. The installation instructions are provided in the README.docx
file of the same folder that is linked above.
If you choose to dual boot or use WSL, you will need to select a "distribution" of Linux to install. Ubuntu is a popular choice among beginners, but you may search for and use alternatives. There are plenty of tutorials on the web for doing so.
Unfortunately though, those with Mac M1 laptops will not be able to enjoy the benefits of Linux just yet due to the unavailable virtualbox and ofcourse other things. However, the good news is that most of the commands which we will be employing this time would also be usable from Mac OS itself and thus, Mac users(not just M1 users) do not necessarily need to install Linux right away. In the longer term though, Linux would turn out be more important than anything else and we will be looking into possible solutions which can be employed, albeit a little later.
This week's content also includes an introduction to shell scripting. Shell scripting enables one to automate tasks that otherwise require 100s of mouse clicks and other kinds of interesting stuff as well. The resources provided below will help you gain familiarity with both linux and shell scripting. After going through them, you can practice and hone your command line skills by playing the wargame linked in the Practice
section. If you are wondering how all this is relevant to hacking or solving CTF (capture the flag) challenges, we even have several video walkthroughs for the same linked below.
Lastly, the challenges that you need to solve to complete this week's material are linked in the Challenges
section.
- What is Linux used for? (5 mins)
- Beginner's Guide To The Linux Terminal (40 mins)
- Write Your Own Bash Scripts for Automation (15 mins)
- Linux+Python intro : Getting Started - bi0s wiki
- Commands : Linux Commands - bi0s wiki | Basics of Linux
- Bash Scripting : Bash conditions and loops - bi0s wiki | Bash Scripting Tutorial
- Stdin, Stderr, Stdout: Files - bi0s wiki
CSec - Introduction to Linux - MSTeams Recording | CSec - Introduction to Linux - PPT
- Indroduction to Linux and CTFs Capture The Flag - picoCTF 2021 (22 mins)
- find, scripting Leaf of the Forest - picoCTF 2017 | Writing a GetFlag Script in BASH - picoCTF 2017 (5+5 mins)
- nc,grep,cut,tr WorldChat - picoCTF 2017 (10 mins)
- bash for-loops Bash Loop - picoCTF 2017 (8 mins)
- files [stdin, stderr, stdout] Piping Stdin & Redirecting Stderr - picoCTF 2018 (5 mins)
- symbolic links Just No - picoCTF 2017 (8 mins)
We have prepared 3 challenges : Zip Mania, Web Mania and env Pollution. All challenges are present in different folders of this
repository. All in all, you would need to solve atleast 2 challenges throughtout the module but we encourage that you solve all of these, for things are more fun that way
😊. Make sure you go through the respective README.md
files before jumping into the challenge. Have fun!😁
Discussions among mentees are encouraged and we request you to use our Discord Server for the same.
Created with ❤️ by CSeC