Hacking Wii U Hacking & Homebrew Discussion

arbiter34

Member
Newcomer
Joined
May 19, 2009
Messages
19
Trophies
0
XP
148
Country
United States
FSA Return Values from documentation(language ripped from docs):

FSA_STATUS_OK 0

FSA_STATUS_NOT_INIT (-1) /* FSA service is not initialized */
FSA_STATUS_BUSY (-2) /* FSA shim or IPC was too busy */
FSA_STATUS_CANCELED (-3) /* Command canceled */
FSA_STATUS_END_OF_DIRECTORY (-4) /* Indicates end of directory */
FSA_STATUS_END_OF_FILE (-5) /* Indicates end of file */

FSA_STATUS_MAX_MOUNTPOINTS (-16) /* Reached to max number of mount points */
FSA_STATUS_MAX_VOLUMES (-17) /* Reached to max number of volumes */
FSA_STATUS_MAX_CLIENTS (-18) /* Reached to max number of clients */
FSA_STATUS_MAX_FILES (-19) /* Reached to max number of file handles */
FSA_STATUS_MAX_DIRS (-20) /* Reached to max number of dir handles */
FSA_STATUS_ALREADY_OPEN (-21) /* Target is already opened or locked by another transaction */
FSA_STATUS_ALREADY_EXISTS (-22) /* Target path already exists */
FSA_STATUS_NOT_FOUND (-23) /* Target path is not found */
FSA_STATUS_NOT_EMPTY (-24) /* Target path already exists */
FSA_STATUS_ACCESS_ERROR (-25) /* Attempted to access file with bad file mode */
FSA_STATUS_PERMISSION_ERROR (-26) /* Did not have permission to complete operation */
FSA_STATUS_DATA_CORRUPTED (-27) /* Cannot complete transaction due to corrupted data block */
FSA_STATUS_STORAGE_FULL (-28) /* Request would cause one of the ancestor directories to exceed its quota
/ Or no free space left in storage */
FSA_STATUS_JOURNAL_FULL (-29) /* Transaction journal is full, need to flush */

FSA_STATUS_UNSUPPORTED_CMD (-32) /* Operation is not supported by FS */
FSA_STATUS_INVALID_PARAM (-33) /* Specified parameter is invalid */
FSA_STATUS_INVALID_PATH (-34) /* Specified path is invalid */
FSA_STATUS_INVALID_BUFFER (-35) /* Specified buffer is invalid */
FSA_STATUS_INVALID_ALIGNMENT (-36) /* Specified alignment is invalid */
FSA_STATUS_INVALID_CLIENT_HANDLE (-37) /* Specified client handle is invalid */
FSA_STATUS_INVALID_FILE_HANDLE (-38) /* Specified file handle is invalid */
FSA_STATUS_INVALID_DIR_HANDLE (-39) /* Specified dir handle is invalid */
FSA_STATUS_NOT_FILE (-40) /* Specified path is directory instead of a file. */
FSA_STATUS_NOT_DIR (-41) /* Specified path is file instead of a directory. */
FSA_STATUS_FILE_TOO_BIG (-42) /* Request would push the file over the size limit (not the quota limit). */
FSA_STATUS_OUT_OF_RANGE (-43) /* Attempted to access out of accessible area */
FSA_STATUS_OUT_OF_RESOURCES (-44) /* Internal resources ran short */

FSA_STATUS_MEDIA_NOT_READY (-64) /* Medium is not ready to use, user has to put medium correctly */
FSA_STATUS_MEDIA_ERROR (-65) /* Medium is in some bad condition */
FSA_STATUS_WRITE_PROTECTED (-66) /* Medium is in some bad condition */

FSA_STATUS_SYSTEM_ERROR (-1024) /* Fatal system error, call FSAGetError() to get precise error codes */
 

Bug_Checker_

