forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some part of the firmware is still hidden!

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
steddy



Joined: 04 Apr 2005
Posts: 139

PostPosted: Sat May 28, 2005 8:18 am    Post subject: Some part of the firmware is still hidden! Reply with quote

Something odd struct me today (and no it didn't hurt).

On the 1.0 firmware, from what I can tell ALL the .prx modules in the kernel directory are encrypted ~PSP files. There doesn't appear to be any executable code on there that isn't.

If this is the case, where the heck is the code that is decoding these files??? It can't be encrypted the same way itself, or it wouldn't be able to decode itself. So if we have a dump of Flash0 and Flash1 and it ain't there, then there must be another area we are missing.

Steddy
Back to top
View user's profile Send private message
Vampire



Joined: 12 Apr 2005
Posts: 138

PostPosted: Sat May 28, 2005 8:33 am    Post subject: Reply with quote

nem wrote:
There is bootstrap area with equipment serial IDs in the flash chip, and the area is unreachable by this software.

http://forums.ps2dev.org/viewtopic.php?t=1623
Back to top
View user's profile Send private message
MindWall



Joined: 10 May 2005
Posts: 70

PostPosted: Sat May 28, 2005 9:42 am    Post subject: Reply with quote

so even loser's lflash does not get to everything?
like kbooti.bin ?
Back to top
View user's profile Send private message
Vampire



Joined: 12 Apr 2005
Posts: 138

PostPosted: Sat May 28, 2005 9:47 am    Post subject: Reply with quote

MindWall wrote:
so even loser's lflash does not get to everything?

yes
Back to top
View user's profile Send private message
zigzag



Joined: 26 Jan 2005
Posts: 129

PostPosted: Sat May 28, 2005 3:28 pm    Post subject: Reply with quote

MindWall wrote:
so even loser's lflash does not get to everything?
like kbooti.bin ?


No, lflash should be able to get at everything. Correct me if I am wrong.
Back to top
View user's profile Send private message
konfig



Joined: 06 Jan 2005
Posts: 68

PostPosted: Sat May 28, 2005 3:51 pm    Post subject: Reply with quote

"bootstrap area with equipment serial IDs in the flash chip"

What is the equipment serial ID? Is it a hardware matter or a software matter? Can this area be read by electrical means?

If there is really no code to perform decryption, maybe there is some hardware implemented decryption protocol between the psp system and the firmware files.
Back to top
View user's profile Send private message MSN Messenger
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sat May 28, 2005 4:56 pm    Post subject: Reply with quote

zigzag wrote:
MindWall wrote:
so even loser's lflash does not get to everything?
like kbooti.bin ?


No, lflash should be able to get at everything. Correct me if I am wrong.


You're wrong.
Back to top
View user's profile Send private message
steddy



Joined: 04 Apr 2005
Posts: 139

PostPosted: Sat May 28, 2005 5:43 pm    Post subject: Reply with quote

Thanks for the link to PSPDUMP and apologies for covering something mentioned at the top of that thread. Its so long since I read that one I forgot all about it.

How are you so sure its no in the lflash mrbrown? The forum post referenced is only talking about the flash0 / flash1 device interface, not the block interface that was uncovered in the 'list of known devices' thread.

Has anyone got the source to a piece of code that will read the lflash block level device that I can compile? I have a 1.0 PSP now and I would like to dump my own flash. Sorry guys I won't post this up if I do it since thats against the rules.

Cheers
Steddy
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sat May 28, 2005 7:40 pm    Post subject: Reply with quote

I've dumped lflash, and there's no bootstrap information there. We've also discussed this at length with nem, who will also confirm that the bootstrap is inaccessible from lflash. However, you're more than welcome to go ahead and examine it :).
Back to top
View user's profile Send private message
steddy



Joined: 04 Apr 2005
Posts: 139

PostPosted: Sat May 28, 2005 10:39 pm    Post subject: Reply with quote

Quote:
I've dumped lflash, and there's no bootstrap information there. We've also discussed this at length with nem, who will also confirm that the bootstrap is inaccessible from lflash. However, you're more than welcome to go ahead and examine it :).


