Sitemap

มาลองเล่น Burp MCP กัน! AI นี้จะช่วยหาช่องโหว่ได้จริงหรือ?

5 min readJun 13, 2025

สวัสดีครับวันนี้จะมาเล่าเกี่ยวกับ Burp MCP ว่าใช้งานยังไง เหมาะไหมที่จะนำมาช่วยทำงาน โดยจะแบ่งเป็นหัวข้อดังนี้

· MCP คืออะไร

· ขั้นตอนการติดตั้ง MCP

· Lab times

· ข้อควรระวัง

MCP คืออะไร

MCP เป็นโปรโตคอลแบบเปิดที่ทำให้การให้บริบทของแอปพลิเคชันต่าง ๆ กับ LLM เป็นมาตรฐาน คิดถึง MCP เหมือนกับพอร์ต USB-C สำหรับแอปพลิเคชัน AI เช่นเดียวกับที่ USB-C ให้วิธีมาตรฐานในการเชื่อมต่ออุปกรณ์ของคุณกับอุปกรณ์ต่อพ่วงและอุปกรณ์เสริมต่าง ๆ MCP ก็ให้วิธีมาตรฐานในการเชื่อมต่อโมเดล AI กับแหล่งข้อมูลและเครื่องมือต่าง ๆ

Architecture ของ MCP

โดยพื้นฐานแล้ว MCP ใช้สถาปัตยกรรมแบบไคลเอนต์-เซิร์ฟเวอร์ที่แอปพลิเคชันโฮสต์สามารถเชื่อมต่อกับเซิร์ฟเวอร์หลายตัว:

· MCP Hosts: โปรแกรมอย่าง Claude Desktop, IDE (Cursor ฯลฯ) หรือเครื่องมือ AI ที่ต้องการเข้าถึงข้อมูลผ่าน MCP แอปพลิเคชันเหล่านี้ให้อินเทอร์เฟซสำหรับผู้ใช้ในการโต้ตอบกับ LLM พร้อมทั้งผสานรวม MCP Client เพื่อเชื่อมต่อกับ MCP Server เพื่อขยายความสามารถของ LLM โดยใช้เครื่องมือที่ MCP Server ให้มา

· MCP Clients: MCP Client เป็นสะพานเชื่อมระหว่าง LLM และ MCP Server โดยจะฝังอยู่ใน LLM และรับผิดชอบ:

o รับคำขอจาก LLM

o ส่งต่อคำขอไปยัง MCP Server ที่เหมาะสม

o ส่งผลลัพธ์จาก MCP Server กลับไปยัง LLM

· MCP Server แต่ละตัวจะให้ชุดเครื่องมือเฉพาะที่รับผิดชอบในการดึงข้อมูลจากข้อมูลภายในเครื่องหรือบริการระยะไกล เมื่อ LLM ตัดสินใจว่าจำเป็นต้องใช้เครื่องมือใดเครื่องมือหนึ่งขณะประมวลผลงาน มันจะใช้เครื่องมือที่ MCP Server ให้มาเพื่อรับข้อมูลที่จำเป็นและส่งกลับไปยัง LLM

· Local Data Sources: ไฟล์, ฐานข้อมูล และบริการในคอมพิวเตอร์ของคุณที่เซิร์ฟเวอร์ MCP สามารถเข้าถึงได้อย่างปลอดภัย

· Remote Services: ระบบภายนอกที่พร้อมใช้งานผ่านอินเทอร์เน็ต (เช่น ผ่าน API) ที่เซิร์ฟเวอร์ MCP สามารถเชื่อมต่อได้

ขั้นตอนการติดตั้ง MCP

  1. ติดตั้ง MCP Server Extension ที่ Burp Suite

2.ติดตั้ง Claude Desktop

3. มาที่ MCP Extension ที่ Burp แล้วเลือก Enable จากนั้นกดที่ Install to Claude Desktop

6. ทำการ Restart Claude Desktop จากนั้นก็จะมี tools ขึ้นมาให้ใช้ แล้วก็เริ่ม prompt กันได้เลย

Lab times

ผู้เขียนได้ลองนำไปทดสอบด้วย Lab ของ Portswigger โดยเริ่มจากระบุช่องโหว่ก่อน จนไปถึงไม่บอกอะไรเลยให้ตัว Claude หาช่องโหว่เอง

Lab 1 SQL Injection

จะเป็นช่องโหว่ SQL Injection แบบ UNION โดยให้ Query database version ออกมาถือว่าเป็นอันสำเร็จ

นี่คือ prompt ที่ใช้ ที่ต้องระบุ URL เพราะว่าลองไม่ระบุแล้ว Claude ไปหาช่องโหว่ของ google ใน http history 555

help me identify sqlinjection vulnerability from burp http history in {url}

จากรูปจะเห็นได้ว่า Claude มีการไปหา target ก่อนแล้วค่อย Identify ช่องโหว่ แล้วก็ลอง เปลี่ยน payload ไปเรื่อยๆ แล้วก็เรียบร้อย

หลังจาก exploit เสร็จแล้ว Claude ก็จะสรุปขั้นตอนให้ตามนี้เลยครับ

Summary

I successfully identified and exploited a SQL injection vulnerability in the URL parameter /filter?category= on the PortSwigger Web Security Academy lab. Here’s what I found:
Vulnerability Details:
Location: /filter?category= parameter
Type: SQL Injection (UNION-based)
Database: MySQL (version 8.0.41–0ubuntu0.20.04.1)

