Code Monkey home page Code Monkey logo

img4lib's People

Contributors

gh0u1l5 avatar siguza avatar xerub 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

img4lib's Issues

unable to build img4lib

Since commit d273abb I am unable to build img4lib.
Error :

libvfs/vfs_img4.c:354:8: error: dereferencing pointer to incomplete type ‘RSA {aka struct rsa_st}’
     rsa->n = BN_bin2bn(pkeyComponents[0].data, pkeyComponents[0].length, NULL);

OS/version :

Distributor ID:	Debian
Description:	Debian GNU/Linux 9.9 (stretch)
Release:	9.9
Codename:	stretch

I also tested on Ubuntu 18.04, same error.

corecrypto/cc_clear.c:1:6: error: expected ';' after top level declarator

if I try to compile with make CORECRYPTO=1
I get the following error:
corecrypto/cc_clear.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] https://developer.apple.com/security/ ^ corecrypto/cc_clear.c:1:6: error: expected ';' after top level declarator https://developer.apple.com/security/ ^ ; 1 warning and 1 error generated. make: *** [corecrypto/cc_clear.o] Error 1

Usage of img4lib to get iOS 9.0.2 Ramdisk for iPhone 6S+

Hello, @xerub
I found your library as a tool for decrypt Ramdisks, Kernel, iBSS, iBEC from iOS firmware. But there were no mentions about relatively fresh iPhone's, only 5 and older. I have iPhone 6S+ with iOS 9.0.2 which is stucked on bootloop due to file modifications on System partition. The problem to deal with is to get access to device System partition and revert file modification. Device was jailbroken, but unfortunately USB SSH does not load before it gets stucked on bootloop.

If I understand correctly it is possible with loading SSH Ramdisk from DFU mode using checkm8. Could you please clarify, how img4lib could be used to get SSH Ramdisk in my case?
Thanks

ld: symbol(s) not found for architecture x86_64 while compiling lzss.c and img4.c

While compiling lzss.c and img4.c with
gcc -o img4 -L/usr/local/openssl-1.0.2h/lib -I/usr/local/openssl-1.0.2h/include/openssl lzss.o img4.o libDER/DER_Encode.o libDER/DER_Decode.o libDER/oids.o libvfs/vfs_file.o libvfs/vfs_mem.o libvfs/vfs_sub.o libvfs/vfs_enc.o libvfs/vfs_lzss.o libvfs/vfs_lzfse.o libvfs/vfs_img4.o -lcrypto
I get:
Undefined symbols for architecture x86_64: "_lzfse_decode_buffer", referenced from: _lzfse_reopen in vfs_lzfse.o "_lzfse_decode_scratch_size", referenced from: _lzfse_reopen in vfs_lzfse.o "_lzfse_encode_buffer", referenced from: _lzfse_fsync in vfs_lzfse.o "_lzfse_encode_scratch_size", referenced from: _lzfse_fsync in vfs_lzfse.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am on Mac OSX 10.12

Creation of invalid IMG4s

Newer IM4Ps have a SEQUENCE attached at the end. When creating an IMG4 the last INTEGER gets changed and makes the IMG4 invalid. This SEQUENCE seems to only be present on A11+ IM4Ps but I have only tested this on an A13 device and restoring this INTEGER from the original IM4P makes the image valid.

1158681:d=1 hl=2 l= 116 prim: OCTET STRING [HEX DUMP]:3072303702010104108B899A083A93F9788381A12B63CDD9BA04204983AD5134850A540BB81264F5DE41A764A0EACF84F0D857B6649800C49004A230370201020410F3B47B6767EBDCDA3E7B5363D80A5A6F0420E67E948423DE8E0294400FF6B5936E1BD6282ADD0F757A88D880450A7803D5AA. <---[KEYBAGS]
1158799:d=1 hl=2 l= 8 cons: SEQUENCE
1158801:d=2 hl=2 l= 1 prim: INTEGER :01
1158804:d=2 hl=2 l= 3 prim: INTEGER :177500 <---[This thing gets changed and it shouldn't]

cannot locate openssl aes.h headers on mac 10.11

I've read the documentation and commentary in the project, but I cannot convince compilation to pick up my openssl aes.h headers at /usr/local/Cellar/openssl/1.0.2n/include/openssl/aes.h. I've tweaked every env variable I can imagine to force compilation to recognize this.

Build fail on Centos with glibc-headers-2.17-292.el7.x86_64

~/Downloads/playground/img4lib$ make
gcc -o img4.o -Wall -W -pedantic -Wno-variadic-macros -Wno-multichar -Wno-four-char-constants -Wno-unused-parameter -O2 -I. -g -DiOS10 -DDER_MULTIBYTE_TAGS=1 -DDER_TAG_SIZE=8 -D__unused="__attribute__((unused))" -Ilzfse/src -Wno-deprecated-declarations -c img4.c
In file included from /usr/include/fcntl.h:77:0,
                 from img4.c:4:
/usr/include/bits/stat.h:106:31: error: expected identifier or ‘(’ before ‘[’ token
     __syscall_slong_t __unused[3];
                               ^

Build fails on Linux with libssl 1.0.2

I have downgraded my ssl just to get this thing to compile, and it still spits out errors at me:

ar: `u' modifier ignored since `D' is the default (see `U')
gcc -o img4 -g img4.o lzss.o libDER/DER_Encode.o libDER/DER_Decode.o libDER/oids.o libvfs/vfs_file.o libvfs/vfs_mem.o libvfs/vfs_sub.o libvfs/vfs_enc.o libvfs/vfs_lzss.o libvfs/vfs_lzfse.o libvfs/vfs_img4.o libimg4.a -llzfse -lssl -lcrypto -lcrypto
/usr/bin/ld: libvfs/vfs_img4.o: in function `dovalidate':
/home/ezra/git/img4lib/libvfs/vfs_img4.c:1952: undefined reference to `EVP_cleanup'
/usr/bin/ld: /home/ezra/git/img4lib/libvfs/vfs_img4.c:1954: undefined reference to `CRYPTO_cleanup_all_ex_data'
collect2: error: ld returned 1 exit status
make: *** [Makefile:141: img4] Error 1

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.