I'd love to :) Do you have the source you used to dump it please?

Cheers
Steddy
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun May 29, 2005 2:58 am    Post subject: Reply with quote

My test harness isn't it a state where I can give it out. Here's the relevant code:
Code:

        int fd = sceIoOpen("lflash:", O_RDONLY, 0);
        if (fd < 0) {
                scr_printf("Error during open: %x", fd);
                goto done;
        }

        int chunk_size = 32 * 1024;
        void *buf = malloc(chunk_size);
        if (!buf) {
                scr_printf("Error alloc'ing read buffer");
                goto done;
        }
        int bytes_requested = 16 * 1024 * 1024;
        int read_offset = 0;//2 * 1024 * 1024 * 1024;
        int total_read = sceIoLseek(fd, read_offset, SEEK_SET);
        int size = 0;

        int fd2 = sceIoOpen("ms0:/flash-part1.bin", O_CREAT | O_WRONLY | O_TRUNC, 0777);
        if (fd2 < 0) {
                scr_printf("Error opening ms file: %x", fd2);
                goto done;
        }

        while (bytes_requested > 0) {
                int read_size = bytes_requested;
                if ((total_read >= read_offset && read_size > chunk_size) || (total_read < read_offset)) {
                        read_size = chunk_size;
                }

                res = sceIoRead(fd, buf, read_size);
                if (res < 0) {
                        scr_printf(str, "Error during read: %x", res);
                        sceIoClose(fd2);
                        break;
                }
 
                if (total_read >= read_offset) {
                        bytes_requested -= res;
                        read_offset += res;
                        sceIoWrite(fd2, buf, res);
                }
               
                total_read += res;
        }
        sceIoClose(fd2);

done:   
        if (fd >= 0) {
                sceIoClose(fd);
        }


Because I have only a 32MB memory stick, I dumped out 16MB at a time. Dumping past 32MB (actually a bit earlier than that) won't break anything, but will only read zeros from the device. At 0xffffffff it wraps around to 0.

The only thing this nets you different than flash0: and flash1: is the underlying FAT filesystem itself. There is nothing else of interest here.
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Sun May 29, 2005 5:34 am    Post subject: Reply with quote

quesiton. You used a malloc. Is this your own fuction or did you figure out how to get the system to allocate?
Back to top
View user's profile Send private message
steddy



Joined: 04 Apr 2005
Posts: 139

PostPosted: Sun May 29, 2005 6:58 am    Post subject: Reply with quote

Thanks for the code mrbrown. Appreciated.

Steddy
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun May 29, 2005 8:07 am    Post subject: Reply with quote

subbie wrote:
quesiton. You used a malloc. Is this your own fuction or did you figure out how to get the system to allocate?


I figured out how games do it.
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Sun May 29, 2005 9:51 am    Post subject: Reply with quote

mrbrown wrote:
subbie wrote:
quesiton. You used a malloc. Is this your own fuction or did you figure out how to get the system to allocate?


I figured out how games do it.


Mind sharing (if you haven't already)? pretty please! :)
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun May 29, 2005 10:02 am    Post subject: Reply with quote

Hmm, I don't think it's a good idea for me to post code I reversed from a game. The reasons are a bit complicated, and more than I care to explain, sorry. But malloc() is easily found if you look at the routines calling into the "SysMemUserForUser" library.
Back to top
View user's profile Send private message
jimmygoon



Joined: 26 May 2005
Posts: 8

PostPosted: Sun May 29, 2005 12:36 pm    Post subject: Reply with quote

So whats the story? Sorry but have or haven't we dumped all of the firmware and what potential goodies are there?
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Sun May 29, 2005 4:17 pm    Post subject: Reply with quote

mrbrown wrote:
Hmm, I don't think it's a good idea for me to post code I reversed from a game. The reasons are a bit complicated, and more than I care to explain, sorry. But malloc() is easily found if you look at the routines calling into the "SysMemUserForUser" library.


Thanks, At least you gave me a start to hack it out myself.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group