Arachni: Distributed Architecture

Supanut Apikulvanich
Computer System & Network Security
2 min readMay 29, 2017

หลักการเบื้องต้นของการ scan ด้วย arachni-server หลายเครื่องเวลาเดียวกัน

It allows you to remotely perform and control scans by deploying agents on remote servers and is designed to fit into your workflow and easily integrate with your existing infrastructure.

source: http://www.arachni-scanner.com

ถ้าเราใช้ arachni server เพียงเครื่องเดียว scan web อาจจะใช้เวลาประมวลผลนาน แตกต่างกับการมี server หลายๆตัว มีระบบจัดการ แบ่งงาน ช่วยกันทำงาน ซึ่งใน web ของ arachni มี 2 แบบ คือ Rest API และ RPC API

Rest API

ตัว Arachni มี REST API ซึ่งใช้งานผ่าน GET, POST, PUT, DELETE และ Data เป็น JSON

เราสามารถจัดการได้ เอาไว้กับระบบที่ไม่ใช่ Ruby ซึ่งเราต้องจัดการระบบ Queue / Load balance ระหว่าง Server ที่ติดตั้ง Arachni เองได้ อาจใช้งานร่วมกับ RabbitMQ

ถ้าหากต้องการใช้งานผ่าน REST API ต้องเปิด Server ก่อน แบบรูปข้างล่างนี้

ตัวอย่าง API

RPC API

เป็น Protocol ที่เอาไว้สื่อสาร และ จัดการกับการกระจายงาน ช่วยให้เราสามารถ Scale ได้ง่าย ทำให้ประมวลผลได้เร็วขึ้น รวมทั้งจัดการเกี่ยวกับ Load balance ด้วย

Dispatchers are servers whose only job is to provide Instances which you then configure and use to perform Scans.

source: https://github.com/Arachni/arachni-ui-web/wiki/dispatchers

Dispatcher คือ server ที่ค่อยรับหน้าที่ช่วย scan

ซึ่งการจะใช้งาน RPC API ต้องเปิด Server ที่เป็น Dispatcher ก่อน ตามรูปข้างล่างนี้

การเพิ่ม Dispatcher

นำ dispatcher ที่รันอยู่ มาเพิ่มใน WebUI ที่เราใช้งานอยู่ โดยกรอก address และ port ของ dispatcher นั้น

ตอน Scan เข้าไปที่ Advanced options > distribution

จากนั้นจะเห็นให้เลือกอยู่ 3 แบบ

  • Direct คือ การ scan ด้วยเครื่องที่เราใช้งาน web server arachni อยู่
  • Remote คือ การ scan ด้วยเครื่อง dispatcher เพียงเครื่องเดียว
  • Grid คือ การ scan โดยจัดการ load balance ระหว่าง dispatcher หลายตัว

ซึ่ง Remote, Grid ต้องใช้งานร่วมกับ Dispatcher

References

http://www.arachni-scanner.com/features/framework/distributed-architecture

--

--