목록LINUX 기초 (9)
사자자리
[level5@ftz level5]$ ls -al total 80 drwxr-xr-x 4 root level5 4096 May 7 2002 . drwxr-xr-x 34 root root 4096 Sep 10 2011 .. -rw------- 1 root root 1 Jan 15 2010 .bash_history -rw-r--r-- 1 root root 24 Feb 24 2002 .bash_logout -rw-r--r-- 1 root root 224 Feb 24 2002 .bash_profile -rw-r--r-- 1 root root 151 Feb 24 2002 .bashrc -rw-r--r-- 1 root root 400 Sep 24 2000 .cshrc -rw-r--r-- 1 root root 474..
[level4@ftz level4]$ ls -al total 80 drwxr-xr-x 4 root level4 4096 May 7 2002 . drwxr-xr-x 34 root root 4096 Sep 10 2011 .. -rw------- 1 root root 1 Jan 15 2010 .bash_history -rw-r--r-- 1 root root 24 Feb 24 2002 .bash_logout -rw-r--r-- 1 root root 224 Feb 24 2002 .bash_profile -rw-r--r-- 1 root root 151 Feb 24 2002 .bashrc -rw-r--r-- 1 root root 400 Sep 24 2000 .cshrc -rw-r--r-- 1 root root 474..
[level3@ftz level3]$ ls -al total 80 drwxr-xr-x 4 root level3 4096 May 7 2002 . drwxr-xr-x 34 root root 4096 Sep 10 2011 .. -rw------- 1 root root 1 Jan 15 2010 .bash_history -rw-r--r-- 1 root root 24 Feb 24 2002 .bash_logout -rw-r--r-- 1 root root 224 Feb 24 2002 .bash_profile -rw-r--r-- 1 root root 151 Feb 24 2002 .bashrc -rw-r--r-- 1 root root 400 Sep 24 2000 .cshrc -rw-r--r-- 1 root root 474..
해커스쿨 https://www.hackerschool.org/Sub_Html/HS_FTZ/html/ftz_menual.html [level1@ftz level1]$ ls -al total 88 drwxr-xr-x 4 root level1 4096 Jan 16 2009 . drwxr-xr-x 34 root root 4096 Sep 10 2011 .. -rw------- 1 root root 1 Jan 15 2010 .bash_history -rw-r--r-- 1 root root 24 Feb 24 2002 .bash_logout -rw-rw-r-- 1 root root 224 Feb 24 2002 .bash_profile -rw-r--r-x 1 root root 151 Feb 24 2002 .bashrc ..

| - 파이프(pipe) - Shift + \(백슬래시) - 명령어를 연계해서 사용할 수 있다. - 앞 부분 명령어의 결과를 대상으로 뒷 부분 명령어를 이어서 수행한다. https://overthewire.org/wargames/bandit/bandit6.html 다음 레벨의 비밀번호: inhere directory에 위치한, ① human-readable ② 1033 bytes in size ③ not executable한 속성들을 모두 가진 파일에 저장되어 있다. inhere 디렉토리 안에 너무 많은 디렉토리들이 있다. find - 파일 및 디렉토리를 검색할 때 사용하는 명령어. - 리눅스 파일 시스템의 구조가 복잡한 만큼, 다양한 옵션과 표현이 존재한다. find 명령을 통해 사이즈가 1033바이트..

https://overthewire.org/wargames/bandit/bandit0.html Level Goal: SSH를 이용하여 게임에 로그인 한다. Host: bandit.labs.overthewire.org Port: 2220 Username: bandit0 Password: bandit0 PuTTy에서 Host Name에 bandit.labs.overthewire.org, Port에 2220, Connection type에 SSH을 설정하고 Open했다. login as에 bandit0, password에 bandit0을 입력해서 로그인했다. 이 machine은 여러 wargames를 가지고 있다. 만약 "somegame"을 플레이하고 있다면, usernames는 "somegame0", "so..

cat 파일이름 - 파일의 내용을 출력하는 명령 ex) cat /etc/passwd *패스워드 파일(passwd): 한 서버를 사용하는 사용자들의 모든 정보를 기록해 놓은 파일 위의 문자열들은 ":"에 의해 7개의 필드로 나뉘어 있다. 1번 필드 서버에 로그인할 때 사용되는 아이디(계정) 2번 필드 패스워드가 적혀있던 부분. 리눅스 이전 버전에서는 암호화된 문자열이 나타났으나, 해커들이 문자열 해독을 계속 만들어냈다. 따라서 리눅스 프로그래머들은 리눅스 6.0 이후부터 두 번째 필드에는 x라는 문자만 보여주고, 사용자들의 패스워드는 /etc/shadow라는, 관리자 권한을 가진 사람만 열 수 있는 파일에 모았다. 3번 필드 사용자는 로그인을 할 때 아이디를 사용하지만 컴퓨터는 숫자를 선호하기 때문에, 우..

해커스쿨 https://www.hackerschool.org/Sub_Html/HS_FTZ/html/ftz_menual.html PuTTy를 열어 로그인 trainer1 프롬프트 - 리눅스 서버에 성공적으로 로그인을 하게 되었다는 것을 의미 - 항상 대기상태에서 우리가 어떤 명령을 내리기만을 기다린다. *리눅스에서는 폴더(folder)보다 디렉토리(directory)라는 단어를 더 많이 사용하며, 이 둘의 의미는 같다. *리눅스는 대소문자를 확실히 구분한다. LS, Ls, ls는 서로 다르다. ls - 현재 위치를 기준으로 컴퓨터에 설치된 디렉토리와 파일을 보여주는 명령 ls -l - 위의 결과는 어떤 것이 디렉토리이고 어떤 것이 파일인지 알려주지 않는다. - ls 명령에 -l 옵션을 추가하면 디렉토리와 ..