PSGRoove escribió:The famous Geohot resurfaced today, to release a useful app called dePKG. The app is very useful for devs, that are planning to look into Sony's official firmware files. dePKG is a linux app, that will decrypt PKG files, that are within PS3UPDAT.PUP files (not to be confused with PSN PKG files).
This will allow devs to take a look at files such as CORE_OS_PACKAGE.pkg, from the convenience of their PC. Previously, the only way to take a look at these files, was via graf_chokolo's method, which utilized the PS3. Geohot's app is ready to be compiled and includes the necessary decryption keys.
Cowa escribió:Geohot liberó ayer esta herramienta "para desarrolladores" llamada dePKG. Esta herramienta para Linux nos permitirá desencriptar los archivos PKG.PSGRoove escribió:The famous Geohot resurfaced today, to release a useful app called dePKG. The app is very useful for devs, that are planning to look into Sony's official firmware files. dePKG is a linux app, that will decrypt PKG files, that are within PS3UPDAT.PUP files (not to be confused with PSN PKG files).
This will allow devs to take a look at files such as CORE_OS_PACKAGE.pkg, from the convenience of their PC. Previously, the only way to take a look at these files, was via graf_chokolo's method, which utilized the PS3. Geohot's app is ready to be compiled and includes the necessary decryption keys.
Descarga.
Notakas escribió:con esto podremos firmar los .self de los pkg no??
brainstorm2001 escribió:Notakas escribió:con esto podremos firmar los .self de los pkg no??
Creo que la primera frase de Cowa lo deja bien claro: "Geohot liberó ayer esta herramienta "para desarrolladores" llamada dePKG. Esta herramienta para Linux nos permitirá desencriptar los archivos PKG"
Solo es para decomprimir los ficheros PKG de los updates PUP, para poder ver que hay dentro
brainstorm2001 escribió:Creo que la primera frase de Cowa lo deja bien claro: "Geohot liberó ayer esta herramienta "para desarrolladores" llamada dePKG. Esta herramienta para Linux nos permitirá desencriptar los archivos PKG"
Solo es para decomprimir los ficheros PKG de los updates PUP, para poder ver que hay dentro
vasolechecongalletas escribió:creo que esta claro no?? Uno te dice que se puede hacer y como, el otro te dice con que lo puedes hacer.... que son hackers pero no gilipollas. Que aqui nadie quiere ir al trullo, coño...
hasta un tontolaba en estos temas como yo lo ve.
Por cierto, FELIZ AÑO!!! (no veas lo que promete con todo esto!! gracias a todos los sceners por vuestro curro desinteresado... a pesar de que hay muchos que ni se lo merecen ni lo aprecian ni lo valoran.... sois MUY GRANDES!)
darcrof escribió:Buenas mi primer mensaje en el foro peor no soy nuevo le sigo todos los dias, pero como no entiendo de muchas cosas no intento hablar como hacen muchos para criticar sin saber solo una unica cuestion.
¿el programa este es para linux necesito en el linux algun programa concreto para correrlo o se instala el directamente?
gracias de antemano y felizaño nuevo a todos.
Notakas escribió:darcrof escribió:Buenas mi primer mensaje en el foro peor no soy nuevo le sigo todos los dias, pero como no entiendo de muchas cosas no intento hablar como hacen muchos para criticar sin saber solo una unica cuestion.
¿el programa este es para linux necesito en el linux algun programa concreto para correrlo o se instala el directamente?
gracias de antemano y felizaño nuevo a todos.
Es para el PC
"A Little Gift for the Scene
#1419148 - Pastie
Decrypt pkg files computer side.
Mad props to fail0verflow"
As a follow-up, Mathieulh Tweeted the following confirmation: "http://pastie.org/1419148 <== thx geohot /me whistles"
To quote from PSGroove: "The app is very useful for devs, that are planning to look into Sony's official firmware files. dePKG is a linux app, that will decrypt PKG files (not to be confused with PSN PKG files), that are within PS3UPDAT.PUP files.
This will allow devs to take a look at files such as CORE_OS_PACKAGE.pkg, from the convenience of their PC. Previously, the only way to take a look at these files, was via graf_chokolo's method, which utilized the PS3. Geohot's app is ready to be compiled and includes the necessary decryption keys."
The PS3 Firmware Package Decrypter source code is linked above, and also can be found below as follows:// depkg by geohot
// needs openssl and zlib
// 100 lines for your pkg file needs
#include
#include
#include
#include
#include "zlib.h"
#define u64 unsigned long long
#define u32 unsigned int
#define u16 unsigned short int
#define u8 unsigned char
u64 get_u64(void* vd) {
u8 *d = (u8*)vd;
return ((u64)d[0]<<56) | ((u64)d[1]<<48) | ((u64)d[2]<<40) | ((u64)d[3]<<32) | (d[4]<<24) | (d[5]<<16) | (d[6]<<8) | d[7];
}
u32 get_u32(void* vd) {
u8 *d = (u8*)vd;
return (d[0]<<24) | (d[1]<<16) | (d[2]<<8) | d[3];
}
u8 pkg_riv[] = {0x4A,0xCE,0xF0,0x12,0x24,0xFB,0xEE,0xDF,0x82,0x45,0xF8,0xFF,0x10,0x21,0x1E,0x6E};
u8 pkg_erk[] = {0xA9,0x78,0x18,0xBD,0x19,0x3A,0x67,0xA1,0x6F,0xE8,0x3A,0x85,0x5E,0x1B,0xE9,0xFB,0x56,0x40,0x93,0x8D,0x4D,0xBC,0xB2,0xCB,0x52,0xC5,0xA2,0xF8,0xB0,0x2B,0x10,0x31};
AES_KEY aes_key;
u8* data;
#define INFLATION_BUFFER_SIZE 0x1000000
u8 inf_buffer[INFLATION_BUFFER_SIZE];
int inf(u8 *source, int source_size, u8 *dest, int* dest_size) {
int ret;
unsigned have;
z_stream strm;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
strm.avail_in = source_size;
strm.next_in = source;
strm.avail_out = *dest_size;
strm.next_out = dest;
ret = inflateInit(&strm);
if(ret != Z_OK)
return ret;
ret = inflate(&strm, Z_NO_FLUSH);
(*dest_size) -= strm.avail_out;
(void)inflateEnd(&strm);
return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
}
int main(int argc, char *argv[]) {
u8 iv[0x10], ecount_buf[0x10];
int num;
FILE *f=fopen(argv[1], "rb");
fseek(f, 0, SEEK_END);
int nlen = ftell(f);
fseek(f, 0, SEEK_SET);
data = (u8*)malloc(nlen);
fread(data, 1, nlen, f);
fclose(f);
printf("read 0x%X bytes of pkg\n", nlen);
int metadata_offset = 0x20+get_u32(data+0xC);
int file_offset = get_u64(data+0x10);
AES_set_decrypt_key(pkg_erk, 256, &aes_key);
AES_cbc_encrypt(&data[metadata_offset], &data[metadata_offset], 0x40, &aes_key, pkg_riv, AES_DECRYPT);
memset(ecount_buf, 0, 16); num=0;
AES_set_encrypt_key(&data[metadata_offset], 128, &aes_key);
AES_ctr128_encrypt(&data[metadata_offset+0x40], &data[metadata_offset+0x40], file_offset-0x40-metadata_offset, &aes_key, &data[metadata_offset+0x20], ecount_buf, &num);
u64 pkg_start = get_u64(data+0xE0);
u64 pkg_size = get_u64(data+0xE8);
printf("pkg data @ %llx with size %llx\n", pkg_start, pkg_size);
memset(ecount_buf, 0, 16); num=0;
AES_set_encrypt_key(&data[0x230], 128, &aes_key);
AES_ctr128_encrypt(&data[pkg_start], &data[pkg_start], pkg_size, &aes_key, &data[0x240], ecount_buf, &num);
int real_size = INFLATION_BUFFER_SIZE;
printf("inflated: %d\n", inf(&data[pkg_start], pkg_size, inf_buffer, &real_size));
printf("writing %X\n", real_size);
FILE *fout = fopen(argv[2], "wb");
fwrite(inf_buffer, 1, real_size, fout);
fclose(fout);
exit:
free(data);
}
u8 pkg_riv[] = {0x4A,0xCE,0xF0,0x12,0x24,0xFB,0xEE,0xDF,0x82,0x45,0xF8,0xFF,0x10,0x21,0x1E,0x6E};
u8 pkg_erk[] = {0xA9,0x78,0x18,0xBD,0x19,0x3A,0x67,0xA1,0x6F,0xE8,0x3A,0x85,0x5E,0x1B,0xE9,0xFB,0x56,0x40,0x93,0x8D,0x4D,0xBC,0xB2,0xCB,0x52,0xC5,0xA2,0xF8,0xB0,0x2B,0x10,0x31};
ssssO hace 2 minutos
Código: Seleccionar todo
u8 pkg_riv[] = {0x4A,0xCE,0xF0,0x12,0x24,0xFB,0xEE,0xDF,0x82,0x45,0xF8,0xFF,0x10,0x21,0x1E,0x6E};
u8 pkg_erk[] = {0xA9,0x78,0x18,0xBD,0x19,0x3A,0x67,0xA1,0x6F,0xE8,0x3A,0x85,0x5E,0x1B,0xE9,0xFB,0x56,0x40,0x93,0x8D,0x4D,0xBC,0xB2,0xCB,0x52,0xC5,0xA2,0xF8,0xB0,0x2B,0x10,0x31};
ahi teneis las claves
) dowo69 escribió:hola buenas como lo as habeis correr con windows?.Yo le e metido el ddl libeay32 en windows/system32 pero nada de nada.Tengo win7 gracias y feliz año
http://psx-scene.com/
sale el archivo adjuntado a la noticia
dowo69 escribió:hola buenas como lo as habeis correr con windows?.Yo le e metido el ddl libeay32 en windows/system32 pero nada de nada.Tengo win7 gracias y feliz año
Mensajepor chemone hace 5 minutos
Hola buenas, solo una pregunta, ¿como demonios uso la aplicación???. Un saludo
pioner escribió:Con esto conseguimos descifrar, pero ¿para poder cifrar y recomponer para por ejemplo hacer un nuevo firmware valido?
Calantra escribió:
1º Debes extraer los ficheros de la actualizaión, puedes usar PS3 PUP Extractor v1.00.
2º Extraer los ficheros pkg de los tar. Lo puedes hacer con winrar.
3º En linea de comandos: depkg fichero.pkg fichero.bin
el fichero bin es el resultado del proceso de descifrado.
Salu2.
pinsipito escribió:y para desencriptar no se necesita tener la clave?
Chaky escribió:pinsipito escribió:y para desencriptar no se necesita tener la clave?
Cifrado asimetrico, es decir, no se usa la misma clave para cifrar que para descifrar.
Chaky escribió:Estoy mirando, estos pkg, son datos empquetados?, o son distintos a los PKG comunes?
Calantra escribió:Chaky escribió:pinsipito escribió:y para desencriptar no se necesita tener la clave?
Cifrado asimetrico, es decir, no se usa la misma clave para cifrar que para descifrar.
Ngggg... error!![]()
Aes es simétrico de toda la vida, misma llave para cifrar que para descifrar. En este caso lo que han hecho es cifrar la llave de cifrado del fichero usando aes256 (llave de 32 bytes).el código de Geo descifra los 64 bytes del metadata para conseguir la llave para descifrar el resto del fichero, posteriormente al descifrado se usa Zlib para Inflar(desempaquetar) el contenido.Chaky escribió:Estoy mirando, estos pkg, son datos empquetados?, o son distintos a los PKG comunes?
No, los pkg normales son paquetes de ficheros, estos tienen mas pinta de modulos/librerias de memoria (no confundir con SPRX).
Salu2.
$ gcc depkg.c -o main
/tmp/ccWaseoN.o: In function `inf':
depkg.c:(.text+0x187): undefined reference to `inflateInit_'
depkg.c:(.text+0x1a6): undefined reference to `inflate'
depkg.c:(.text+0x1d4): undefined reference to `inflateEnd'
/tmp/ccWaseoN.o: In function `main':
depkg.c:(.text+0x305): undefined reference to `AES_set_decrypt_key'
depkg.c:(.text+0x346): undefined reference to `AES_cbc_encrypt'
depkg.c:(.text+0x385): undefined reference to `AES_set_encrypt_key'
depkg.c:(.text+0x3f1): undefined reference to `AES_ctr128_encrypt'
depkg.c:(.text+0x47c): undefined reference to `AES_set_encrypt_key'
depkg.c:(.text+0x4c9): undefined reference to `AES_ctr128_encrypt'
collect2: ld returned 1 exit status
$ openssl version
OpenSSL 0.9.8o 01 Jun 2010$ dpkg -l | grep zlib*
zlib1g 1:1.2.3.4.dfsg-3ubuntu1 compression library - runtime
zlib1g-dev 1:1.2.3.4.dfsg-3ubuntu1 compression library - development$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)$ uname -a
Linux linux 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 02:41:37 UTC 2010 x86_64 GNU/Linuxgcc depkg.c /usr/lib64/libssl.so.0.9.8 -o maingcc ./depkg.c -o main -lz -lssl
$ ll
total 20K
-rw-r--r-- 1 jose jose 2,9K 2010-12-31 19:02 depkg.c
-rwxr-xr-x 1 jose jose 14K 2010-12-31 19:50 main$ ./main CORE_OS_PACKAGE.pkg
read 0x4F87FA bytes of pkg
pkg data @ 300 with size 4f84fa
inflated: 0
writing 6FFFE0
Violación de segmento$ ./main BLUETOOTH_FIRMWARE.pkg
read 0x9D4E2 bytes of pkg
pkg data @ 300 with size 9d1e2
inflated: 0
writing F7800
Violación de segmento
jeje, una vez compilado, el ejecutable copiarlo a la carpeta "File_7" depues de descomprimir ese archivo del Firmware, y ejecutar esto:for i in `ls dev_flash*`; do ./main $i $i.tar ; tar -xvf ./$i.tar ; rm $i.tar; done
$ ll
total 166M
-rwxr--r-- 1 jose jose 576 2010-09-13 11:19 RL_FOR_PACKAGE.img
-rwxr--r-- 1 jose jose 1,9M 2010-09-13 11:20 BDIT_FIRMWARE_PACKAGE.pkg
-rwxr--r-- 1 jose jose 929K 2010-09-13 11:20 BDPT_FIRMWARE_PACKAGE_302R.pkg
-rwxr--r-- 1 jose jose 929K 2010-09-13 11:20 BDPT_FIRMWARE_PACKAGE_301R.pkg
-rwxr--r-- 1 jose jose 929K 2010-09-13 11:20 BDPT_FIRMWARE_PACKAGE_303R.pkg
-rwxr--r-- 1 jose jose 1,6M 2010-09-13 11:20 BDPT_FIRMWARE_PACKAGE_304R.pkg
-rwxr--r-- 1 jose jose 769K 2010-09-13 11:20 BDPT_FIRMWARE_PACKAGE_306R.pkg
-rwxr--r-- 1 jose jose 1,6M 2010-09-13 11:20 BDPT_FIRMWARE_PACKAGE_308R.pkg
drwxr-xr-x 9 jose jose 4,0K 2010-09-13 16:09 dev_flash
-rwxr--r-- 1 jose jose 28K 2010-09-13 16:13 MULTI_CARD_FIRMWARE.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_01000006.pkg
-rwxr--r-- 1 jose jose 630K 2010-09-13 16:13 BLUETOOTH_FIRMWARE.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_01020302.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_01010303.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_01040402.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_01030302.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_01050101.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_01050002.pkg
-rwxr--r-- 1 jose jose 4,8K 2010-09-13 16:13 SYS_CON_FIRMWARE_S1_00010002083E0832.pkg
-rwxr--r-- 1 jose jose 736 2010-11-26 14:30 RL_FOR_PROGRAM.img
-rwxr--r-- 1 jose jose 5,0M 2010-11-26 14:33 CORE_OS_PACKAGE.pkg
-rwxr--r-- 1 jose jose 1,9K 2010-11-26 21:13 dev_flash_000.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 1,9M 2010-11-26 21:13 dev_flash_001.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 4,7M 2010-11-26 21:13 dev_flash_002.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 4,0M 2010-11-26 21:14 dev_flash_003.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 3,1M 2010-11-26 21:14 dev_flash_004.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 28K 2010-11-26 21:14 dev_flash_005.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 7,0M 2010-11-26 21:14 dev_flash_006.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 10M 2010-11-26 21:14 dev_flash_007.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 9,8M 2010-11-26 21:15 dev_flash_008.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 9,8M 2010-11-26 21:15 dev_flash_009.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 9,9M 2010-11-26 21:15 dev_flash_010.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 9,6M 2010-11-26 21:15 dev_flash_011.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 9,2M 2010-11-26 21:16 dev_flash_012.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 8,8M 2010-11-26 21:16 dev_flash_013.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 7,7M 2010-11-26 21:16 dev_flash_014.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 8,6M 2010-11-26 21:17 dev_flash_015.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 8,4M 2010-11-26 21:17 dev_flash_016.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 9,2M 2010-11-26 21:17 dev_flash_017.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 8,3M 2010-11-26 21:17 dev_flash_018.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 6,9M 2010-11-26 21:17 dev_flash_019.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 7,1M 2010-11-26 21:17 dev_flash_020.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 7,6M 2010-11-26 21:17 dev_flash_021.tar.aa.2010_11_27_051337
-rwxr--r-- 1 jose jose 1,8K 2010-11-26 21:18 dev_flash3_022.tar.aa.2010_11_27_051800
-rwxr--r-- 1 jose jose 1,3K 2010-11-26 21:18 UPL.xml.pkg
drwxr-xr-x 3 jose jose 4,0K 2010-12-31 20:03 dev_flash3
-rwxr-xr-x 1 jose jose 14K 2010-12-31 20:05 mainellidr escribió:que diferiencia hay entre esta aplicacion y esta aplicacion que ya habian sacado anteriormente
hilo_pkgview-un-programa-para-abrir-pkgs-100-legal_1484463
AzagraMac escribió:Y listo, ya tenemos las carpetas "dev_flash" y "dev_flash3" con todo su contenido![]()
![]()
![]()

AzagraMac escribió:El 3.55, el ultimo, las carpetas que extrae es el contenido de la PS3, incluye todo, lo que no he podido ver es si están firmados, creo que no, porque solamente he cojido un self y veía texto y las imágenes se pueden ver sin problemas, además he visto el theme por defecto de la PS3 y los sonidos de arranque.
Haber si podemos sacar algo bueno de esto
pd: Feliz Año 2011, y que paséis una cena en compañía de vuestra gente y lo mas felizmente posible y recordar, mañana nos sube la luz un 10%... xD
edito: feliz añooooooooooo