
Microsoft Remote Desktop Web Access (RDWA) 애플리케이션에서 정보를 추출하는 파이썬 스크립트

Microsoft Remote Desktop Web Access (RDWA) 애플리케이션에서 정보 추출, 스프레이 및 무차별 대입 비밀번호 공격을 수행하는 올인원 파이썬 도구입니다.
이 파이썬 도구는 Microsoft Remote Desktop Web Access (RDWA) 애플리케이션에서 원격 서버의 FQDN, (FQDN으로부터 추출한) 내부 AD 도메인 이름, 원격 Windows Server 버전 등 다양한 정보를 추출할 수 있습니다.
$ rdwatool -h
____ ____ _ _____ __ __
/ __ \/ __ \ | / / | / /_____ ____ / /
/ /_/ / / / / | /| / / /| |/ __/ __ \/ __ \/ / @podalirius_
/ _, _/ /_/ /| |/ |/ / ___ / /_/ /_/ / /_/ / /
/_/ |_/_____/ |__/|__/_/ |_\__/\____/\____/_/ v2.0
usage: rdwatool recon [-h] [-tf TARGETS_FILE] [-tu TARGET_URLS] [-v] [--no-colors] [--debug] [-T THREADS] [-PI PROXY_IP] [-PP PROXY_PORT] [-rt REQUEST_TIMEOUT] [-k] [-L] [--export-xlsx EXPORT_XLSX] [--export-json EXPORT_JSON]
[--export-sqlite EXPORT_SQLITE]
options:
-h, --help show this help message and exit
-v, --verbose Verbose mode. (default: False)
--no-colors Disable colored output. (default: False)
--debug Debug mode, for huge verbosity. (default: False)
-T THREADS, --threads THREADS
Number of threads (default: 250)
Targets:
-tf TARGETS_FILE, --targets-file TARGETS_FILE
Path to file containing a line by line list of targets.
-tu TARGET_URLS, --target-url TARGET_URLS
Target URL of the RDWA login page.
Advanced configuration:
-PI PROXY_IP, --proxy-ip PROXY_IP
Proxy IP.
-PP PROXY_PORT, --proxy-port PROXY_PORT
Proxy port
-rt REQUEST_TIMEOUT, --request-timeout REQUEST_TIMEOUT
Set the timeout of HTTP requests.
-k, --insecure Allow insecure server connections when using SSL (default: False)
-L, --location Follow redirects (default: False)
Export results:
--export-xlsx EXPORT_XLSX
Output XLSX file to store the results in.
--export-json EXPORT_JSON
Output JSON file to store the results in.
--export-sqlite EXPORT_SQLITE
Output SQLITE3 file to store the results in.
recon 모드:
rdwatool recon -tf ./subdomains.txt

spray 모드:
rdwatool spray -tu https://rds.podalirius.net/RDWeb/Pages/en-US/login.aspx
brute 모드:
rdwatool brute -tu https://rds.podalirius.net/RDWeb/Pages/en-US/login.aspx
Pull Request는 언제나 환영합니다. 다른 기능을 추가하고 싶다면 이슈를 열어주세요.
Remote Desktop Web Access (RDWA) 애플리케이션의 login.aspx 페이지에는 미리 채워진 정보가 많이 있습니다. WorkSpaceID 및/또는 RedirectorName 입력 필드에서 원격 서버의 FQDN을 찾을 수 있으며, WorkspaceFriendlyName에는 작업 공간에 대한 텍스트 설명이 포함될 수 있습니다.
<form id="FrmLogin" name="FrmLogin" action="login.aspx?ReturnUrl=%2FRDWeb%2FPages%2Fen-US%2FDefault.aspx" method="post" onsubmit="return onLoginFormSubmit()">
<input type="hidden" name="WorkSpaceID" value="DC01.lab.local"/>
<input type="hidden" name="RDPCertificates" value="E7100C72B6C11A5D14DE115D801E100C79143C19"/>
<input type="hidden" name="PublicModeTimeout" value="20"/>
<input type="hidden" name="PrivateModeTimeout" value="240"/>
<input type="hidden" name="WorkspaceFriendlyName" value="Workspace%20friendly%20name%20or%20description"/>
<input type="hidden" name="EventLogUploadAddress" value=""/>
<input type="hidden" name="RedirectorName" value="DC01.lab.local"/>
<input type="hidden" name="ClaimsHint" value=""/>
<input type="hidden" name="ClaimsToken" value=""/>
<input name="isUtf8" type="hidden" value="1"/>
<input type="hidden" name="flags" value="0"/>
...
</form>
rdwatool 도구는 이 폼을 자동으로 파싱하여 모든 정보를 추출합니다.
원격 RDWeb 설치가 강화(hardened)되지 않은 경우, 기본 버전 이미지 파일 /RDWeb/Pages/images/WS_h_c.png가 (로그인 페이지에서 링크되어 있지 않더라도) 여전히 접근 가능할 가능성이 높습니다. 이는 매우 유용한데, 이 파일의 sha256 해시 값을 이 서비스의 Windows 배너에 대한 알려진 테이블과 직접 비교할 수 있기 때문입니다:
rdwatool 도구는 이 파일을 자동으로 가져와 해시를 비교하여 원격 Windows Server 버전을 알아냅니다.
| Windows OS | SHA256 hash | Banner |
|---|
| Windows Server 2008 R2 | 5a8a77dc7ffd463647987c0de6df2c870f42819ec03bbd02a3ea9601e2ed8a4b | ![]() |
| Windows Server 2012 R2 | 4560591682d433c7fa190c6bf40827110e219929932dc6dc049697529c8a98bc | ![]() |
| Windows Server 2012 R2 | 3d9b56811a5126a6d3b78a692c2278d588d495ee215173f752ce4cbf8102921c | ![]() |
| Windows Server 2016 | fb1505aadeab42d82100c4d23d421f421c858feae98332c55a4b9595f4cea541 | ![]() |
| Windows Server 2016 | 3dbbeff5a0def7e0ba8ea383e5059eaa6acc37f7f8857218d44274fc029cfc4b | ![]() |
| Windows Server 2019 | 2da4eb15fda2b7c80a94b9b2c5a3e104e2a9a2d9e9b3a222f5526c748fadf792 | ![]() |
| Windows Server 2022 | 256a6445e032875e611457374f08acb0565796c950eb9c254495d559600c0367 | ![]() |