Deofuscation vbs (cscript.exe)

htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

악성 VBS 파일을 디버그/해독하는 데 유용할 수 있는 몇 가지 사항:

echo

Wscript.Echo "Like this?"

코멘트

' this is a comment

테스트

cscript.exe file.vbs

파일에 데이터 작성하기

To write data to a file in Python, you can use the write() method of the file object. Here is an example:

# 파일 열기
file = open("filename.txt", "w")

# 데이터 작성
file.write("Hello, World!")

# 파일 닫기
file.close()

위의 예시에서는 Python의 파일 객체의 write() 메서드를 사용하여 파일에 데이터를 작성합니다.

# 파일 열기
file = open("filename.txt", "w")

# 데이터 작성
file.write("안녕하세요, 세상!")

# 파일 닫기
file.close()

In this example, we open the file named "filename.txt" in write mode ("w"), write the string "Hello, World!" to the file, and then close the file.

위의 예시에서는 "filename.txt"라는 파일을 쓰기 모드("w")로 열고, 문자열 "안녕하세요, 세상!"을 파일에 작성한 후 파일을 닫습니다.

Function writeBinary(strBinary, strPath)

Dim oFSO: Set oFSO = CreateObject("Scripting.FileSystemObject")

' below lines purpose: checks that write access is possible!
Dim oTxtStream

On Error Resume Next
Set oTxtStream = oFSO.createTextFile(strPath)

If Err.number <> 0 Then MsgBox(Err.message) : Exit Function
On Error GoTo 0

Set oTxtStream = Nothing
' end check of write access

With oFSO.createTextFile(strPath)
.Write(strBinary)
.Close
End With

End Function
htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

Last updated