Skip to content

Commit

Permalink
v2
Browse files Browse the repository at this point in the history
  • Loading branch information
HotdogWithMustard committed Jul 2, 2018
1 parent cce862d commit 8b6c653
Show file tree
Hide file tree
Showing 19 changed files with 21,837 additions and 260 deletions.
Binary file modified ApplicationCache/ApplicationCache.db
Binary file not shown.
Binary file modified ApplicationCache/build/main.o
Binary file not shown.
4,185 changes: 4,185 additions & 0 deletions ApplicationCache/include/cache.h

Large diffs are not rendered by default.

253 changes: 7 additions & 246 deletions ApplicationCache/source/main.c
Original file line number Diff line number Diff line change
@@ -1,188 +1,16 @@
#include "ps4.h"
#include "patch.h"
#include "cache.h"

char ApplicationCache[] = "/user/system/webkit/webbrowser/appcache/ApplicationCache.db";

int ApplicationCacheLength = 1701888;
int Configuration = 1337;

char URL[10][128] =
{
"http://files.kkhost.pl/files/gen/ulO5M_fEM0/applicationcache.db",
"http://files.kkhost.pl/files/gen/57ihwPGf3_/applicationcache.db",
"http://files.kkhost.pl/files/gen/V9HSVhHZtm/applicationcache.db",
"http://files.kkhost.pl/files/gen/KrPhkgPpeJ/applicationcache.db",
"http://files.kkhost.pl/files/gen/5UvYRqYZsE/applicationcache.db",
"http://share.dmaster.ru/files/gen/kXvjrtWliI/8b1faabe05e697fee89c280406f426dfdb",
"http://share.dmaster.ru/files/gen/AVo5fCACuK/482d7b1e2fce188f71b1681a71ad5cfedb",
"http://share.dmaster.ru/files/gen/1SkAUGs3sr/192ee14ecec7ae160b06b2b778185ed1db",
"http://share.dmaster.ru/files/gen/zDrHlA4vmB/9fc9c7487e7c8b52f8c1278589bc0b05db",
"http://share.dmaster.ru/files/gen/D0gDKnNzCo/0bbe2e4120d7ebd167d5fb31fe9c84acdb"
};

int (*sceNetPoolCreate)(const char *name, int size, int flags);
int (*sceNetPoolDestroy)(int memid);
int (*sceNetResolverCreate)(const char *name, int memid, int flags);
int (*sceNetResolverDestroy)(int rid);
int (*sceNetResolverStartNtoa)(int rid, const char *hostname, struct in_addr *addr, int timeout, int retry, int flags);

void init(struct thread *Thread)
{
initKernel();
initLibc();
syscall(11, KernelPatch, Thread);
initNetwork();
initSysUtil();

RESOLVE(libNetHandle, sceNetPoolCreate);
RESOLVE(libNetHandle, sceNetPoolDestroy);
RESOLVE(libNetHandle, sceNetResolverDestroy);
RESOLVE(libNetHandle, sceNetResolverCreate);
RESOLVE(libNetHandle, sceNetResolverStartNtoa);
}

struct GetResponse
{
int Length;
int Status;
};

