Talk:Online Connections: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
(Added script to generate master keys for SSL)
mNo edit summary
Line 145: Line 145:
So a little bit about the passphrase and ID... the passphrase is 128 bytes encrypted.
So a little bit about the passphrase and ID... the passphrase is 128 bytes encrypted.


<pre>SceNpCommunicationId communication_id = {
<syntaxhighlight lang="C">
SceNpCommunicationId communication_id = {
{'N','P','X','S','0','0','0','0','5'},
{'N','P','X','S','0','0','0','0','5'},
'\0',
'\0',
Line 182: Line 183:
{
{
return &communication_passphrase;
return &communication_passphrase;
}</pre>
}
</syntaxhighlight>


I shouldn't really have to explain this but just in case...
I shouldn't really have to explain this but just in case...
Line 188: Line 190:
===ID===
===ID===


<pre>static const SceNpCommunicationId s_communication_id = {
<syntaxhighlight lang="C">
static const SceNpCommunicationId s_communication_id = {
{'N','P','X','S','0','0','0','2','7'},
{'N','P','X','S','0','0','0','2','7'},
'\0',
'\0',
0,
0,
0
0
};</pre>
};
</syntaxhighlight>


This is the format in which the NP ID will be displayed (don't know much about it).
This is the format in which the NP ID will be displayed (don't know much about it).
Line 199: Line 203:
The request for the ID is very simple:
The request for the ID is very simple:


<pre>const SceNpCommunicationId* NpConf::npCommId(int i)
<syntaxhighlight lang="C">
const SceNpCommunicationId* NpConf::npCommId(int i)
{
{
(void)i;
(void)i;
return(&s_communication_id);
return(&s_communication_id);
}</pre>
}
</syntaxhighlight>


===Passphrase===
===Passphrase===
Line 209: Line 215:
As we know it's 128 bytes encrypted. Displayed like so...
As we know it's 128 bytes encrypted. Displayed like so...


<pre>static const SceNpCommunicationPassphrase s_communication_passphrase = {
<syntaxhighlight lang="C">
static const SceNpCommunicationPassphrase s_communication_passphrase = {
{
{
0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
Line 229: Line 236:
}
}


};</pre>
};
</syntaxhighlight>


The auth is as simple as the IDs.
The auth is as simple as the IDs.


<pre>const SceNpCommunicationPassphrase* NpConf::npCommPassphrase(int i)
<syntaxhighlight lang="C">
const SceNpCommunicationPassphrase* NpConf::npCommPassphrase(int i)
{
{
(void)i;
(void)i;
return(&s_communication_passphrase);
return(&s_communication_passphrase);
}</pre>
}
</syntaxhighlight>




Also, this a encrypted passphrase (maybe) from 4.00 it's taken from the same format in the code above but there's a lot more characters...
Also, this a encrypted passphrase (maybe) from 4.00 it's taken from the same format in the code above but there's a lot more characters...


<pre>8dade4164f15e26e323668124aa89083b44414c66db2bddcc0ef67f6ca4c1eedc364db4800b62d63e5ecb33e2a1b4db4edc1ee3802a042f06d600eb5cb40236cefcda6136c5a26dd624a1a2fc197b25a4a3b06660f0d3f44bf538971089e44a91169f062c6743dd701f90f256ab5ab539dc943e057303559f66057b39e49b661</pre>
<small><code>8dade4164f15e26e323668124aa89083b44414c66db2bddcc0ef67f6ca4c1eedc364db4800b62d63e5ecb33e2a1b4db4edc1ee3802a042f06d600eb5cb40236cefcda6136c5a26dd624a1a2fc197b25a4a3b06660f0d3f44bf538971089e44a91169f062c6743dd701f90f256ab5ab539dc943e057303559f66057b39e49b661</code></small>


===Sig===
===Sig===
Line 250: Line 260:
Not sure how it's displayed but it's auth is simple.
Not sure how it's displayed but it's auth is simple.


<pre>const SceNpCommunicationSignature* NpConf::npCommSig(int i)
<syntaxhighlight lang="C">
const SceNpCommunicationSignature* NpConf::npCommSig(int i)
{
{
(void)i;
(void)i;
return 0;
return 0;
}</pre>
}
</syntaxhighlight>


=== gen_keying_material.py ===
=== gen_keying_material.py ===

Revision as of 14:28, 20 July 2014

to add

 <deroad> @eussNL there is a thing not written in the wiki (i can't access now, don't know why) http://xmb-e.dl.playstation.net/
 <deroad> a guy told me that homebrews under PSN category sends this to sony: xmb-e.dl.playstation.net/xmb/l?env=np&serv=PSChannel&cc=us

found in explore_plugin.sprx --Nas plugi 04:58, 9 August 2013 (MSK)

Ports

http://portforward.com/cports.htm

3.55 spoofed with jailbait SEN/PSN enabler

http://www.ps3hax.net/showthread.php?t=38472&page=18

Title Status Remarks
Army of Two the 40th day Yes
Battlefield 1943 (PSN) Yes
Battlefield BC2 Yes work with last update (1.05)
Battlefield 3 Yes only invite
Blur Yes
Borderlands Yes
Burnout Paradise and DLC (PSN) Yes
Burnout Yes
Call of Duty 4 Yes
Call of Duty Black Ops No param.sfo edit app version to 1.13
Call of Duty Modern Warfare 2 Yes Needs update 1.12
Call of Duty Modern Warfare 3 (TB) No
Call of Duty World At War Yes
Call of Juarez: Bond by Blood Yes
Crash Bandicot (PSN) Yes
Crysis 2 Yes
Dead Rising 2 Yes
Dead Space 2 Yes
Dragon Ball Raging Blast 2 Yes
Far Cry 2 Yes
FIFA11 Yes
FIFA12 Yes param.sfo edit app version to 1.07 (that way hard to find match!) OR backup EBOOT.BIN & fifazf.self (leave param.sfo original), update game to 1.06 replace EBOOT.BIN & fifazf.self with backuped one. (That way it found matches quickly BUT! for me fifa lags ALOOOT in both kick off and online head to head, controls lags, replay lags like 2 FPS .... )
Fifa Street (TB) Yes
GTA IV Yes
Homefront Yes
Infamous 2 No
Killzone 2 Yes
Killzone 3 No
Little Big Planet GOTY Yes
Lara Croft: Guardian of Light Yes
Marvel Ultimate Alliance 2 Yes
Marvel vs Capcom 3 Yes
MK vs Dc Yes
Mortal Kombat 9 Yes
Naruto Ultimate Ninja Storm 2 Yes
NBA 2k11 Yes
NBA 2k12 No
Need for Speed Hot Pursuit No
Need for Speed Undercover No
PES11 Yes
PES12 Yes
Pure Yes
Red Dead Redemption: Undead Nightmare Yes work with last update
Rage Yes Join?
Resident Evil 5 Gold edition Yes
Ridge Racer 7 Yes
Saints Row 2 Yes
Singularity Yes
Smackdown vs RAW 2011 Yes
Tekken 6 Yes
Top Spin 4 No
Transformers: War For Cybertron Yes Update 1.01
Tron: Evolution Yes Update 1.02
Uncharted 3 No Update does not work
Unreal Tournament 3 Yes Update 2.00
Virtual Tennis 4 Yes
White Knight Chronicles Yes Update 1.01
WWE All Stars Yes
Yes
Yes
No
No

Passphrase, ID, Sig

So a little bit about the passphrase and ID... the passphrase is 128 bytes encrypted.

SceNpCommunicationId communication_id = {
		{'N','P','X','S','0','0','0','0','5'},
		'\0',
		0,
		0
};

SceNpCommunicationPassphrase communication_passphrase = {
	{
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa
	}
};


SceNpCommunicationId *get_np_communication_id(void)
{
	return &communication_id;
}

SceNpCommunicationPassphrase *get_np_communication_passphrase(void)
{
	return &communication_passphrase;
}

I shouldn't really have to explain this but just in case...

ID

static const SceNpCommunicationId s_communication_id = {
	{'N','P','X','S','0','0','0','2','7'},
	'\0',
	0,
	0
};

This is the format in which the NP ID will be displayed (don't know much about it).

The request for the ID is very simple:

const SceNpCommunicationId* NpConf::npCommId(int i)
{
	(void)i;
	return(&s_communication_id);
}

Passphrase

As we know it's 128 bytes encrypted. Displayed like so...

static const SceNpCommunicationPassphrase s_communication_passphrase = {
	{
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
		0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa
	}

};

The auth is as simple as the IDs.

const SceNpCommunicationPassphrase* NpConf::npCommPassphrase(int i)
{
	(void)i;
	return(&s_communication_passphrase);
}


Also, this a encrypted passphrase (maybe) from 4.00 it's taken from the same format in the code above but there's a lot more characters...

8dade4164f15e26e323668124aa89083b44414c66db2bddcc0ef67f6ca4c1eedc364db4800b62d63e5ecb33e2a1b4db4edc1ee3802a042f06d600eb5cb40236cefcda6136c5a26dd624a1a2fc197b25a4a3b06660f0d3f44bf538971089e44a91169f062c6743dd701f90f256ab5ab539dc943e057303559f66057b39e49b661

Sig

Digital Signature (know nothing about it).

Not sure how it's displayed but it's auth is simple.

const SceNpCommunicationSignature* NpConf::npCommSig(int i)
{
	(void)i;
	return 0;
}

gen_keying_material.py

#!python2

import sys, os, struct, hashlib, re

if len(sys.argv) < 6:
	script_file_name = os.path.split(sys.argv[0])[1]
	print 'usage: {0} <premaster secret> <client random> <server random> <session id> <log file>'.format(script_file_name)
	sys.exit()

def clean_whitespace(s):
	return re.sub(r'\s+', '', s)

ssl3_premaster_secret_size = 48
ssl3_random_size = 32
ssl3_session_id_size = 32

premaster_secret = clean_whitespace(sys.argv[1]).decode('hex')
client_random = clean_whitespace(sys.argv[2]).decode('hex')
if len(client_random) != ssl3_random_size:
	print 'error: client random should have {0} bytes'.format(ssl3_random_size)
	sys.exit()

server_random = clean_whitespace(sys.argv[3]).decode('hex')
if len(server_random) != ssl3_random_size:
	print 'error: server random should have {0} bytes'.format(ssl3_random_size)
	sys.exit()

session_id = clean_whitespace(sys.argv[4]).decode('hex')
if len(session_id) != ssl3_session_id_size:
	print 'error: session id should have {0} bytes'.format(ssl3_session_id_size)
	sys.exit()

log_file_path = sys.argv[5]
if os.path.exists(log_file_path) and not os.path.isfile(log_file_path):
	print 'error: invalid log file specified'
	sys.exit()

def sha1(data):
	return hashlib.sha1(data).digest()

def md5(data):
	return hashlib.md5(data).digest()

def ssl3_prf(secret, rnd1, rnd2):
	result = ''
	for salt in ['A', 'BB', 'CCC']:
		result += md5(secret + sha1(salt + secret + rnd1 + rnd2))
	return result

master_secret = ssl3_prf(premaster_secret, client_random, server_random)
with open(log_file_path, 'a') as log_file:
	log_file.write('RSA Session-ID:{0} Master-Key:{1}\n'.format(session_id.encode('hex').upper(), master_secret.encode('hex').upper()))