Well-Known Member
Member
Joined
Jun 10, 2006
Messages
950
Trophies
0
XP
664
Country
United States
Ok quick question so I can get a little bit of clarification:
There's a difference between rop410.txt
0x60 - Shellcode length 0x400
0xEC - Shellcode length 0x450
0x144 - Shellcode length 0x400

and mn1-build\stack.txt
0x60 - Shellcode length 0x8000
0xEC - Shellcode length 0x8000
0x144 - Shellcode length 0x8000

But isn't the true Shellcode length 0x34C or 844 bytes? Otherwise does it not clobber the values at 0x4FC and beyond?
 

Marionumber1

Well-Known Member
Member
Joined
Nov 7, 2010
Messages
1,234
Trophies
3
XP
4,045
Country
United States
Ok quick question so I can get a little bit of clarification:
There's a difference between rop410.txt
0x60 - Shellcode length 0x400
0xEC - Shellcode length 0x450
0x144 - Shellcode length 0x400

and mn1-build\stack.txt
0x60 - Shellcode length 0x8000
0xEC - Shellcode length 0x8000
0x144 - Shellcode length 0x8000

But isn't the true Shellcode length 0x34C or 844 bytes? Otherwise does it not clobber the values at 0x4FC and beyond?


The reason for making the shellcode length 0x8000 is a bit complicated, but I'll do my best to explain it. When you first visit the web hack, it will use the WebKit vulnerability to begin execution of our ROP chain. This ROP chain takes some shellcode embedded in our Javascript buffer, copies it to the JIT area, and executes it. However, this code copied to the JIT area is actually a very simple loader responsible for copying a larger amount of shellcode to the JIT. It searches for another Javascript buffer, denoted by 0xCAFECAFE at the beginning, and then patches the ROP chain to copy that buffer into the JIT and executes it again. There can be up to 0x8000 bytes of code in this buffer, meaning the amount of shellcode to copy has to be 0x8000.
 
  • Like
Reactions: Bug_Checker_

Bug_Checker_

Well-Known Member
Member
Joined
Jun 10, 2006
Messages
950
Trophies
0
XP
664
Country
United States
The reason for making the shellcode length 0x8000 is a bit complicated, but I'll do my best to explain it. When you first visit the web hack, it will use the WebKit vulnerability to begin execution of our ROP chain. This ROP chain takes some shellcode embedded in our Javascript buffer, copies it to the JIT area, and executes it. However, this code copied to the JIT area is actually a very simple loader responsible for copying a larger amount of shellcode to the JIT. It searches for another Javascript buffer, denoted by 0xCAFECAFE at the beginning, and then patches the ROP chain to copy that buffer into the JIT and executes it again. There can be up to 0x8000 bytes of code in this buffer, meaning the amount of shellcode to copy has to be 0x8000.

So the shellcode that is 1st loaded into the function sprayInc(n) at 0x1b0 is the loader from findcode.bin. If I understand correctly.
 

Snailface

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
2
Age
40
Location
Engine Room with Cyan, watching him learn.
XP
2,255
I've taken the browser exploit toolkit and modified it to use only one python script to manage the building process. No more sh scripts and cygwin.
Tested in Windows and Linux, python 2 or 3. Download here.
 

Attachments

  • Marionumber1-wiiu-userspace-python-build.zip
    21.6 KB · Views: 513

Bug_Checker_

Well-Known Member
Member
Joined
Jun 10, 2006
Messages
950
Trophies
0
XP
664
Country
United States
I've taken the browser exploit toolkit and modified it to use only one python script to manage the building process. No more sh scripts and cygwin.
Tested in Windows and Linux, python 2 or 3. Download here.


Google chrome now detects this as "Failed - Virus detected"
"Marionumber1-wiiu-userspace-python-build.zip Anti-virus software detected a virus."
"Antivirus software detected a virus. Your downloaded file may have a virus, as a result the file you attempted to download was removed by the Windows Attachment Manager"
Downloaded ok with Free Download Manager (FDM)

