Wargame/bandit

Bandit Level 13 -> Level 14

핏디 2021. 5. 4. 17:06
SMALL

[문제]


[풀이]

> ls -al 명령어를 통해 sshkey.private 파일을 확인할 수 있다.

 

> cat 명령을 통해 RSA 키를 확인할 수 있다.

 

> ssh 의 i 옵션을 이용해 bandit13에 주어진 개인키를 이용해 bandit14에 접속할 수 있다.

> localhost 는 컴퓨터 네트워크에서 사용하는 루프백 호스트명으로 자신의 컴퓨터를 의미하며, 현재 ip 공간을 의미한다. (websecurity.tistory.com/98)

 

> /etc/bandit_pass/bandit14 파일을 확인하면 패스워드를 획득할 수 있다.


[핵심]

SSH/OpenSSH/Keys

Public an Private Keys

> 공개키 인증은 패스워드 인증보다 안전하다.

> 공개키와 개인키는 특별한 수학적 특성으로 아주 큰 숫자로 구성된다.

> 공개키는 로그인하려는 모든 컴퓨터의 ./ssh/authorized_keys 파일에 저장되어 있으며, 개인키는 로그인시 pc에 남는다.

> 로그인 할 때, SSH 서버는 공개키를 사용해 개인키로만 'unlocked' 할 수 있는 방식으로 메세지를 'lock' 한다.

- 이는 가장 자원이 풍부한 공격자일지라도 사용자의 세션을 스누핑이나 방해할 수 없다는 것을 의미한다.

> 추가적인 보안 수단으로, 대부분의 SSH 프로그램들은 개인키를 암호문으로 보호된 형식으로 저장한다. 

> 만약 사용자의 컴퓨터가 해킹당했을 경우, 해커가 암호문을 깨고 사용자의 키를 사용하기 시작하기 전에 사용자의 오래된 공개키를 사용하지 못하게 할 충분한 시간이 필요하다.

> 사용자가 하드디스크에서 개인키가 보호되지 않는다는 것을 꺼리지 않는다면, 사용자는 키를 사용하여 네트워크 백업의 일부로 보안 자동 로그인을 실시하도록 할 수 있다.

> 다른 SSH 프로그램들은 공개키들을 다른 방식을 사용하지만 비슷한 형태이다.

 

Key-Based SSH Logins

키 기반 인증은 일반 암호와 Kerberos 티켓과 같은 OpenSSH와 함께 사용할 수 있는 몇몇 인증 모드 중 가장 안전하다. 

키 기반 인증은 키 값이 일반 암호보다 무차별적인 공격, 추측하기 어렵다. 

SSH 는 RSA 또는 DSA 키로 사용한다. 그 둘은 SSH가 발명되었을 때 최첨단 알고리즘으로 선정되었지만, 현재 DSA는 덜 안전한 것으로 보인다. RSA는 개인키, 공개키 쌍을 이룬다.

To securely communicate using key-based authentication, one needs to create a key pair, securely store the private key on the computer one wants to log in from, and store the public key on the computer one wants to log in to.

 

키 생성에 대한 부분은 링크 참조

help.ubuntu.com/community/SSH/OpenSSH/Keys

 

OpenSSH

OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options.

The OpenSSH suite consists of the following tools:

 

 

 

 

 

 

 

 

 

 


[출처]

www.openssh.com/

 

OpenSSH

OpenSSH 8.6 released April 19, 2021 OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large suite of

www.openssh.com

experiences.tistory.com/33

 

ssh(secure shell) 옵션

** ssh(secure shell) 구문 및 명령줄 옵션 ssh [-a] [-c idea blowfish des 3des arcfour tss none] [-e escape_char] A [-I identity_file] [-l login_name] [-n] [-k] [-V] [=o option] [-p port] A [-q] [-P]..

experiences.tistory.com

 

 

 


 

LIST

'Wargame > bandit' 카테고리의 다른 글

Bandit level 15 -> level 16  (0) 2021.05.05
Bandit level 14 -> level 15  (0) 2021.05.04
Bandit Level 12 -> Level 13  (0) 2021.04.06
Bandit Level 11 -> Level 12  (0) 2021.04.04
Bandit Level 10 -> Level 11  (0) 2021.04.04