Null Puliya Linux

Null Bangalore Puliya Session Bangalore, India
1 / 25
Slide 1 of Null Puliya Linux
Slide 2 of Null Puliya Linux
Slide 3 of Null Puliya Linux
Slide 4 of Null Puliya Linux
Slide 5 of Null Puliya Linux
Slide 6 of Null Puliya Linux
Slide 7 of Null Puliya Linux
Slide 8 of Null Puliya Linux
Slide 9 of Null Puliya Linux
Slide 10 of Null Puliya Linux
Slide 11 of Null Puliya Linux
Slide 12 of Null Puliya Linux
Slide 13 of Null Puliya Linux
Slide 14 of Null Puliya Linux
Slide 15 of Null Puliya Linux
Slide 16 of Null Puliya Linux
Slide 17 of Null Puliya Linux
Slide 18 of Null Puliya Linux
Slide 19 of Null Puliya Linux
Slide 20 of Null Puliya Linux
Slide 21 of Null Puliya Linux
Slide 22 of Null Puliya Linux
Slide 23 of Null Puliya Linux
Slide 24 of Null Puliya Linux
Slide 25 of Null Puliya Linux

Abstract

A foundational introduction to Linux for security professionals, covering the filesystem, essential commands, shell scripting, SSH configuration, and task automation via cron.

AI Generated Summary

AI Generated Content Disclaimer

Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.

This deck is Linux Puliya, a foundational introduction to Linux for security professionals, presented at a Null Meet Bangalore Puliya session in 2016. The deck lists the presenter as an Information Security Consultant with Admin, Dev and Security background across null, OWASP and G4H. It covers understanding *nix systems, filesystem basics, I/O, essential commands, how to exit VIM, shell script basics, and automation through crontab and SSH configuration, with hands-on scripting exercises throughout.

Summary

The deck opens with the coverage list: understanding *nix, file system basics, understanding I/O, basic commands, how to exit VIM, shell script basics, and automation. It frames *nix as a family of operating systems ranging from Unix, Linux and the BSD variants such as FreeBSD and OpenBSD, which follow the same standards for file systems and directory layout. Linux is described as free as in free speech not free beer, and the slide notes that everyone can create their own distro, citing Hannah Montana Linux as the novelty example. The distributions slide splits families into Debian based systems using apt-get and dpkg and RedHat based systems using yum and rpm, and raises the LTS question.

File system basics establish that everything is a file, then walk the standard layout with / as the highest level, /etc for all configuration, and /home for user folders. File system types compare ext2 (maximum file size 16 GB to 2 TB, file system size 2 TB to 32 TB), ext3 (journaling from Linux Kernel 2.4.15) and ext4 (from Linux Kernel 2.6.19, maximum file size up to 16 TB, file system size up to 1 EB, with the slide spelling out 1 EB = 1024 PB and 1 PB = 1024 TB). The permissions slide shows the standard -rwxrwxrwx pattern alongside SUID (-rwsrwxrwx), SGID (-rwxrwsrwx) and sticky bit (-rwxrwxrwt) variants, noting the first bit can be l, c, b, d or -. The sudo section states that id 0 is omnipotent and that it is suggested not to use root access directly, then asks how high privilege actions should be performed. Standard I/O covers input (<), output (>) and error (2>) redirection.

The command sections list ls, cd, mkdir, cut, grep, sed, sort, uniq, xargs, find, tr, ps, screen, netstat -lntp and file, followed by tricks such as python -m SimpleHTTPServer Port, !!, cd ~, cd -, mtr, mount and format, and setting environment variables. Editors covered are Vim, Nano and EMACS. Software installation maps each ecosystem to its tool: apt-get install on Debian, yum install on RedHat, pip install for Python, gem install for Ruby and npm install for Node.js. The crontab slide lays out the six field automation format (minute, hour, day of month, month, day of week, year, with year ranging 1900-3000 and day of week 1-7 with 1 standing for Monday). Service configuration focuses on SSH through /etc/ssh/sshd_config, contrasting password and SSH key authentication and showing key login setup via ~/.ssh/authorized_keys. Shell script basics cover the shebang, positional parameters ($1 $2, $* $@ $0), read, echo, cat, conditions, loops and brace expansion, and the custom script exercises ask attendees to calculate simple interest, check whether a number is even or odd, and print prime numbers from 1 to 5000. The deck closes on command overloading with alias, when alias works and when it does not, and overriding commands by adding a directory to the front of PATH, then an example, questions and thanks.