Only test410.html flags as virus in Windows Defender
containerfile:C:\Downloads\Marionumber1-wiiu-userspace-python-build\Marionumber1-wiiu-userspace-python-build\test410.html
file:C:\Downloads\Marionumber1-wiiu-userspace-python-build\Marionumber1-wiiu-userspace-python-build\test410.html->(SCRIPT0000)
 

Snailface

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
2
Age
40
Location
Engine Room with Cyan, watching him learn.
XP
2,255
Google chrome now detects this as "Failed - Virus detected"
"Marionumber1-wiiu-userspace-python-build.zip Anti-virus software detected a virus."
"Antivirus software detected a virus. Your downloaded file may have a virus, as a result the file you attempted to download was removed by the Windows Attachment Manager"
Downloaded ok with Free Download Manager (FDM)

Only test410.html flags as virus in Windows Defender
containerfile:C:\Downloads\Marionumber1-wiiu-userspace-python-build\Marionumber1-wiiu-userspace-python-build\test410.html
file:C:\Downloads\Marionumber1-wiiu-userspace-python-build\Marionumber1-wiiu-userspace-python-build\test410.html->(SCRIPT0000)
I removed the html file and it seems to be working now.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Google chrome now detects this as "Failed - Virus detected"
"Marionumber1-wiiu-userspace-python-build.zip Anti-virus software detected a virus."
"Antivirus software detected a virus. Your downloaded file may have a virus, as a result the file you attempted to download was removed by the Windows Attachment Manager"
Downloaded ok with Free Download Manager (FDM)

Only test410.html flags as virus in Windows Defender
containerfile:C:\Downloads\Marionumber1-wiiu-userspace-python-build\Marionumber1-wiiu-userspace-python-build\test410.html
file:C:\Downloads\Marionumber1-wiiu-userspace-python-build\Marionumber1-wiiu-userspace-python-build\test410.html->(SCRIPT0000)


Sounds like a false positive, I highly doubt the file/site was malicious ;)
 

Goku Junior

Well-Known Member
Member
Joined
Dec 27, 2013
Messages
951
Trophies
0
Age
23
Location
Buenos Aires, Argentina
XP
482
Country
Argentina
Marionumber1 , what is the point now? u make some more with your exploit? can u show some to us?
the porting on 5.* is in develop?

In the FAQ they say it need be ported to 5.0 first (if they work only for 4.1.0, think all the people will lost homebrew), after that they will work in using the exploit to load apps, but they need hack the kernel too.
 

NWPlayer123

Well-Known Member
Member
Joined
Feb 17, 2012
Messages
2,642
Trophies
0
Location
The Everfree Forest
XP
6,693
Country
United States
Like MN1 said earlier in one of these 5 different threads, we're kinda doing both, AFAIK we haven't done much with porting to v5 recently because it'd be easier to first get the keys using 4.1.0 so we can download the binaries from nintendo's server and make it easier (or ask someone who has fully hacked their console to get it for us). Doing it blind by bruteforcing the address with tons of resets and incrementing the address isn't much use, just like bruteforcing encryption isn't much use. We ARE looking for a kernel/loader exploit though, we thought we found one but it isn't exploitable, so we're still looking.
 

Goku Junior

Well-Known Member
Member
Joined
Dec 27, 2013
Messages
951
Trophies
0
Age
23
Location
Buenos Aires, Argentina
XP
482
Country
Argentina
Like MN1 said earlier in one of these 5 different threads, we're kinda doing both, AFAIK we haven't done much with porting to v5 recently because it'd be easier to first get the keys using 4.1.0 so we can download the binaries from nintendo's server and make it easier (or ask someone who has fully hacked their console to get it for us). Doing it blind by bruteforcing the address with tons of resets and incrementing the address isn't much use, just like bruteforcing encryption isn't much use. We ARE looking for a kernel/loader exploit though, we thought we found one but it isn't exploitable, so we're still looking.

No problem, thanks for all the work you two make, it is great! :) I don't have a new router yet so I don't have internet in my Wii U so it doesn't affect me you took more time :).
 

