This shows you the differences between two versions of the page.
uso:laboratoare:new:01-fs:basics [2019/10/02 17:43] mbarbulescu |
uso:laboratoare:new:01-fs:basics [2019/10/02 23:04] (current) liza_elena.babu |
||
---|---|---|---|
Line 3: | Line 3: | ||
Pentru a începe acest tutorial trebuie să vă asigurați că sunteți în | Pentru a începe acest tutorial trebuie să vă asigurați că sunteți în | ||
directorul potrivit. | directorul potrivit. | ||
- | Rulați comanda ''cd ~/uso.git/labs/01-fs/support/basics/''. | + | Rulați comanda ''cd ~/uso-lab/01-fs/support/basics/''. |
==== Navigarea printr-o ierarhie de directoare ==== | ==== Navigarea printr-o ierarhie de directoare ==== | ||
Line 24: | Line 24: | ||
. | . | ||
├── grotesque | ├── grotesque | ||
- | │ ├── asg | + | │ ├── asg |
- | │ ├── coin2 | + | │ ├── coin2 |
- | │ └── do you dare | + | │ └── do you dare |
- | │ ├── ascii | + | │ ├── ascii |
- | │ ├── dos4fun | + | │ ├── dos4fun |
- | │ ├── elf | + | │ ├── elf |
- | │ ├── hunter | + | │ ├── hunter |
- | │ ├── hunting | + | │ ├── hunting |
- | │ ├── mipstake | + | │ ├── mipstake |
- | │ └── rootkit | + | │ └── rootkit |
├── hacker-s secret | ├── hacker-s secret | ||
- | │ ├── hard | + | │ ├── hard |
- | │ │ ├── malware | + | │ │ ├── malware |
- | │ │ └── pwnsandbox | + | │ │ └── pwnsandbox |
- | │ ├── medium | + | │ ├── medium |
- | │ │ ├── softmmu | + | │ │ ├── softmmu |
- | │ │ └── tiney | + | │ │ └── tiney |
- | │ └── really hard | + | │ └── really hard |
- | │ ├── exploitable | + | │ ├── exploitable |
- | │ └── nuclear | + | │ └── nuclear |
├── rookiss | ├── rookiss | ||
- | │ ├── ascii easy.pdf | + | │ ├── ascii easy.pdf |
- | │ ├── brain fuck | + | │ ├── brain fuck |
- | │ ├── echo2 | + | │ ├── echo2 |
- | │ ├── fix.pdf | + | │ ├── fix.pdf |
- | │ ├── loveletter | + | │ ├── loveletter |
- | │ ├── otp.pdf | + | │ ├── otp.pdf |
- | │ └── syscall | + | │ └── syscall |
└── toddler-s bottle | └── toddler-s bottle | ||
├── bof | ├── bof | ||
- | │ ├── easy | + | │ ├── easy |
- | │ │ ├── bof-bof-bof | + | │ │ ├── bof-bof-bof |
- | │ │ ├── bof1.txt | + | │ │ ├── bof1.txt |
- | │ │ ├── bof2.txt | + | │ │ ├── bof2.txt |
- | │ │ ├── bof3.txt | + | │ │ ├── bof3.txt |
- | │ │ ├── bof4.txt | + | │ │ ├── bof4.txt |
- | │ │ ├── bof5.txt | + | │ │ ├── bof5.txt |
- | │ │ ├── can-you-bof | + | │ │ ├── can-you-bof |
- | │ │ └── random-bof.txt | + | │ │ └── random-bof.txt |
- | │ ├── hard | + | │ ├── hard |
- | │ │ └── I bet you can-t | + | │ │ └── I bet you can-t |
- | │ └── medium | + | │ └── medium |
- | │ └── getting-serious-here | + | │ └── getting-serious-here |
├── collision | ├── collision | ||
├── fd | ├── fd | ||
Line 72: | Line 72: | ||
├── input | ├── input | ||
├── passcode | ├── passcode | ||
- | │ ├── passcode1 | + | │ ├── passcode1 |
- | │ ├── passcode2 | + | │ ├── passcode2 |
- | │ └── random-org | + | │ └── random-org |
└── random | └── random | ||
Line 86: | Line 86: | ||
<code bash> | <code bash> | ||
student@uso:~/.../01-fs/support/basics$ pwd | student@uso:~/.../01-fs/support/basics$ pwd | ||
- | /home/student/uso.git/labs/01-fs/support/basics | + | /home/student/uso-lab/01-fs/support/basics |
student@uso:~/.../01-fs/support/basics$ ls | student@uso:~/.../01-fs/support/basics$ ls | ||
grotesque 'hacker-s secret' rookiss 'toddler-s bottle' | grotesque 'hacker-s secret' rookiss 'toddler-s bottle' | ||
Line 98: | Line 98: | ||
<code bash> | <code bash> | ||
student@uso:~/.../01-fs/support/basics$ pwd | student@uso:~/.../01-fs/support/basics$ pwd | ||
- | /home/student/uso.git/labs/01-fs/support/basics | + | /home/student/uso-lab/01-fs/support/basics |
student@uso:~/.../01-fs/support/basics$ cd .. | student@uso:~/.../01-fs/support/basics$ cd .. | ||
- | student@uso:~/uso.git/labs/01-fs/support$ pwd | + | student@uso:~/uso-lab/01-fs/support$ pwd |
- | /home/student/uso.git/labs/01-fs/support | + | /home/student/uso-lab/01-fs/support |
</code> | </code> | ||
Line 110: | Line 110: | ||
<code bash> | <code bash> | ||
- | student@uso:~/uso.git/labs/01-fs/support$ cd ~/uso.git/labs/01-fs/support/basics/ | + | student@uso:~/uso-lab/01-fs/support$ cd ~/uso-lab/01-fs/support/basics/ |
student@uso:~/.../01-fs/support/basics$ tree . | student@uso:~/.../01-fs/support/basics$ tree . | ||
. | . | ||
├── grotesque | ├── grotesque | ||
- | │ ├── asg | + | │ ├── asg |
- | │ ├── coin2 | + | │ ├── coin2 |
- | │ └── do you dare | + | │ └── do you dare |
- | │ ├── ascii | + | │ ├── ascii |
- | │ ├── dos4fun | + | │ ├── dos4fun |
- | │ ├── elf | + | │ ├── elf |
- | │ ├── hunter | + | │ ├── hunter |
- | │ ├── hunting | + | │ ├── hunting |
- | │ ├── mipstake | + | │ ├── mipstake |
- | │ └── rootkit | + | │ └── rootkit |
├── hacker-s secret | ├── hacker-s secret | ||
- | │ ├── hard | + | │ ├── hard |
- | │ │ ├── malware | + | │ │ ├── malware |
- | │ │ └── pwnsandbox | + | │ │ └── pwnsandbox |
- | │ ├── medium | + | │ ├── medium |
- | │ │ ├── softmmu | + | │ │ ├── softmmu |
- | │ │ └── tiney | + | │ │ └── tiney |
- | │ └── really hard | + | │ └── really hard |
- | │ ├── exploitable | + | │ ├── exploitable |
- | │ └── nuclear | + | │ └── nuclear |
├── rookiss | ├── rookiss | ||
- | │ ├── ascii easy.pdf | + | │ ├── ascii easy.pdf |
- | │ ├── brain fuck | + | │ ├── brain fuck |
- | │ ├── echo2 | + | │ ├── echo2 |
- | │ ├── fix.pdf | + | │ ├── fix.pdf |
- | │ ├── loveletter | + | │ ├── loveletter |
- | │ ├── otp.pdf | + | │ ├── otp.pdf |
- | │ └── syscall | + | │ └── syscall |
└── toddler-s bottle | └── toddler-s bottle | ||
├── bof | ├── bof | ||
- | │ ├── easy | + | │ ├── easy |
- | │ │ ├── bof-bof-bof | + | │ │ ├── bof-bof-bof |
- | │ │ ├── bof1.txt | + | │ │ ├── bof1.txt |
- | │ │ ├── bof2.txt | + | │ │ ├── bof2.txt |
- | │ │ ├── bof3.txt | + | │ │ ├── bof3.txt |
- | │ │ ├── bof4.txt | + | │ │ ├── bof4.txt |
- | │ │ ├── bof5.txt | + | │ │ ├── bof5.txt |
- | │ │ ├── can-you-bof | + | │ │ ├── can-you-bof |
- | │ │ └── random-bof.txt | + | │ │ └── random-bof.txt |
- | │ ├── hard | + | │ ├── hard |
- | │ │ └── I bet you can-t | + | │ │ └── I bet you can-t |
- | │ └── medium | + | │ └── medium |
- | │ └── getting-serious-here | + | │ └── getting-serious-here |
├── collision | ├── collision | ||
├── fd | ├── fd | ||
Line 162: | Line 162: | ||
├── input | ├── input | ||
├── passcode | ├── passcode | ||
- | │ ├── passcode1 | + | │ ├── passcode1 |
- | │ ├── passcode2 | + | │ ├── passcode2 |
- | │ └── random-org | + | │ └── random-org |
└── random | └── random | ||
Line 170: | Line 170: | ||
student@uso:~/.../01-fs/support/basics$ cd grotesque/do<TAB> | student@uso:~/.../01-fs/support/basics$ cd grotesque/do<TAB> | ||
student@uso:~/.../basics/grotesque/do you dare$ pwd | student@uso:~/.../basics/grotesque/do you dare$ pwd | ||
- | /home/student/uso.git/labs/01-fs/support/basics/grotesque/do you dare | + | /home/student/uso-lab/01-fs/support/basics/grotesque/do you dare |
</code> | </code> | ||
Line 180: | Line 180: | ||
<code bash> | <code bash> | ||
student@uso:~/.../basics/grotesque/do you dare$ pwd | student@uso:~/.../basics/grotesque/do you dare$ pwd | ||
- | /home/student/uso.git/labs/01-fs/support/basics/grotesque/do you dare | + | /home/student/uso-lab/01-fs/support/basics/grotesque/do you dare |
student@uso:~/.../basics/grotesque/do you dare$ cd ../../rookiss | student@uso:~/.../basics/grotesque/do you dare$ cd ../../rookiss | ||
student@uso:~/.../support/basics/rookiss$ pwd | student@uso:~/.../support/basics/rookiss$ pwd | ||
- | /home/student/uso.git/labs/01-fs/support/basics/rookiss | + | /home/student/uso-lab/01-fs/support/basics/rookiss |
</code> | </code> | ||
Line 211: | Line 211: | ||
parcurgeți următoarele exerciții după care verificați cu asistentul | parcurgeți următoarele exerciții după care verificați cu asistentul | ||
că totul este în regulă. | că totul este în regulă. | ||
- | |||
- | <note warning>Inainte de a face aceste exerciții mutați-vă înapoi în ''~/uso.git/labs/01-fs/support/basic'': | ||
- | |||
- | <code bash> | ||
- | student@uso:~$ cd ~/uso.git/labs/01-fs/support/basic | ||
- | </code> | ||
- | |||
- | </note> | ||
- Plasați-vă în directorul ''hacker-s\ secret/medium''. | - Plasați-vă în directorul ''hacker-s\ secret/medium''. | ||
Line 229: | Line 221: | ||
==== Listarea fișierelor dintr-un director ==== | ==== Listarea fișierelor dintr-un director ==== | ||
- | Plasați-vă din nou în directorul ''/uso.git/labs/01-fs/support/basics''. | + | Plasați-vă din nou în directorul ''/uso-lab/01-fs/support/basics''. |
După cum am observat mai sus, listarea conținutului unui director se poate face folosind comanda ''ls''. Această formă de utilizator nu ne prezintă foarte multe informații despre fișierele din directorul inspectat (dimensiune, drepturi, tip, etc.). Folosind argumentul ''-l'' al lui ''ls'' putem lista conținutul unui director în format lung. | După cum am observat mai sus, listarea conținutului unui director se poate face folosind comanda ''ls''. Această formă de utilizator nu ne prezintă foarte multe informații despre fișierele din directorul inspectat (dimensiune, drepturi, tip, etc.). Folosind argumentul ''-l'' al lui ''ls'' putem lista conținutul unui director în format lung. | ||
Line 265: | Line 257: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../basics/hacker-s secret/really hard$ cd ~/uso.git/labs/01-fs/support/basics | + | student@uso:~/.../basics/hacker-s secret/really hard$ cd ~/uso-lab/01-fs/support/basics |
student@uso:~/.../01-fs/support/basics$ cd rookiss | student@uso:~/.../01-fs/support/basics$ cd rookiss | ||
student@uso:~/.../support/basics/rookis$ pwd | student@uso:~/.../support/basics/rookis$ pwd | ||
- | /home/student/uso.git/labs/01-fs/support/basics/rookiss | + | /home/student/uso-lab/01-fs/support/basics/rookiss |
student@uso:~/.../support/basics/rookis$ ls *.pdf | student@uso:~/.../support/basics/rookis$ ls *.pdf | ||
'ascii easy.pdf' fix.pdf otp.pdf | 'ascii easy.pdf' fix.pdf otp.pdf | ||
Line 288: | Line 280: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../basics/toddler-s bottle/passcode$ cd ~/uso.git/labs/01-fs/support/basics | + | student@uso:~/.../basics/toddler-s bottle/passcode$ cd ~/uso-lab/01-fs/support/basics |
student@uso:~/.../01-fs/support/basics$ ls | student@uso:~/.../01-fs/support/basics$ ls | ||
grotesque 'hacker-s secret' rookiss 'toddler-s bottle' | grotesque 'hacker-s secret' rookiss 'toddler-s bottle' | ||
Line 335: | Line 327: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../basics/toddler-s bottle/third weird directory$ cd ~/uso.git/labs/01-fs/support/basics/toddler-s\ bottle | + | student@uso:~/.../basics/toddler-s bottle/third weird directory$ cd ~/uso-lab/01-fs/support/basics/toddler-s\ bottle |
student@uso:~/.../support/basics/toddler-s bottle$ ls | student@uso:~/.../support/basics/toddler-s bottle$ ls | ||
bof fd input random | bof fd input random | ||
Line 348: | Line 340: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../support/basics/toddler-s bottle$ cd ~/uso.git/labs/01-fs/support/basics/toddler-s\ bottle | + | student@uso:~/.../support/basics/toddler-s bottle$ cd ~/uso-lab/01-fs/support/basics/toddler-s\ bottle |
student@uso:~/.../support/basics/toddler-s bottle$ ls ../grotesque/do\ you\ dare/ | student@uso:~/.../support/basics/toddler-s bottle$ ls ../grotesque/do\ you\ dare/ | ||
ascii dos4fun elf hunter hunting mipstake rootkit | ascii dos4fun elf hunter hunting mipstake rootkit | ||
Line 411: | Line 403: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../toddler-s bottle/bof/easy$ cd ~/uso.git/labs/01-fs/support/basics | + | student@uso:~/.../toddler-s bottle/bof/easy$ cd ~/uso-lab/01-fs/support/basics |
student@uso:~/.../01-fs/support/basics$ ls | student@uso:~/.../01-fs/support/basics$ ls | ||
bof1.txt bof4.txt 'hacker-s secret' 'toddler-s bottle' | bof1.txt bof4.txt 'hacker-s secret' 'toddler-s bottle' | ||
Line 443: | Line 435: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../01-fs/support/basics$ cd ~/uso.git/labs/01-fs/support/basics/grotesque | + | student@uso:~/.../01-fs/support/basics$ cd ~/uso-lab/01-fs/support/basics/grotesque |
coin2 'do you dare' elf hunter mistake | coin2 'do you dare' elf hunter mistake | ||
student@uso:~/.../support/basics/grotesque$ rm coin2 | student@uso:~/.../support/basics/grotesque$ rm coin2 | ||
Line 453: | Line 445: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../support/basics/grotesque$ cd ~/uso.git/labs/01-fs/support/basic/toddler-s\ bottle/bof/easy | + | student@uso:~/.../support/basics/grotesque$ cd ~/uso-lab/01-fs/support/basic/toddler-s\ bottle/bof/easy |
student@uso:~/.../toddler-s bottle/bof/easy$ ls | student@uso:~/.../toddler-s bottle/bof/easy$ ls | ||
bof-bof-bof can-you-bof random-bof.txt | bof-bof-bof can-you-bof random-bof.txt | ||
Line 462: | Line 454: | ||
- | Ne aflăm în directorul ''~/uso.git/labs/01-fs/support/basics/grotesque'' și vrem să ștergem un fișier dintr-un alt director fără a schimba directorul în care ne aflăm. Putem face acest lucru ușor dându-i comenzii ''rm'' calea către acel fișier (fie absolută, fie relativă). | + | Ne aflăm în directorul ''~/uso-lab/01-fs/support/basics/grotesque'' și vrem să ștergem un fișier dintr-un alt director fără a schimba directorul în care ne aflăm. Putem face acest lucru ușor dându-i comenzii ''rm'' calea către acel fișier (fie absolută, fie relativă). |
<code bash> | <code bash> | ||
Line 478: | Line 470: | ||
<code bash> | <code bash> | ||
- | student@uso:~/.../support/basics/grotesque$ cd ~/uso.git/labs/01-fs/support/basics | + | student@uso:~/.../support/basics/grotesque$ cd ~/uso-lab/01-fs/support/basics |
student@uso:~/.../01-fs/support/basics$ ls | student@uso:~/.../01-fs/support/basics$ ls | ||
bof1.txt bof5.txt 'my new rookiss' 'weird directory again' | bof1.txt bof5.txt 'my new rookiss' 'weird directory again' | ||
Line 505: | Line 497: | ||
- Ștergeți toate fișierele cu extensia ''.txt'' din directorul ''toddler-s\ bottle/bof/easy''. | - Ștergeți toate fișierele cu extensia ''.txt'' din directorul ''toddler-s\ bottle/bof/easy''. | ||
- Folosind o singură comandă, ștergeți tot conținutul directorului ''basics''. | - Folosind o singură comandă, ștergeți tot conținutul directorului ''basics''. | ||
+ |