GithubHelp home page GithubHelp logo

ufwt / firmpin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deepbitstechnology/firmpin

0.0 1.0 0.0 76.75 MB

An Extensible Dynamic Analysis Framework for IoT Devices

Makefile 1.02% C 84.93% Shell 2.06% C++ 6.46% HTML 0.01% Ruby 0.01% Python 1.50% Dockerfile 0.01% Emacs Lisp 0.01% GDB 0.01% Lex 0.02% Yacc 0.03% Assembly 1.44% Batchfile 0.01% Perl 0.40% Haxe 0.17% Objective-C 1.11% M4 0.17% NSIS 0.01% Forth 0.68%

firmpin's Introduction

FirmPin

A tool for simulation, dynamic analysis and fuzzing of IoT firmware. 

Combination of TriforceAFL, firmadyne and DECAF.

It is a Pintool-like framework, and provides the instrumentation at basic block level, system call level and memory access level for both user level and kernel level programs.

Build

Tested on Ubuntu 16.04

DECAF:

DECAF
It is included in qemu_mode/qemu dir. In our case, run ./configure --target-list=mipsel-softmmu Run make

Firmadyne: we use its custom kernel and libnvram to emulate IoT firmware.

	cd firmadyne 
	See README in firmadyne and do as it says.(NOTICE: need to set FIRMWARE_DIR in firmadyne.config
	Here, we test DIR-815_FIRMWARE_1.01.ZIP, a router firmware image based on mipsel cpu arch.
	run "../qemu_mode/qemu/qemu-img convert -f raw -O qcow2 ./scratch/2/image.raw ./scratch/2/image.qcow2"		
	Finally, we replace the run.sh in scratch/(num)/ with our modified one (In firmadyne_dev dir).

TriforceAFL: AFL fuzzing with full-system emulation

	Run make

Usage:

	cd firmadyne
	Run ./scratch/(num)/run.sh 
	In another terminal, run 'telnet 127.0.0.1 4444', into qemu monitor console.
	FirmFuzzer plugin:
		load_plugin ../qemu_mode/qemu/plugins/callbacktests/callbacktests.so
		do_callbacktests httpd
		do_callbacktests hedwig.cgi
		When firmware system initialization is completed and poll system call is executed, 
		open a Browser, type a request "192.168.0.1/hedwig.cgi" in url, 
		the fuzz process will be started.
	MalScalpel plugin:
		load_plugin ../qemu_mode/qemu/plugins/unpacker/unpacker.so
		trace_by_name mirai.mpsl
		Then, telnet into system "telnet 192.168.0.1" with username "Alphanetworks" and password "wrgnd08_dlob_dir815"
		Run "/FILE_LOAD/mirai.mpsl", the plugin works.

Plugin Development

please see wiki for details.

firmpin's People

Contributors

deepbitstech avatar zyw-200 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.