Lab Notes: November 20, 2025

Overview

Focused study and hands-on practice across Linux service management, PostgreSQL behavior, Nmap scanning techniques, Vim search-and-replace, shell one-liners, echo flags, sudo flags, ports, and lab workflow. Continued refining command mastery and strengthening fundamentals required for eJPTv2 and red team progression.

Linux & Systemctl

  • Reviewed how systemctl controls system services.
  • Clarified that systemctl manages all services the system knows about.
  • Example:
    systemctl status postgresql
    systemctl start postgresql
    

PostgreSQL Notes

  • PostgreSQL does not start by default on many Linux distributions.
  • Requires user account and password.
  • Name derived from POST InGRES + Query Language.

Sudo -u Flag

  • sudo -u runs a command as another user.
  • Example:
    sudo -u postgres psql
    

Nmap Technique Review

-sV

Service and version detection.

-p-

Scans all 65535 ports.

Combining Scans

Cannot merge SYN + UDP + A into one shorthand.

Example:

nmap -sS -sU -sV -p- <target>

Port Behavior

  • 49178: ephemeral
  • 4444: common Meterpreter listener

Vim Search and Replace

:%s/19/20/g

Shell: Multiple Lines with Echo

echo -e "1.1.1.1\n2.2.2.2\n3.3.3.3\n4.4.4.4\n5.5.5.5" > target.txt

Commands Practiced

systemctl status postgresql
systemctl start postgresql
sudo -u postgres psql
nmap -sV -sS -p- <target>
vim :%s/19/20/g
echo -e "line1\nline2" > file

Reflection

Clear improvement in fundamentals for eJPT path.