struct GetResponse GetRequest(char* URL, char* Buffer, int Length)
{
struct GetResponse Response = { 0, -1 };
int Socket = sceNetSocket("NetSocketGetRequest", AF_INET, SOCK_STREAM, 0);

if (Socket)
{
char Domain[256] = "";
char Path[2048] = "/";

strcat(Domain, URL);

for (int Index = 0; Index <= 1; Index++)
{
char* SubString = strstr(Domain, Index > 0 ? "/" : "://");

if (SubString)
{
if (Index > 0)
{
Index = SubString - Domain;

memcpy(Path, Domain + Index, strlen(Domain) - Index);
Domain[Index] = 0;
}
else
{
sprintf(Domain, "%s", SubString + 3);
}
}
}

struct sockaddr_in Server;

int NetPoolId = sceNetPoolCreate("NetPoolGetRequest", 16 * 1024, 0);
int ResolverId = sceNetResolverCreate("NetResolverGetRequest", NetPoolId, 0);
int ResolverResult = sceNetResolverStartNtoa(ResolverId, Domain, &Server.sin_addr, 2000000, 3, 0);

Response.Status--;

sceNetResolverDestroy(ResolverId);
sceNetPoolDestroy(NetPoolId);

if ((NetPoolId > -1) && (ResolverId > -1) && (ResolverResult > -1))
{
Server.sin_len = sizeof(Server);
Server.sin_family = AF_INET;
Server.sin_port = sceNetHtons(((strstr(URL, "s://")) || (strstr(URL, "S://")) ? 443 : 80));

memset(Server.sin_zero, 0, sizeof(Server.sin_zero));

sprintf(Buffer, "GET %s HTTP/1.1\r\n", Path);
sprintf(Buffer, "%sHost: %s\r\n", Buffer, Domain);
strcat(Buffer, "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\n");
strcat(Buffer, "Connection: close\r\n\r\n");

Response.Status++;

if (sceNetConnect(Socket, (struct sockaddr*) &Server, sizeof(Server)) > -1)
{
if (sceNetSend(Socket, Buffer, strlen(Buffer), 0) > -1)
{
int Index = 0;
int Received = 0;

char Recv[2048];
memset(Buffer, 0, Length);

while ((Received = sceNetRecv(Socket, Recv, sizeof(Recv), 0)) > 0)
{
Index = 0;

if (Response.Length + Received >= Length)
{
Response.Status = -3;
break;
}

if (Response.Length < 1)
{
char RecvTemp[2048];
memcpy(RecvTemp, Recv, Received);

for (int I = 0; I < Received; I++)
{
if ((RecvTemp[I] > 64) && (RecvTemp[I] < 91))
{
RecvTemp[I] += 32;
}
}

char* SubStr = strstr(RecvTemp, "location: ");

if (SubStr)
{
Index = (SubStr - RecvTemp) + 10;
SubStr = strstr(Recv + Index, "\r\n");

if (!SubStr)
{
break;
}

char Loc[2048];
memcpy(Loc, Recv + Index, (SubStr - Recv) - Index);

sceNetSocketClose(Socket);
return GetRequest(Loc, Buffer, Length);
}

SubStr = strstr(Recv, "\r\n\r\n");

if (SubStr)
{
Index = (SubStr - Recv) + 4;
}

Response.Status = 0;

for (int I = 9; I < 12; ++I)
{
Response.Status = Response.Status*10+Recv[I]-'0';
}
}

memcpy(Buffer + Response.Length, Recv + Index, Received - Index);
Response.Length += Received - Index;
}
}
}
}

sceNetSocketClose(Socket);
}

return Response;
}

void GetUserId(char* Buffer)
Expand Down Expand Up @@ -213,7 +41,7 @@ void SystemMessage(char* Input)
sceSysUtilSendSystemNotificationWithText(0xDE, Input);
}

int WriteFile(char* File, char* Buffer, int Length)
int WriteFile(char* File, unsigned char* Buffer, unsigned int Length)
{
char Directory[256];
memcpy(Directory, File, strlen(File));
Expand Down Expand Up @@ -268,82 +96,15 @@ int _main(struct thread *Thread)
}
}

char* Buffer;
int Length = 5242880;

Buffer = (char*) malloc(Length);