Key Themes

  • *Understanding nix Systems: The Unix family spans Unix, Linux and BSD variants (FreeBSD, OpenBSD and others) that share common standards for filesystem layout and directory structure.
  • Linux Distributions: Anyone can create a distro, from serious enterprise builds to Hannah Montana Linux; the deck splits Debian based (apt-get/dpkg) from RedHat based (yum/rpm) families and raises the LTS versus rolling release choice.
  • Filesystem Basics and Types: The everything is a file principle, the standard layout rooted at / with /etc for configuration and /home for users, and ext2, ext3 (journaling, kernel 2.4.15) and ext4 (kernel 2.6.19, files to 16 TB, filesystems to 1 EB).
  • File Permissions and Special Bits: Standard -rwxrwxrwx notation plus SUID, SGID and sticky bit variants, with the first character indicating type (l, c, b, d or -); critical for understanding privilege escalation in assessments.
  • Sudo and Privilege Management: UID 0 is omnipotent, best practice avoids using root directly, and sudo provides auditable elevated operations.
  • Standard I/O Redirection: Input (<), output (>) and error (2>) redirection as essentials for scripting and log management.
  • Essential Commands and Editors: Navigation (ls, cd, mkdir), text processing (cut, grep, sed, sort, uniq), batch operations (xargs, find), tr, ps, screen, netstat -lntp and file, plus Vim, Nano and Emacs and the classic exit-Vim problem.
  • Software Installation and Useful Tricks: apt-get, yum, pip, gem and npm install per ecosystem; quick HTTP server with python -m SimpleHTTPServer, !! repetition, cd ~ and cd -, mtr diagnostics, mount and format, environment variables.
  • Crontab and SSH Configuration: Six field crontab scheduling for automating periodic tasks, SSH configuration via /etc/ssh/sshd_config, and key based authentication through ~/.ssh/authorized_keys over passwords.
  • Shell Scripting and Command Overloading: Shebang, positional parameters, read, echo, cat, conditions, loops and brace expansion, with alias customization and PATH based overloading as the two overloading routes.

Notable Points

  1. ext3 journaling arrived in Linux Kernel 2.4.15; ext4 starts from Linux Kernel 2.6.19 with maximum file size 16 GB to 16 TB and file system size up to 1 EB (1 EB = 1024 PB, 1 PB = 1024 TB).
  2. Special permission bits shown as SUID (-rwsrwxrwx), SGID (-rwxrwsrwx) and sticky bit (-rwxrwxrwt); the first character can be l (symlink), c (character device), b (block device), d (directory) or - (regular file).
  3. SUID/SGID bits are common privilege escalation vectors, making permission understanding directly relevant to penetration testing engagements.
  4. The core text processing pipeline (grep, sed, sort, uniq, cut, xargs) forms the backbone of log analysis, data extraction and security scripting.
  5. SSH configuration lives at /etc/ssh/sshd_config; key based login is set up through ~/.ssh/authorized_keys and eliminates brute force password attacks as a baseline practice.
  6. Crontab uses a six field format (minute, hour, day of month, month, day of week, year) with year range 1900-3000 and day of week 1-7 where 1 stands for Monday.
  7. Scripting exercises: calculate simple interest, check whether a number is even or odd, and print prime numbers from 1 to 5000.
  8. Quick tricks include python -m SimpleHTTPServer Port for an instant web server, !! to repeat the last command, cd ~ and cd - navigation, mtr for network diagnostics, and netstat -lntp for auditing open ports and listening services.
  9. Package installation maps per ecosystem: apt-get install (Debian), yum install (RedHat), pip install (Python), gem install (Ruby), npm install (Node.js).
  10. Command overloading works either through alias or by finding the command location and prepending that directory to PATH before everything else.
  11. Privileged operations should go through sudo rather than root login, since id 0 is omnipotent.

Notable Quotes

“Free as in free speech not free beer”

“Everyone can create there own Distro”

“Everything is a file”

“id 0 is omnipotent”

“How to Exit VIM”

Resources

Embed This Presentation

See Also