Exploitation Process:
1. Discovery: Found the vulnerable parameter by examining the HTTP history in Burp Proxy
2. Testing: Confirmed SQL injection by injecting a single quote (') which caused a 500 Internal Server Error
3. Payload Development: Used a UNION SELECT attack to retrieve the database version
4. Final Payload: Accessories' UNION SELECT NULL,@@version#
o URL encoded: Accessories%27%20UNION%20SELECT%20NULL,%40%40version%23
Technical Details:
The vulnerability allowed me to inject SQL commands into what appears to be a WHERE clause filtering products by category
Used @@version to retrieve the MySQL database version
The UNION attack required matching 2 columns (one for product name, one for description)
Used the # comment character to terminate the SQL statement

Lab 2 Business logic

หลังจากที่ผู้เขียนได้ลองทดสอบจากข้อที่แล้วมาเลยเกิดความสงสัยว่า เอ้ะถ้าไม่บอกอะไรเลยหละ Claude จะหาช่องโหว่ได้ไหม
ผู้เขียนเลยเลือก Mystery Challenge ของ Portswigger ก็คือจะสุ่ม Lab มาให้และ Lab ที่ได้ก็คือ Business logic ซึ่งค่อนข้าง challenge ตัว tool อยู่

· เป็นช่องโหว่ business logic ซึ่ง scanner ปกติไม่น่าจะเจอช่องโหว่นี้ได้

· Portswigger ให้ credential มา แต่ผู้เขียนลืมบอก Claude 55555

โดย prompt ก็จะเป็น prompt เหมือนเดิมแค่ไม่บอกช่องโหว่

help me identify vulnerability from burp http history in {url}
https://claude.ai/share/4477ea0c-ce51-4f07-b8b1-1a587d1ad829

หลังจากใช้เวลาอยู่ซักพักใหญ่ๆก็เรียบร้อยครับ ซึ่งเป็นผลลัพธ์ที่เกิดคาดและน่าแปลกใจพอสมควรครับ

หลังจาก exploit เสร็จแล้ว Claude ก็จะสรุปขั้นตอนให้ตามนี้เลยครับ

The lab has been completed! I can see several indicators of success:
1. "User deleted successfully!" message - confirming carlos was deleted
2. Lab status changed to "Solved" - the banner now shows "is-solved" class
3. Carlos is no longer in the user list - only wiener remains
4. Congratulations message appeared
Summary of Vulnerabilities Identified and Exploited
Vulnerability Details:
Location: /my-account/change-password endpoint
Type: Weak Isolation on Dual-Use Endpoint (CWE-269: Improper Privilege Management)
Description: The password change endpoint accepts a username parameter and changes the password for that user, but fails to validate that the authenticated user matches the target user when the current-password parameter is omitted.

Exploitation Process:
1. Logged in as wiener using credentials wiener:peter
2. Discovered the logic flaw by manipulating the username parameter in the password change request
3. Bypassed current password validation by omitting the current-password parameter entirely
4. Changed carlos's password to a known value (newpass123)
5. Changed administrator's password using the same technique
6. Logged in as administrator with the new password
7. Accessed admin panel at /admin
Successfully deleted carlos using /admin/delete?username=carlos

ข้อควรระวัง

1.MCP ยังไม่สามารถส่งเข้า http history ได้ซึ่งทำให้ยากต่อการตรวจสอบว่า AI ส่งrequest อะไรไปบ้าง เท่าที่ผู้เขียนลองเล่นยังหาทางให้ request เข้า http history ไม่ได้ XD

2.Repeater ยังไม่สมบูรณ์ เราสามารถบอกให้ AI เอา request มาใส่ที่แท็บ repeater ได้ แต่ ณ วันที่เขียนยังคงมีปัญหาเรื่อง newline ยังบัคอยู่ตามภาพด้านล่างเลยครับ เลยต้องมาแก้เองพอสมควร

สรุป

Burp MCP เป็นเครื่องมือที่น่าสนใจมากสำหรับ penetration tester โดยเฉพาะในด้านการวิเคราะห์และ exploit ช่องโหว่อัตโนมัติ

แต่ยังไม่เหมาะที่จะนำไปใช้กับงานจริงเท่าไหร่ ณ ตอนนี้ เนื่องจากยังมีจุดที่น่ากังวลอยู่ ซึ่งเหมาะกับการช่วยทำแลปและ ช่วย research มากกว่า

จากการทดสอบพบว่า Claude:

· ระบุช่องโหว่ได้อย่างแม่นยำ

· สร้าง payload และ exploit ได้เองโดยอัตโนมัติ

· สรุปผลการทดสอบได้อย่างละเอียด

· จัดการกับช่องโหว่ที่ซับซ้อนอย่าง business logic ได้

แม้จะยังมีข้อจำกัดบางประการ แต่ถือว่าเป็นก้าวสำคัญในการนำ AI มาช่วยงาน security testing

อ้างอิง

https://www.somkiat.cc/model-context-protocol/

https://modelcontextprotocol.io/introduction

https://apidog.com/blog/mcp-servers-explained/

https://www.youtube.com/watch?v=SFSOcVzUfR8

https://blog.logto.io/what-is-mcp

--

--

No responses yet