forked from mineek/openra1n
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4595a53
commit b0e6156
Showing
9 changed files
with
109 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
# openra1n | ||
custom pongoOS booter for checkra1n 1337 | ||
palera1n booter for windows / s8003 | ||
|
||
## Dumped image from palera1n v2.0.0 beta 7 | ||
- pongoOS_shellcode(already compressed).bin | ||
- checkra1n-kpf-ploosh.bin | ||
- ramdisk.bin | ||
- overlay.bin | ||
|
||
## Usage | ||
1. openra1n.exe | ||
2. python3 boot.py | ||
|
||
## Attributions | ||
- [openra1n](https://github.com/mineek/openra1n) - Origin of the project | ||
- [gaster](https://github.com/0x7ff/gaster) - base of the project | ||
- [checkra1n](https://checkra.in/) - yeah, do i really need to explain this one? | ||
- [ra1npoc15](https://github.com/kok3shidoll/ra1npoc) - payloads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright (C) 2019-2023 checkra1n team | ||
# This file is part of pongoOS. | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
# | ||
import sys | ||
import time | ||
import usb.core | ||
import struct | ||
|
||
kpf = open("payloads/checkra1n-kpf-ploosh.bin", "rb").read() | ||
rdsk = open("payloads/ramdisk.bin", "rb").read() | ||
overlay = open("payloads/overlay.bin", "rb").read() | ||
dev = usb.core.find(idVendor=0x05ac, idProduct=0x4141) | ||
if dev is None: | ||
raise ValueError('Device not found') | ||
dev.set_configuration() | ||
|
||
#fuse lock / sep auto | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "fuse lock\n") | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "sep auto\n") | ||
|
||
#Send kpf / modload | ||
dev.ctrl_transfer(0x21, 2, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 1, 0, 0, struct.pack('I', len(kpf))) | ||
dev.write(2,kpf,1000000) | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "modload\n") | ||
|
||
#kpf_flags 0x1 / checkra1n_flags 0x0 / palera1n_flags 0x0 | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "kpf_flags 0x1\n") | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "checkra1n_flags 0x0\n") | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "palera1n_flags 0x0\n") | ||
|
||
#Send ramdisk / ramdisk | ||
dev.ctrl_transfer(0x21, 2, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 1, 0, 0, struct.pack('I', len(rdsk))) | ||
dev.write(2,rdsk,1000000) | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "ramdisk\n") | ||
|
||
#Send overlay / overlay | ||
dev.ctrl_transfer(0x21, 2, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 1, 0, 0, struct.pack('I', len(overlay))) | ||
dev.write(2,overlay,1000000) | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "overlay\n") | ||
|
||
#xargs rootdev=md0 / bootx | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "xargs rootdev=md0\n") | ||
dev.ctrl_transfer(0x21, 4, 0, 0, 0) | ||
dev.ctrl_transfer(0x21, 3, 0, 0, "bootx\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.