Pacchetti HTTP, cosa sta accadendo?
-
23-09-2019 - |
Domanda
In sostanza, mi è stato wiresharking pacchetti sulla mia PS3 durante la visualizzazione di Motorstorm Leaderboards. Le classifiche vengono inviati alla mia ps3 in formato XML, ma solo dopo che mi è stato autorizzato. Così qualcuno può dirmi cosa sta succedendo tra questi tre pacchetti e come avrei potuto replicare in un browser?
Packet 1 Dal mio PS3 ai server Sony
POST /ranking_view/func/get_player_rank HTTP/1.1
Host: ranking-view-a01.u0.np.community.playstation.net
Connection: Keep-Alive
Content-Length: 213
Authorization: Digest username="c7y-ranking01", realm="c7y-ranking", nonce="2SpsV4WABAA=47a2b36030cd94de1190f6b9f05db1bd5584bc2a", uri="/ranking_view/func/get_player_rank", qop="auth", nc="00000001", cnonce="d4eb1eb60ab4efaea1476869d83a6e0b", response="96b55c6e79f84dd41b46eb66bed1c167"
Accept-Encoding: identity
User-Agent: PS3Community-agent/1.0.0 libhttp/1.0.0
<?xml version="1.0" encoding="utf-8"?><ranking platform="ps3" sv="3.15"><titleid>NPWR00012_00</titleid><board>7</board><jid>Panzerborn@a5.gb.np.playstation.net</jid><option message="false" info="false"/></ranking>
Il pacchetto 2 Sony Risposta del server per la mia PS3
Date: Fri, 26 Feb 2010 19:06:12 GMT
WWW-Authenticate: Digest realm="c7y-ranking", nonce="a3PFl4WABAA=6d375259676ec79641448a8032a795b8e12ccae4", algorithm=MD5, stale=true, qop="auth"
Content-Length: 401
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>
Packet 3 risposta PS3 ai server Sony ultimo pacchetto
POST /ranking_view/func/get_player_rank HTTP/1.1
Host: ranking-view-a01.u0.np.community.playstation.net
Connection: Keep-Alive
Authorization: Digest username="c7y-ranking01", realm="c7y-ranking", nonce="a3PFl4WABAA=6d375259676ec79641448a8032a795b8e12ccae4", uri="/ranking_view/func/get_player_rank", qop="auth", nc="00000001", cnonce="58869490a891002d8c56573496274a3a", response="ca3d6f252d4e398b8f751c201a3f8f08"
Accept-Encoding: identity
User-Agent: PS3Community-agent/1.0.0 libhttp/1.0.0
<?xml version="1.0" encoding="utf-8"?><ranking platform="ps3" sv="3.15"><titleid>NPWR00012_00</titleid><board>7</board><jid>Panzerborn@a5.gb.np.playstation.net</jid><option message="false" info="false"/></ranking>
Ho cercato di replicare questo in Firefox e le intestazioni di manomissione, nonché in PHP cURL ma im arrivare da nessuna parte. Suppongo che sia a che fare con le variabili nonce, cnonce e responce che continuano a cambiare>
Soluzione
Nonce, cnonce e così via sono collegati con HTTP Autenticazione , che è l'autenticazione meccanismo che consente l'autenticazione senza l'invio di una password in chiaro. Quindi, se si vuole imbrogliare nel vostro gioco PS3, per prima cosa devi incidere quella password fuori l'hash MD5, immagino.
E non è chiamato HTTP pacchetti , a livello 7 che di solito dire di richiesta / risposta o simile.
Altri suggerimenti
Il nonce un nonce
e cnonce
assomigliare codici hash.
Un possibile meccanismo di difesa contro gli imbroglioni potrebbe essere questo:
def ps3client_send_score():
score = "bazillion points"
nonce = md5(score + "something you don't know about")
send_to_server(score, nonce)
Sul lato server:
def get_client_score(score, nonce):
if md5(score+"something you don't know about")==nonce:
accept_score(score)
else:
reject_score_and_ban_the_fool_if_he_continues_this()
Quindi, a meno che non si vuole spendere settimane cercando di trovare il sale nel profondo il vostro gioco, lascia perdere.