FPSRussi4

Well-Known Member
Member
Joined
Dec 1, 2013
Messages
671
Trophies
0
XP
609
Country
Laos
HAY GAIZ IS IT SAEF TO UPDAET TO VERSEEON FIEV YET!1!
In all seriousness, it sounds easier to work with version 4.1.0, why don't you guys find the keys, then focus on porting it to 5.0, or find the keys then keep looking for a kernel exploit?
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
HAY GAIZ IS IT SAEF TO UPDAET TO VERSEEON FIEV YET!1!
In all seriousness, it sounds easier to work with version 4.1.0, why don't you guys find the keys, then focus on porting it to 5.0, or find the keys then keep looking for a kernel exploit?


The section option isn't possible because you need a kernel/loader exploit to escalate privileges to GET THE KEYS which are stored in the Starbuck.
 

koalaboy13

Member
Newcomer
Joined
Jun 23, 2014
Messages
6
Trophies
0
XP
71
Country
United States
How did you end up choosing this particular use-after-free vuln? Comex said in the 30c3 talk that he had used a (probably heap) buffer overflow, though I'm guessing it was CVE-2012-3748 which was patched in 4.0.0. I would think that a heap overflow would be more useful because you could, like comex did, just dump memory though a JS array with a modified length and avoid trashing the browser too terribly.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Maximumbeans @ Maximumbeans:
    I can't believe you got me with that
    +1
  • SylverReZ @ SylverReZ:
    I haven't been gaming for such a long time. Been mostly busy with sleep, hardware tinkering and checking GBAtemp frequently.
  • SylverReZ @ SylverReZ:
    Hope you've had a good morning.
  • Maximumbeans @ Maximumbeans:
    It's going alright thanks :) I know what you mean with gaming time. It's precious where I can get it these days.
    +1
  • Maximumbeans @ Maximumbeans:
    I think that's why I focus on just enjoying single player experiences that aren't too competitive
  • Maximumbeans @ Maximumbeans:
    How are you doing?
  • SylverReZ @ SylverReZ:
    There's also this thing where I'm hyperfocused at night and cannot get to sleep.
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I'm doing alright, thanks.
    +1
  • Maximumbeans @ Maximumbeans:
    That must be rough. Productive I'm sure but hard to balance with daily life
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Indeed. I've been working on getting this Infecutus chip to work on my PS2. But after soldering, I realised that a plastic piece was missing from the power ribbon cable to the power and eject buttons.
  • SylverReZ @ SylverReZ:
    Now I could go with soldering the contacts from the cable to the connector on the mobo, but doesn't sound like a good permanent solution.
  • Maximumbeans @ Maximumbeans:
    Man, that's beyond my brain :rofl: I'm no good with hardware for now. I'd like to get into hardmods in future though
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Maybe start practice soldering. Get a cheap-ass soldering iron and follow some good YouTube tutorials.
    +1
  • SylverReZ @ SylverReZ:
    Least my experience has gotten better than over a decade ago. My iron would constantly bump into components and break them.
  • Maximumbeans @ Maximumbeans:
    Sounds good. I actually did soldering but like 16 years ago for school so uuuuh probably rusty haha
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Same here. I did soldering at school from a teacher who I honestly liked since he had plenty of good electronics experience.
    +1
  • Maximumbeans @ Maximumbeans:
    I wish I could play chess well
    +1
  • Maximumbeans @ Maximumbeans:
    Useless but a true art
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I had a friend who had a glass chess set for their birthday.
  • SylverReZ @ SylverReZ:
    It was like all clear and fancy. Tbf I'm not too experienced with chess, but would like to learn someday.
  • Maximumbeans @ Maximumbeans:
    That sounds really cool
  • Maximumbeans @ Maximumbeans:
    I know the basics but no strategy at all :rofl:
    Maximumbeans @ Maximumbeans: I know the basics but no strategy at all :rofl: