Docker

docker container docker engine docker on linux notes settings essential commands

Docker is where the heart is..

1. Update and install dependencies

sudo apt-get update

sudo apt-get install ca-certificates curl gnupg lsb-release

2. Set up the Docker repository

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

3. Install the docker engine

sudo apt update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

4. Install Docker Desktop

sudo apt-get install ./docker-desktop- - .deb

1. Installing

sudo apt install docker.io -y

2. Starting

sudo systemctl start docker

3. Enable docker on boot

sudo systemctl enable docker

4. Checking status

sudo systemctl status docker

sudo usermod -aG docker $USER
newgrp docker

Updating....

Updating....

Linux

Some Linux this fine day!

Location: /etc/default/console-setup

What to change:

FONTFACE="Terminus"
FONTSIZE="16x32"

Update after changed

sudo update-initramfs -u

sudo reboot

Set the username and hostname in green, the current working directory in blue, and resets the color at the end

PS1="\[\e[32m\]\u@\h\[\e[0m\]:\[\e[34m\]\w\[\e[0m\]\$ "

\e[: Start of an escape sequence.
[m: End of the color escape sequence.

Foreground Colors (30-37) Background Colors (40-47) Text Attributes

30: Black
31: Red
32: Green
33: Yellow
34: Blue
35: Magenta
36: Cyan
37: White

40: Black background
41: Red background
42: Green background
43: Yellow background
44: Blue background
45: Magenta background
46: Cyan background
47: White background

0: Reset all attributes (colors, bold, etc.)
1: Bold
4: Underline
7: Invert colors

1. Installing

sudo apt install apache2 -y

2. Starting

sudo systemctl start apache2

3. Enable apache2 on boot

sudo systemctl start apache2

Updating...

ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If

263JGJPfgU6LtdEvgfWU1XP5yac29mFx

MNk8KNH3Usiio41PRUEoDFPqfxLPlSmx

2WmrDFRmJIq3IPxneAaMGhap0pFhF3NJ

4oQYVPkxZOOEOO5pTW81FB8j8lxXGUQw

HWasnPhtq9AVKe0dmk45nxy20cvUa6EG

morbNTDkSW6jIlUc0ymOdMaLnOlFVAaj

dfwvzFQi4mU0wfNbFOe9RoWskMLg7eEc

4CKMh1JI91bUIZZPXDqGanal4xvAg0JM

cat data.txt | sort | uniq -u

sort pass.txt | uniq -u

FGUW5ilLVJrxX9kMYMmlN4MgbpfMiqey

strings data.txt | grep "="

dtR173fZKb0RRsDFSGsg2RWnpNVj3qRr

base64 -d data.txt

7x16WNeHIi5YkIhWsfFIqoognUTyj9Q4

cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m'

FO5dwFsc0cbaIiH0h8J2eUks2vdTDwAn

MU4VWeTyJk8ROof1qqmcBPaLh7lDCPvS

ssh -i sshkey.private bandit14@localhost

8xCjnmgoKbGLhHFAZlGE5Tmu4M2tKJQo

telnet localhost 30000

kSkvUpMQ7lBYyCM4GBPvCvT1BfWRy0Dx

openssl s_client -connect localhost:30001 -servername localhost

echo "kSkvUpMQ7lBYyCM4GBPvCvT1BfWRy0Dx" |openssl s_client -quiet -connect localhost:31790 -servername localhost

create a sshkey.private (given from previous level)

chmod 600 sshkey.private

ssh -i sshkey.private bandit17@localhost -p 2220

x2gLTTjFwMOhQ8oWNbMN362QKxfRqGlO

diff --color --normal passwords.old passwords.new

cGWpMaKXVwDUNgPAVJbWYuGHVn9zl3j8

ssh bandit18@bandit.labs.overthewire.org -p 2220 cat readme

0qXahG8ZjOVMN9Ghs7iOWsCfZyXOUbYO

./bandit20-do cat /etc/bandit_pass/bandit20

EeoULMCra2q0dSkYj561DX7s1CpBuOBt

ssh 2 times, one: nc -lp 49200 | two: ./suconnect 49200
then paste the password of level 20 to the terminal with nc

tRae0UfB9v0UzbCdn9cY0gQnds9GF58Q

cat cronjob_bandit22

cat the .sh file

0Zf11ioIjMVN551jX3CmStKLYqjk54Ga

echo I am user bandit23 | md5sum | cut -d ' ' -f 1

Contact

Get in touch, or swing by for a cup of coffee.

Updating....

About

Who we are and what we do.

Updating....