if (Buffer)
{
struct GetResponse Response = { 0, 0 };
SystemMessage("Attempting to download file... Please wait...");

for (int Index = 0; Index < sizeof(URL) / sizeof(URL[0]); Index++)
{
Response = GetRequest(URL[Index], Buffer, Length);

if (Response.Status == 200)
{
if (Response.Length != ApplicationCacheLength)
{
Response.Status = -4;
continue;
}

if (WriteFile(ApplicationCache, Buffer, Response.Length) == -1)
{
Response.Status = -5;
}

break;
}
}
SystemMessage("Attempting to create file...\nPlease wait...");

switch (Response.Status)
{
case -1:
{
SystemMessage("ERROR: Unable to create socket.");
break;
}
case -2:
{
SystemMessage("ERROR: Unable to perform DNS lookup.");
break;
}
case -3:
{
SystemMessage("ERROR: Response exceeds buffer length.");
break;
}
case -4:
{
SystemMessage("ERROR: File size mismatch.");
break;
}
case -5:
{
SystemMessage("ERROR: Unable to create file.");
break;
}
case 200:
{
SystemMessage("Done.");
break;
}
default:
{
char Log[128];
sprintf(Log, "ERROR: Received invalid status code. (%d)", Response.Status);
SystemMessage(Log);
}
}

free(Buffer);
if (WriteFile(ApplicationCache, ApplicationCache_db, ApplicationCache_db_len) != -1)
{
SystemMessage("Done.");
}
else
{
SystemMessage("ERROR: Failed to allocate memory.");
SystemMessage("ERROR: Unable to create file.");
}

return 0;
Expand Down
1 change: 1 addition & 0 deletions Exploits/App2USB.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Exploits/Backup.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Exploits/Disable Updates.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[38633,2303218432,3967895802,512,993365320,1207959563,3224496009,289805823,2303197184,14598118,369033216,4024,12878152,1526726658,1200310467,8567048,2336800768,2336768112,839862392,1221691720,18388619,3242721280,155721953,71747528,0,29371720,1187446784,8,340182784,0,711,2336751616,159817872,1451837441,2156611632,36444784,541559112,407341384,1405337649,3908798792,1760,124904,3666429952,2251656520,3221225471,11,1709752369,3892314122,362,2319289672,3892314122,134,2117963080,3892314122,254,199102,1032669184,2669,57832,1032669184,2688,24040,1032669184,2676,54760,50970112,2370306048,680765,12118016,2370306048,683325,4276348928,3224502271,3343434587,960,167110912,3343384576,1216,166324480,3343384576,1472,165538048,3343384576,1728,164751616,3343384576,2752,163965184,3343384576,2496,163178752,3343384576,15040,162392320,3343384576,14784,161605888,3343384576,5568,160819456,3343384576,96960,160033024,3343384576,5824,159246592,3343384576,31680,158460160,3343384576,31936,157673728,3343384576,32960,156887296,3343384576,35008,156100864,3343384576,35264,155314432,3343384576,48320,154528000,3343384576,48576,153741568,3343384576,48832,152955136,3343384576,69824,152168704,3343384576,122560,151382272,3343384576,126400,150595840,3375431680,835858768,1032669430,2400,1170813253,369082417,4136,361580633,3480,1798671688,2298478601,59847,3343384576,151488,146663680,3343384576,151744,145877248,2303197184,3526447345,1174309192,1388298289,822083586,144107712,3277455360,3375449427,834679109,835858889,1032669430,2375,264639999,2370306048,882453,898451456,2379,3347694473,4294942184,1222609407,251008397,2370306048,604469,4287162368,3750363135,1897237832,1207959565,153695629,1944584192,2315255807,361580767,3532,456494408,3892314121,4294967134,2370363273,939797,898451456,2318,4294920680,1222609407,235017613,2370306048,590389,4281657344,3750363135,3709177160,1207959564,150222221,535298048,2315255807,361580767,3464,3862269256,3892314120,4294967050,2370363273,824085,898451456,2264,4294899176,1222609407,222696845,2370306048,576053,4276152320,3750363135,4044721480,1207959564,146617741,3420979200,2315255806,361580767,3396,2939522376,3892314120,4294966966,2370363273,913173,898451456,2210,4294877672,1222609407,227153293,2370306048,562229,4270647296,3750363135,3574959432,1207959564,143013261,2011693056,2315255806,361580767,3448,2033552712,3892314120,4294966882,2370363273,787221,898451456,2156,4294856168,1222609407,213783949,2370306048,548917,4265142272,3750363135,2031455560,1207959565,139605389,602406912,2315255806,361580767,3076,1144360264,3892314120,4294966798,2370363273,800533,898451456,2103,4294834664,1222609407,210376077,2370306048,534837,4259637248,3750363135,2098564424,1207959564,136066445,3488088064,2315255805,361580767,3008,104172872,3892314120,4294966714,2370363273,840469,898451456,2040,4294813160,1222609407,214832525,2370306048,518965,4254132224,3750363135,3507850568,1207959563,131806605,2078801920,2315255805,361580767,2836,3459616072,3892314119,4294966630,2370363273,745237,898451456,1986,4294791656,1222609407,198841741,2370306048,505909,4248627200,3750363135,2635435336,1207959563,128595341,669515776,2315255805,361580767,3056,2603978056,3892314119,4294966546,2370363273,738069,898451456,1927,4294770152,1222609407,177083789,2370306048,489269,4243122176,3750363135,2434108744,1207959563,124401037,3555196928,2315255804,361580767,2780,1328909640,3892314119,4294966462,2370363273,771861,898451456,1858,4294748648,1222609407,193074573,2370306048,468533,4237617152,3750363135,3306523976,1207959563,119551373,2145910784,2315255804,361580767,2928,305499464,3892314119,4294966378,2370363273,727829,898451456,1798,4294727144,1222609407,191239565,2370306048,457525,4232112128,3750363135,1628802376,1207959562,116536717,736624640,2315255804,361580767,2828,3828714824,3892314118,4294966294,2370363273,651029,898451456,1751,4294705640,1222609407,164238733,2370306048,444981,4226607104,3750363135,1024822600,1207959563,113194381,3622305792,2315255803,361580767,2440,2989854024,3892314118,4294966210,2370363273,621333,898451456,1701,4294684136,1222609407,183899533,2370306048,432693,4221102080,3750363135,3507850568,1207959561,109983117,2213019648,2315255803,361580767,2388,2134216008,3892314118,4294966126,2370363273,659221,898451456,1654,4294662632,1222609407,165287309,2370306048,419637,4215597056,3750363135,1695911240,1207959562,106444173,803733504,2315255803,361580767,2376,1245023560,3892314118,4294966042,2370363273,645909,898451456,1595,4294641128,1222609407,165025165,2370306048,404533,4210092032,3750363135,361580635,2288,490048840,3909091334,4294965978,1295355208,1375731722,289246536,1207959558,179439047,0,3555196928,2248146938,1210741952,170538381,2370306048,392765,4206684160,3230007295,2370311028,660277,1032669184,1530,4294616552,20810751,1207959562,167908749,2370306048,390197,4201965568,1032585215,2536,555060552,1207959562,99431821,1541931008,2348810234,642877,361580544,2624,3845492040,3892314117,4294965826,162938251,2370306048,657173,898451456,1492,4294584808,2638056447,1207959561,170792333,2370306048,379445,4195411968,1032585215,2436,1024822600,1207959562,97138061,4159176704,2348810233,617277,361580544,2476,3476393288,3892314117,4294965726,156384651,2370306048,645909,898451456,1487,4294559208,960334847,1207959561,169481613,2370306048,377909,4188858368,1032585215,2336,2165673288,1207959561,96023949,2481455104,2348810233,591677,361580544,2440,2922745160,3892314117,4294965626,149831051,2370306048,624405,898451456,1444,4294533608,3577580543,1207959560,149820813,2370306048,367157,4182304768,1032585215,2236,2098564424,1207959561,93336973,803733504,2348810233,566077,361580544,2188,2268433736,3892314117,4294965526,143277451,2370306048,602901,898451456,1412,4294508008,1899858943,1207959560,143791501,2370306048,361269,4175751168,1032585215,2136,2970979656,1207959560,92353933,3420979200,2348810232,540477,361580544,2360,1865780552,3892314117,4294965426,136723851,2370306048,552725,898451456,1379,4294482408,222137343,1207959560,135665037,2370306048,348725,4169197568,1032585215,2036,3306523976,1207959560,88094093,1743257600,2348810232,514877,361580544,2172,875924808,3892314117,4294965326,130170251,2370306048,563989,898451456,1330,4294456808,2839383039,1207959559,131208589,2370306048,339765,4162643968,1032585215,1936,1494584648,1207959560,86783373,65536000,2348810232,489277,361580544,2152,691375432,3892314117,4294965226,123616651,2370306048,495381,898451456,1318,4294431208,1161661439,1207959559,120984973,2370306048,332853,4156090368,1032585215,1836,1024822600,1207959559,84030861,2682781696,2348810231,463677,361580544,2044,4030041416,3892314116,4294965126,117063051,2370306048,488213,898451456,1246,4294405608,3778907135,1207959558,127014285,2370306048,314421,4149536768,1032585215,1736,823496008,1476395015,3140848968,3909091332,4294965050,1237332296,84920969,1220739442,119094659,1946157056,369053720,1808,1208519001,4294951111,3343450111,4294967234,1931854847,1886727936,1702125924,877875247,1094996053,1345209684,1848528981,1949201509,7368037,1685091631,795178081,1429492560,1413563472,1431318085,1766064208,1818386803,1428186213,1952539760,2192229,1937339183,795698548,1835888483,1815047791,1815044713,1666409065,1937331045,1818850389,1919972142,1668481144,1937331045,1818850389,1684956499,1953724755,1867410789,1768319348,1769234787,1767337583,1700030580,1811969144,1666409065,1651068005,1953384803,1634628197,1886596716,1828747378,1869376609,1919287395,1660970341,1869376609,1701970019,1869376609,1701642339,1768710509,1828744807,1702063461,1701642356,2037408621,1835363584,7368035,1668445299,1929410928,1668182644,1929410928,1633907316,1953693812,1633906290,1953693812,1852140658,1920234240,7368035,1852994675,7368035,1769107571,6714478,1919970931,1718906473,1668510464,6712929,1668445299,1929409128,1668444788,1929409128,1953722996,1953693810,1886741618,1852404224,7890276,1768190825,7629159,1768911969,1920234240,2037408620,1920234240,1869771365,1197408370,1668314213,1701869940,1951620864,7107951,1886348130,1920139385,6581857,1952674657,6647145,1952674657,1600482665,1835466866,1701669236,1953326848,1600482665,1869348979,1953259875,6647145,1633906540,1835627628,7495525,1769237357,1862296941,1684956528,1912631913,1684300133,1912631913,1684300133,1918857833,1818588160,1919509612,1701147392,1919509611,2003137024,1684303465,1660973673,1702063980,7498084,1718774116,1701249124,1869770868,1835101799,1868955749,7234928,1634038374,2003173476,1702127986,1702061568,1711303525,1819043188,1818453504,6648687,1769107558,6714478,1801611628,1701737061,1886596716,1811970162,1701536361,1818586738,1650816863,1919972142,1768685688,1919249250,1600939374,779319667,2020765811,1935630080,1801675124,1802003295,1635084127,1593861234,1635021663,1667197795,1717529448,7104865,1919246175,7499634,1264935795,1701737061,1920091500,1929409135,1699439971,1818586738,1684107084,1918989395,1685015924,6646901,1264935795,1701737061,1819033964,1952539503,1919501413,1299473253,1919905125,1668481145,1919241061,1298949486,1766092897,1952671090,1869440333,1929410930,1699439971,1818586738,1952543827,1701016320,1852990795,1884253285,1929408101,1699439971,1818586738,1684104530,1701016320,1852990795,1934388325,7038309,1264935795,1701737061,1869366124,1929405811,1699439971,1818586738,1701145683,1668481136,1919241061,1433167214,1701145715,1668481136,1919241061,1198286190,1769239653,1718576493,7954788,1264935795,1701737061,1952794476,1668248144,1416852325,6647145,1264935795,1701737061,1952794476,1920103747,1131703909,1929409904,1952674681,2037579884,1819566963,1634629986,1929405805,1918989177,1694525539,1986225528,1953497189,1634038376,1702059876,1879074412,1701996660,1935631457,1717662821,1768843622,1851750772,1668481136,1919241061,1131177326,1952540018,1970357605,6649189,1264935795,1701737061,1818575980,1164276837,1969583473,1668481125,1919241061,1097622894,1934976100,1984262757,7630437,1264935795,1701737061,1684291948,1684104530,1852143173,1701249140,1684632948,1952802560,6580583,1886676327,1929405545,1769305189,1702035556,1684629364,1952805632,1769301362,1702035556,1734701684,25705]
1 change: 1 addition & 0 deletions Exploits/Dumper.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Exploits/FTP.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Exploits/HEN.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Exploits/Index.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["App2USB","Backup","Disable Updates","Dumper","FTP","HEN","Mira+HEN","Original","ReactPSPlus"]
Loading

0 comments on commit 8b6c653

Please sign in to comment.