[HACKING] BeEF(The Browser Exploitation Framework) 설치하기(Install BeEF on Debian)

BeEF라는 툴을 들어보셨나요? 브라우저 후킹,XSS, Exploit 등 굉장히 유명한 툴 입니다. 이번에는 BeEF 툴 설치 과정을 다뤄볼까 합니다. 아주 간단합니다.

BeEF 는 github를 통해 배포되고 있으며, clone 명령을 통해 쉽게 설치가 가능합니다. 아래와 같이 git clone 을 통해 beef 를 받습니다.

git clone https://github.com/beefproject/beef

다운로드 완료 후 beef 에서 사용하는 db(sqlite)를 설치합니다.

apt-get install libsqlite3-dev sqlite3 sqlite3-doc

저는 추가로 ruby 모듈 중 beef 관련하여 설치가 안된 모듈이 많아 bundler를 통해 설치하였습니다. 번들러가 설치되지 않았다면 gem을 통해 설치해줍니다.

bundle install (#gem install bundler)

bundle install Don’t run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Fetching gem metadata from https://rubygems.org/………. Fetching additional metadata from https://rubygems.org/.. Resolving dependencies… Installing addressable 2.3.6 Installing ansi 1.4.3 Installing chunky_png 1.3.4 Installing daemons 1.1.9 Installing data_objects 0.10.14 Installing dm-core 1.2.1 Installing dm-do-adapter 1.2.0 Installing dm-migrations 1.2.0 Installing fastercsv 1.5.5 Using json 1.8.1 Installing json_pure 1.8.2 Installing multi_json 1.9.3 Installing dm-serializer 1.2.2 Installing do_sqlite3 0.10.14

…snip..

bundler 를 통해 설치가 완료되면 바로 beef를 실행합니다. 실행 시 3000 포트로 세팅이 되며 ip:3000/ui.panel 로 접근 시 beef 페이지 확인이 가능합니다.

./beef

[22:55:46][] Bind socket [imapeudora1] listening on [0.0.0.0:2000]. [22:55:46][] Browser Exploitation Framework (BeEF) 0.4.6.1-alpha [22:55:46] | Twit: @beefproject [22:55:46] | Site: http://beefproject.com [22:55:46] | Blog: http://blog.beefproject.com [22:55:46] |_ Wiki: https://github.com/beefproject/beef/wiki [22:55:46][] Project Creator: Wade Alcorn (@WadeAlcorn) [22:55:47][] BeEF is loading. Wait a few seconds… [22:56:00][] 12 extensions enabled. [22:56:00][] 242 modules enabled. [22:56:00][] 2 network interfaces were detected. [22:56:00][+] running on network interface: 127.0.0.1 [22:56:00] | Hook URL: http://127.0.0.1:3000/hook.js [22:56:00] |_ UI URL: http://127.0.0.1:3000/ui/panel [22:56:00][+] running on network interface: 192.168.0.13 [22:56:00] | Hook URL: http://192.168.0.13:3000/hook.js [22:56:00] |_ UI URL: http://192.168.0.13:3000/ui/panel [22:56:00][] RESTful API key: 367816f038ce352a2579735fc94b616b29c67d68 [22:56:00][] DNS Server: 127.0.0.1:5300 (udp) [22:56:00] | Upstream Server: 8.8.8.8:53 (udp) [22:56:00] |_ Upstream Server: 8.8.8.8:53 (tcp) [22:56:00][] HTTP Proxy: http://127.0.0.1:6789 [22:56:00][*] BeEF server started (press control+c to stop)

BeEF를 통해 다른 브라우저를 제어할 수 있습니다.

간단하게 설치하는 과정만 작성하였습니다. BeEF 이외에도 매력적인 툴이 많이 있으며, 이런 프레임워크를 제작해주신 개발자 분들 멋져요 :)