Join Us and become a Member for a Verified Badge to access private areas with the latest PS4 PKGs.
PS4 CFW and Hacks       Thread starter BwE       Start date Nov 6, 2018 at 3:38 AM       14      
Status
Not open for further replies.
Hello! After my BwE PS4 WiFi / BT Patcher & Extractor this program BwE PS4 NOR Statistics v1.00 followed by Version 1.1, another micro version of my PS4 NOR Validator, is designed solely to validate your NOR based on statistics only from Better Way Electronics!

Why make this you ask? Entropy and statistics are a well used methodology in the malware analysis field to determine if a binary file is encrypted, and by how much.

What is entropy? Entropy is a method for measuring uncertainty in a series of numbers or bytes. In technical terms, entropy measures the level of difficulty or the probability of independently predicting each number in the series.

What has this got to do with PS4s? Well the PS4's NOR is almost entirely encrypted and so with a collection of known valid NOR's it is possible to determine the level of entropy that represents a valid NOR and what level of entropy would represent a corrupt NOR.

When corruption occurs it will generally wipe out a large chuck of the NOR, cause the NOR to repeat itself or will fill the NOR with junk. All of this will decrease or severely increase the entropy.

Seeing as the PS4 firmware is likely to add more or less complexity with each update I have made available a settings file where you can adjust the predicted statistics.
Have fun! And yes this is made specifically for other PS4 repairers like myself. Maybe it will be useful for something else one day. Remember the fun we had with the PS3 NOR? :'(

NOTE: My program is designed for Windows 64 - If this is a problem then you're computing wrong.
  • Release Date: 5/11/18
  • Version: 1.0
  • MD5: BDABAAB45995A3D1E7AE83541E752721
  • Chiptune: Dubmood - A Tribute to Kootie
  • Loader Art: BwE (Credits to Maniac (Netflix))
  • Version 1.1 (22/12/18)
  • Converted to 32bit, Allowed Deletion/Disregarding of Settings.ini
And from the README.md: BwE PS4 NOR Statistics Standalone

This program is a standalone statistics generator for the PS4 NOR chip. It will output known expected results based on comparative analysis of valid firmwares. The program also is compatible with an external settings file for fine tuning the valid statistical results.

Also for those who enjoy a trip down memory lane, here's blast from the past via HackADay.com on how the original Sony PlayStation was hacked. (y)

If you like what I do, or just like me for me, buy me a coffeeeee!


small python program that calculates the entropy of the file "sflash0":
One could adapt this to use direct data from sflash0 instead of the whole flash as a means of validating it. i'm too lazy to do this so i'll let you guys use your brains.
Code:
#!/usr/bin/env python3

import math

def entropy(filename):
    with open(filename, "rb") as file:
        counters = {byte: 0 for byte in range(2 ** 8)}  # start all counters with zeros

        for byte in file.read():  # read in chunks for large files
            counters[byte] += 1  # increase counter for specified byte

        filesize = file.tell()  # we can get file size by reading current position

        probabilities = [counter / filesize for counter in counters.values()]  # calculate probabilities for each byte

        entropy = -sum(probability * math.log2(probability) for probability in probabilities if probability > 0)  # final sum

        print(entropy)
       
entropy("sflash0")
for those curious about why the revert requires the values at 0x201000 to be of a specific type. the logic behind it is that the bank type is stored there. Sony checks for a 00 or 80 in the first byte for bank 00 or 01 respectively
the reason why option 7 worked was because, when decrypting those values, the first byte happened to match 00 or 80, thus making the console believe it was on firmware 9.00 (which was located in backup bank)
fun fact, all those 8 options could have not worked. there is a 1/128 or 2/256 possibility of the person changing the values gets it right, because one byte has 256 possibilities and we're looking for one out of two
yes. you ftp from your hacked console the file sflash0s1.crypt
you can find the previous firmware *** version in COREOS
BwE PS4 NOR Statistics v1.00 by BetterWayElectronics.jpg

BwE PS4 NOR Statistics v1.00 by BetterWayElectronics.png
 

Comments

Lol the program isn't all that special. I just felt I had to release something given that I have had a delay on the actual validator. But thanks :)

I think I've said it before: I enjoy making the cracktro and artwork more than the programming hehe
 
I forgot to add these to the original post:

This is a valid NOR:

Typical_PS4_NOR.png

This is an invalid NOR:

Atypical_PS4_NOR.png

See! Statistics! Fun!
 
Status
Not open for further replies.
Back
Top