├── .gitignore
├── README.md
├── babel.config.js
├── blog
├── 2024-11-28-capibarazero-0-5-1-out.md
└── authors.yml
├── docs
├── esp32_s3
│ ├── _category_.json
│ ├── appsjs
│ │ ├── API.md
│ │ ├── _category_.json
│ │ ├── display_color.md
│ │ ├── load_script.md
│ │ └── widget_type.md
│ ├── badusb
│ │ ├── _category_.json
│ │ ├── getting_started.md
│ │ └── run_payload.md
│ ├── bluetooth
│ │ ├── _category_.json
│ │ ├── ble_sniffer.md
│ │ ├── ble_spam
│ │ │ ├── _category_.json
│ │ │ ├── apple_juice.md
│ │ │ ├── fastpair_ble_spam.md
│ │ │ ├── samsung_ble_spam.md
│ │ │ └── swiftpair_ble_spam.md
│ │ └── hid_attack.WIP
│ ├── boards
│ │ ├── ArduinoNanoESP32.md
│ │ ├── ESP32S3.md
│ │ ├── LilyGo_T_Embed_CC1101.md
│ │ ├── _category_.json
│ │ ├── box
│ │ │ ├── Box.md
│ │ │ └── _category_.json
│ │ └── getting_started.md
│ ├── development
│ │ ├── _category_.json
│ │ ├── code_structure.md
│ │ └── new_porting.md
│ ├── installation
│ │ ├── _category_.json
│ │ ├── from_release.md
│ │ ├── from_source.md
│ │ └── web_flasher.md
│ ├── ir
│ │ ├── _category_.json
│ │ ├── emulate_signal.md
│ │ ├── rc_emulator.md
│ │ └── record_signal.md
│ ├── network_attacks
│ │ ├── _category_.json
│ │ ├── arp_poisoner.mdx
│ │ ├── dhcp_starvation.md
│ │ └── evilportal.md
│ ├── nfc
│ │ ├── _category_.json
│ │ ├── clone_tag.WIP
│ │ ├── create_key.md
│ │ ├── dump_tag_sd.md
│ │ ├── emv_read.md
│ │ ├── getting_started.md
│ │ └── write_nfc.md
│ ├── sdcard_structure.md
│ ├── subghz
│ │ ├── _category_.json
│ │ ├── frequency_analyzer.md
│ │ ├── raw_record.md
│ │ └── sender.md
│ └── wifi
│ │ ├── _category_.json
│ │ ├── scan_wifi.md
│ │ └── wifi_sniffer.md
├── intro.md
└── sbc_linux
│ ├── _category_.json
│ ├── bluetooth
│ ├── _category_.json
│ ├── ble_scan.md
│ ├── ble_sniffer.WIP
│ ├── ble_spam
│ │ ├── _category_.json
│ │ ├── apple_juice.md
│ │ ├── fastpair_ble_spam.md
│ │ ├── samsung_ble_spam.WIP
│ │ └── swiftpair_ble_spam.md
│ └── hid_attack.WIP
│ ├── installation
│ ├── _category_.json
│ └── installation.md
│ ├── intro.md
│ ├── ir
│ ├── _category_.json
│ ├── emulate_signal.md
│ └── record_signal.md
│ ├── network_attacks
│ ├── _category_.json
│ ├── arp_scanner.md
│ └── dhcp_starvation.md
│ ├── nfc
│ ├── _category_.json
│ ├── clone_tag.WIP
│ └── getting_started.md
│ └── wifi
│ ├── _category_.json
│ ├── beacon_spam.md
│ ├── evilportal.md
│ ├── monitor_mode.md
│ ├── scan_wifi.md
│ └── wifi_sniffer.md
├── docusaurus.config.ts
├── package-lock.json
├── package.json
├── scheme
├── GMT020-02 TFT Display.fzpz
├── board.fzz
├── capibara_arduino_nano_esp32.fzz
└── esp32_s3_fritzing_part
│ └── Untitled Sketch 3_bb.svg
├── sidebars.ts
├── src
├── components
│ └── mac_to_json.jsx
├── css
│ └── custom.css
└── pages
│ └── index.md
├── static
├── .nojekyll
├── .well-known
│ └── matrix
│ │ └── server
├── example_config
│ ├── arp_poisoner
│ │ └── example.json
│ └── dhcp_glutton
│ │ └── config.json
└── img
│ ├── boards
│ ├── arduino_nano_esp32.png
│ ├── arduino_nano_esp32_breadboard.png
│ ├── board_bb.png
│ ├── esp32_s3_devkitc.png
│ └── lilygo_t_embed_cc1101.png
│ ├── favicon.ico
│ ├── logo.png
│ ├── screens
│ ├── badusb
│ │ └── badusb_file_explorer.png
│ ├── network_attacks
│ │ ├── dhcp_glutton.png
│ │ └── evilportal.png
│ ├── nfc
│ │ ├── bruteforce_tag.png
│ │ └── dump_tag.png
│ ├── wifi
│ │ ├── wifi_details.png
│ │ ├── wifi_network_save.png
│ │ └── wifi_sniff.png
│ └── wifi_scanning.png
│ ├── undraw_docusaurus_mountain.svg
│ ├── undraw_docusaurus_react.svg
│ └── undraw_docusaurus_tree.svg
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 |
4 | # Production
5 | /build
6 |
7 | # Generated files
8 | .docusaurus
9 | .cache-loader
10 |
11 | # Misc
12 | .DS_Store
13 | .env.local
14 | .env.development.local
15 | .env.test.local
16 | .env.production.local
17 |
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CapibaraZero docs
2 |
3 | Here live the repository for the capibaraZero documentation. It's built with Docusaurus and hosted on GitHub Pages.
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/blog/2024-11-28-capibarazero-0-5-1-out.md:
--------------------------------------------------------------------------------
1 | ---
2 | slug: capibarazero-0-5-1-out
3 | title: CapibaraZero 0.5.1 is out!
4 | authors: andreock
5 | tags: [new_version, firmware, lilygo_t_embed_cc1101]
6 | ---
7 |
8 | The latest release bring new features and new board support!
9 |
10 | Download it and flash it now!
11 |
12 |
13 |
14 | After almost 2 months of development CapibaraZero 0.5.1 is finally out!
15 |
16 | Here are a list of new features:
17 |
18 | - BadUSB: Add support to ATTACKMODE(HID or MSC)
19 | - NFC: Add write and format feature for MIFARE tags
20 | - GUI: Use hardware SPI(make it faster)
21 | - File browser: Make page scrollable
22 | - Support LilyGo T-Embed CC1101
23 | - Fix various crash
24 |
25 | ## NFC changes
26 |
27 | You can use dump from FlipperZero to write your favorite MIFARE tag or use the capibaraZero's file format if you want to customise the key for specific tag.
28 |
29 | ## GUI changes
30 |
31 | GUI transition will be smoother with faster response time
32 |
33 | ## File browser changes
34 |
35 | CapibaraZero isn't limited to 4-5 files for IR emulator or BadUSB anymore! You can upload many files as you want without any limit!
36 |
37 | ## LilyGo T-Embed CC1101
38 |
39 | CapibaraZero support LilyGo T-Embed CC1101! It's a great board with a really nice case and a good battery life. Perfect to make a portable capibaraZero without building PCB or printing case!
40 |
41 | Join discussion at:
42 |
43 | - [Matrix](https://matrix.to/#/#capibarazero:capibarazero.com)
44 | - [Discord](https://discord.gg/77f3BHvnhf)
45 |
--------------------------------------------------------------------------------
/blog/authors.yml:
--------------------------------------------------------------------------------
1 | andreock:
2 | name: Andrea Canale
3 | title: Maintainer of CapibaraZero
4 | url: https://github.com/andreock
5 | image_url: https://github.com/andreock.png
--------------------------------------------------------------------------------
/docs/esp32_s3/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "ESP32-S3",
3 | "position": 2,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "capibaraZero docs for ESP32-S3 platform"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/appsjs/API.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: API
4 | ---
5 |
6 | # JS API for the scripts section
7 |
8 | ## WiFi
9 |
10 | ---
11 | - ``` wifi_scan() ```
12 |
13 | **Description: Start a scan and return result**
14 |
15 | **Return: JSON string with scan result**
16 |
17 | ---
18 |
19 | - ``` wifi_sniff(delay, path) ```
20 |
21 | **Description: Start a sniff and save pcap to path**
22 |
23 | **Params:**
24 | - Delay: Time between switching channels
25 | - Path: Path where save the PCAP
26 |
27 | **Return: null**
28 |
29 | ---
30 |
31 | - ``` wifi_sniffer_stop() ```
32 |
33 | **Description: Stop the sniffer**
34 |
35 | **Return: null**
36 |
37 | ## BadUSB
38 |
39 | - ```init_badusb() ```
40 |
41 | **Description: Initialize ESP USB as HID**
42 |
43 | **Return: null**
44 |
45 | ---
46 |
47 | - ```init_msc(vendor_id, product_id. product_rev) ```
48 |
49 | **Description: Initialize ESP USB as MSC**
50 |
51 | **Params(optionals):**
52 | - Vendor ID: Vendor ID for HID interface
53 | - Product ID: Product ID for HID interface
54 | - Product revision: Product revision for HID interface
55 |
56 | **Return: null**
57 |
58 | ---
59 |
60 | - ```print_string(str) ```
61 |
62 | **Description: Send string to connected device**
63 |
64 | **Params:**
65 | - str: String that will be wrote on the connected device
66 |
67 | **Return: null**
68 |
69 | ---
70 |
71 | - ```mouse_press() ```
72 |
73 | **Description: Send click to PC**
74 |
75 | **Return: null**
76 |
77 | ---
78 |
79 | - ```mouse_set_coordinate(x, y) ```
80 |
81 | **Description: Set position to mouse**
82 |
83 | **Params:**
84 | - x: X position
85 | - y: Y position
86 |
87 | **Return: null**
88 |
89 | ---
90 |
91 | - ```release(key) ```
92 |
93 | **Description: Release a key**
94 |
95 | **Params:**
96 | - key: Key code of key to release
97 |
98 | **Return: null**
99 |
100 | ---
101 |
102 | - ```release_all() ```
103 |
104 | **Description: Release all keys**
105 |
106 | **Return: null**
107 |
108 | ---
109 |
110 | - ```press(key) ```
111 |
112 | **Description: Press a key**
113 |
114 | **Params:**
115 | - Key: Char code of the key to press
116 |
117 | **Return: null**
118 |
119 | ---
120 |
121 | - ```press_raw(key) ```
122 |
123 | **Description: Press a raw key**
124 |
125 | **Params:**
126 | - Key: Key code to press
127 |
128 | **Return: null**
129 |
130 | ## BLE
131 |
132 |
133 | - ``` init_ble_js() ```
134 |
135 | **Description: Initialize BLE stack**
136 |
137 | **Return: null**
138 |
139 | ---
140 |
141 | - ``` start_applejuice() ```
142 |
143 | **Description: Start AppleJuice attack**
144 |
145 | **Return: null**
146 |
147 | ---
148 |
149 | - ``` start_fastpair() ```
150 |
151 | **Description: Start FastPair attack**
152 |
153 | **Return: null**
154 |
155 | ---
156 | - ``` start_swift_pair() ```
157 |
158 | **Description: Start SwiftPair attack**
159 |
160 | **Return: null**
161 |
162 | ---
163 | - ``` sniff_ble() ```
164 |
165 | **Description: Start a BLE Sniffer**
166 |
167 | **Return: null**
168 |
169 | ---
170 | - ``` randomize_mac_addr() ```
171 |
172 | **Description: Randomize BLE MAC Address**
173 |
174 | **Return: null**
175 |
176 | ## GUI
177 |
178 | Some GUI primitives to create interactive application.
179 |
180 | - ```create_text_widget(text_color, str, size, text_wrap, x_pos, y_pos, display) ```
181 |
182 | **Description: Create and show a Text widget**
183 |
184 | **Params:**
185 | - Text color: Color of the text. Please follow this [table](/docs/esp32_s3/appsjs/display_color) to put the correct value.
186 | - String: Text to be printed on the display
187 | - Size(integer): Text size.
188 | - Text wrap(boolean): If the width of the display doesn't contains the string, the text will be wrapped.
189 | - X position(integer): Coordinate on X axis where place the text
190 | - Y position(integer): Coordinate on Y axis where place the text
191 | - Display(boolean): Whether display the text or not
192 |
193 | **Return: A Text object**
194 |
195 | ---
196 |
197 | - ```set_text(text_ptr, str) ```
198 |
199 | **Description: Set text of a Text widget**
200 |
201 | **Params:**
202 | - Text ptr: Pointer to the Text widget. Can be found in `text.ptr` assuming `text` is the variable where you store the text widget.
203 | - String: Text to be wrote in widget
204 |
205 | **Return: null**
206 |
207 | ---
208 |
209 | - ```text_set_position(text_ptr, x, y) ```
210 |
211 | **Description: Set position of a Text widget**
212 |
213 | **Params:**
214 | - Text ptr: Pointer to the Text widget. Can be found in `text.ptr` assuming `text` is the variable where you store the text widget.
215 | - X pos: X position where the widget will be moved
216 | - Y pos: Y position where the widget will be moved
217 |
218 | **Return: null**
219 |
220 | ---
221 |
222 | - ```create_grid_widget(rows, cols) ```
223 |
224 | **Description: Create and show a Grid widget**
225 |
226 | **Params:**
227 | - Rows: Rows in the grid container
228 | - Cols: Cols in the grid container
229 |
230 | **Return: A Grid object**
231 |
232 | ---
233 |
234 | - ```grid_add_widget(widget_ptr) ```
235 |
236 | **Description: Add a generic widget to the grid**
237 |
238 | **Params:**
239 | - Widget pointer: A pointer reference to widget(can be found under ptr property of a widget object)
240 |
241 | **Return: null**
242 |
243 | ---
244 |
245 | - ```grid_set_selected(pos, status) ```
246 |
247 | **Description: Move the selection to specified position**
248 |
249 | **Params:**
250 | - Position(number): Index of the widget to be selected
251 | - Status(boolean): Whether select or deselect the widget
252 |
253 | **Return: null**
254 |
255 | ---
256 |
257 | - ```grid_set_y_spacing(y_spacing) ```
258 |
259 | **Description: Set grid vertical spacing**
260 |
261 | **Params:**
262 | - Y spacing(integer): Y(vertical) spacing
263 |
264 | **Return: null**
265 |
266 | ---
267 |
268 | - ```grid_set_space_betweem(space_between) ```
269 |
270 | **Description: Set grid horizontal spacing**
271 |
272 | **Params:**
273 | - space_between(integer): Horizontal spacing
274 |
275 | **Return: null**
276 |
277 | ---
278 |
279 | - ```grid_display() ```
280 |
281 | **Description: Display the grid**
282 |
283 | **Return: null**
284 |
285 | ---
286 |
287 | - ```create_list_widget(text, font_size, font_color, height, rect_color, uid) ```
288 |
289 | **Description: Create a List(button) widget**
290 |
291 | **Params:**
292 | - Text(string): Text that will be showed inside button
293 | - Font size(number): Font size for the text
294 | - Font color(Color): [ST7789 color](/docs/esp32_s3/appsjs/display_color.md) for the Text
295 | - Height(number): Height of the widget
296 | - Rect color(Color): Color of the widget
297 | - Unique ID: ID for your widget. MUST BE UNIQUE. It will be used to call callback.
298 |
299 | **Return: null**
300 |
301 | You can create the callback using this snippets:
302 |
303 | ```js
304 | global.LIST_UID_on_click = function () { // Replace with your real UID
305 | // Your JS code
306 | }
307 | ```
308 |
309 | When the list widget will be clicked, this function will be called.
310 |
311 | ---
312 |
313 | - ```goto_main_gui() ```
314 |
315 | **Description: Close current app and return to main page**
316 |
317 | **Return: null**
318 |
319 | ## IO
320 |
321 | - ```pinMode(pin, mode) ```
322 |
323 | **Description: Porting to JS of arduino-esp32 pinMode**
324 |
325 | **Return: null**
326 |
327 | ---
328 |
329 | - ```digitalWrite(pin, value) ```
330 |
331 | **Description: Porting to JS of arduino-esp32 digitalWrite**
332 |
333 | **Return: null**
334 |
335 | ---
336 |
337 | - ```digitalRead(pin) ```
338 |
339 | **Description: Porting to JS of arduino-esp32 digitalRead**
340 |
341 | **Return: uint16**
342 |
343 | ---
344 |
345 | - ```print(str) ```
346 |
347 | **Description: JS wrapper for Serial.println()**
348 |
349 | **Return: null**
350 |
351 | ---
352 |
353 | - ```now() ```
354 |
355 | **Description: Return milliseconds from MCU startup**
356 |
357 | **Return: uint32**
358 |
359 | ---
360 |
361 | - ```delay(time) ```
362 |
363 | **Description: JS wrapper for delay()**
364 |
365 | **Return: null**
366 |
367 | ## IR
368 |
369 | ---
370 | - ``` init_ir() ```
371 |
372 | **Description: Initialize IR stack**
373 |
374 | **Return: null**
375 |
376 | ---
377 | - ``` read_ir() ```
378 |
379 | **Description: Read IR signal**
380 |
381 | **Return: null**
382 |
383 | ---
384 | - ``` ir_signal_to_str() ```
385 |
386 | **Description: Return a JSON string of recorded signal**
387 |
388 | **Return: JSON string of recorded signal**
389 |
390 | ---
391 | - ``` send_ir_protocol(protocol, addr, cmd) ```
392 |
393 | **Description: Send an IR signal**
394 |
395 | **Params:**
396 | - Protocol: Protocol number following [this format](http://localhost:3000/docs/ir/emulate_signal#protocol-number)
397 | - Addr: Address
398 | - Cmd: Command
399 |
400 | **Return: null**
401 |
402 |
413 |
414 | ## NFC
415 |
416 | - ```nfc_read_uid_iso14443a() ```
417 |
418 | **Description: Read UID of ISO14443A card**
419 |
420 | **Return: An array rappresenting the UID(4-7 bytes)**
421 |
422 | ## Storage
423 |
424 | - ```write_to_sd(path, str) ```
425 |
426 | **Description: Write a string to file to SD**
427 |
428 | **Params:**
429 | - Path: Path where save the file. Must start with "/sd/"
430 | - Str: String to write on file
431 |
432 | **Return: null**
433 |
434 | ---
435 |
436 | - ```read_from_sd(path) ```
437 |
438 | **Description: Write a string to file to SD**
439 |
440 | **Params:**
441 | - Path: Path where save the file. Must start with "/sd/"
442 | - Str: String to write on file
443 |
444 | **Return: String with content of the file. If file is missing will be returned an empty string**
445 |
--------------------------------------------------------------------------------
/docs/esp32_s3/appsjs/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "AppsJS",
3 | "position": 8,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "Extend your capibaraZero functionality with AppsJS!"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/appsjs/display_color.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: Display colors
4 | ---
5 |
6 | Here is a table with the colors supported by the ST7789 display:
7 |
8 | | Color | Hex | Int value |
9 | |:-------:|:------:| :----: |
10 | | Black | 0x0000 | 0 |
11 | | White | 0xFFFF | 65535 |
12 | | Red | 0xF800 | 63488 |
13 | | Green | 0x07E0 | 2016 |
14 | | Blue | 0x001F | 31 |
15 | | Cyan | 0x07FF | 2047 |
16 | | Magenta | 0xF81F | 63519 |
17 | | Yellow | 0xFFE0 | 65504 |
18 | | Orange | 0xFC00 | 64512 |
19 |
20 | **The int value is the value that JS API needs since JS doesn't support hex.**
--------------------------------------------------------------------------------
/docs/esp32_s3/appsjs/load_script.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: Load a script
4 | ---
5 |
6 | capibaraZero, from version 0.5.2, supports loading scripts from SD called AppsJS. They act as applications that brings new features to capibaraZero.
7 |
8 | For who want to write JS script for capibaraZero, AppsJS implements this [API](/docs/esp32_s3/appsjs/API) that works as a layer between capibaraZero's native code and JS runtime.
9 |
10 | ## Load a scripts from SD
11 |
12 | To load a scripts from SD card you must follow this steps:
13 |
14 | - Create a folder named scripts/ in the root of your SD card
15 | - Place inside that folder the scripts that you wanna execute
16 | - Go in the JS section of capibaraZero
17 | - Click on the script that you want to run
--------------------------------------------------------------------------------
/docs/esp32_s3/appsjs/widget_type.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 4
3 | title: Widgets type
4 | ---
5 |
6 | CapibaraZero have some widgets that it's useful to make easier to create GUI easily. Here is a brief of the supported widgets:
7 |
8 | ## Text
9 |
10 | The text widget is the default text widget used in many sections of capibaraZero like WiFi scan, BLE Scan, etc...
11 |
12 | ## Grid
13 |
14 | The grid widget works like a grid container, it's really useful to build clean UI easily. It requires rows and cols and you can add widgets dinamically.
15 |
16 | ## List
17 |
18 | The list widget can be seen as a button. It's the default button widget used in every capibaraZero's section.
19 |
20 | In Javascript you can create the callback using this snippets:
21 |
22 | ```js
23 | global.LIST_UID_on_click = function () { // Replace with your real UID
24 | // Your JS code
25 | }
26 | ```
--------------------------------------------------------------------------------
/docs/esp32_s3/badusb/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "BadUSB",
3 | "position": 5,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "The BadUSB module of capibaraZero"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/badusb/getting_started.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: Getting started
4 | ---
5 |
6 | capibaraZero can act as HID device and supports BadUSB attacks using Rubber Ducky payload.
7 |
8 | ## Requirements
9 |
10 | - ESP32-S3
11 | - SD Card
12 |
13 | ### Supported keywords
14 |
15 | capibaraZero fully supports DuckyScript™ 1.0 and partially supports 3.0.
16 |
17 | It supports all the keystroke injection commands.
18 |
19 | The following keywords can be used:
20 |
21 | | Keyword | Supported |
22 | | ---------------------- | ------------------ |
23 | | STRING/STRINGLN | :white_check_mark: |
24 | | DELAY | :white_check_mark: |
25 | | DEFAULT_DELAY | :white_check_mark: |
26 | | Cursor keys | :white_check_mark: |
27 | | Modifier keys | :white_check_mark: |
28 | | Lock keys | :white_check_mark: |
29 | | System keys | :white_check_mark: |
30 | | Key modifier combo | :white_check_mark: |
31 | | REM | :white_check_mark: |
32 | | REM_BLOCK | :white_check_mark: |
33 | | WAIT_FOR_BUTTON_PRESS | :warning: |
34 | | BUTTON_DEF | :x: |
35 | | DISABLE_BUTTON | :white_check_mark: |
36 | | ENABLE_BUTTON | :white_check_mark: |
37 | | LED_G/LED_R/LED_OFF | :white_check_mark: |
38 | | Attackmode | :white_check_mark: |
39 | | DEFINE | :white_check_mark: |
40 | | VAR | :white_check_mark: |
41 | | Operators | :x: |
42 | | Conditional statements | :x: |
43 | | Loops | :x: |
44 | | Functions | :x: |
45 | | Randomization | :white_check_mark: |
46 | | Jitter | :white_check_mark: |
47 | | Wait for lock keys | :warning: |
48 |
49 | - Attackmode composite mode not available yet(HID + STORAGE)
50 | - Wait for lock keys can be parsed but implementation is not available yet.
51 | - Wait for button press can be parsed but implementation is not available yet.
52 | - The other keywords(also the one that there aren't in the table) will be available in future
53 |
54 | ## Setting keyboard layout
55 |
56 | You can set keyboard layout by appending at the beginning of a payload the LAYOUT keyword.
57 |
58 | Example
59 |
60 | ```txt
61 | LAYOUT it_IT
62 | PRINTLN Hello, World!
63 | ```
64 |
65 | Supported layouts:
66 |
67 | - de_DE
68 | - es_ES
69 | - fr_FR
70 | - it_IT
71 | - pt_PT
72 | - pt_BR
73 | - sv_SE
74 | - da_DK
75 | - hu_HU
--------------------------------------------------------------------------------
/docs/esp32_s3/badusb/run_payload.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: Run payload
4 | ---
5 |
6 | To run payload, you first need to upload duckyscript in SD card under /ducky/ then you can go under BadUSB in CapibaraZero GUI and will be opened a file browser where you can select the desidered payload.
7 |
8 | Once you click OK button on selected payload it will be executed and GUI will be blocked until finish(we will add stop feature soon).
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "The Bluetooth module",
3 | "position": 4,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "The bluetooth module of capibaraZero"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/ble_sniffer.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: BLE Sniffer
4 | ---
5 |
6 | The BLE Sniffer of CapibaraZero can sniff BLE advertising packets, retrive some informations from it and save the captured data in a PCAP file readable with Wireshark.
7 |
8 | ## Start the sniffing
9 |
10 | - Go under bluetooth attack section of CapibaraZero
11 | - Select BLE sniffer bluetooth
12 | - Choose if save PCAP to SD card(under /bluetooth) and until scanning finish(60 seconds)
13 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/ble_spam/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "BLE spam",
3 | "position": 2,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "Various Bluetooth spam exploit supported by CapibaraZero"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/ble_spam/apple_juice.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: AppleJuice
4 | ---
5 |
6 |
7 | AppleJuice is an exploit found by [ECTO-1A](https://github.com/ECTO-1A/AppleJuice) that make tons of fake Apple devices advertsing packets. This packets are recognized by Apple real devices like iPhone or iPad and make them crash due to huge flow of packets that device must elaborate.
8 | The porting for ESP32 is made by [RapierXbox](https://github.com/RapierXbox/ESP32-Sour-Apple) and it's adapted for CapibaraZero.
9 |
10 | ## Vulnerable iOS versions
11 |
12 | | iOS version | Compatible |
13 | | -------- | ------- |
14 | | iOS 16.x | :x: |
15 | | iOS 17.0 | :white_check_mark: |
16 | | iOS 17.1 | :white_check_mark: |
17 | | iOS 17.2* | :x: |
18 |
19 | *until iOS 17.2 beta 3 the exploit wasn't fix
20 |
21 | On the newer versions of iOS, some connection popup spawn but phone doesn't crash anymore.
22 |
23 |
24 | ## Start the attack
25 |
26 | - Go under bluetooth attack section of CapibaraZero
27 | - Select BLE spam bluetooth
28 | - Select AppleJuice and start the exploit
29 | - Wait 30 seconds and your iPhone will start to lag and will reboot
30 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/ble_spam/fastpair_ble_spam.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 4
3 | title: FastPair BLE spam
4 | ---
5 |
6 | Fast Pair is a fast pairing tecnology used by Google in Android 6.0 and above and like others fast pairing systems it's vulnerable to BLE spam attacks. CapibaraZero's implementation spam only fake Arduino 101 advertisement because it works on every Android version.
7 |
8 | ## Start the attack
9 |
10 | - Go under bluetooth attack section of CapibaraZero
11 | - Select BLE spam bluetooth
12 | - Select FastPair BLE spam and start the exploit
13 | - Your Android phone will start to spawn pairing request popup
14 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/ble_spam/samsung_ble_spam.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: Samsung BLE spam
4 | ---
5 |
6 | The Samsung BLE spam attack is discovered by [Spooks4576](https://github.com/Spooks4576/ESP32Marauder) and act like AppleJuice, it spam tons of fake Galaxy Watch advertisement packets and make phone lag a lot. It is adapted for CapibaraZero from [ESP32Marauder](https://github.com/justcallmekoko/ESP32Marauder)
7 |
8 | ## Start the attack
9 |
10 | - Go under bluetooth attack section of CapibaraZero
11 | - Select BLE spam bluetooth
12 | - Select Samsung BLE spam and start the exploit
13 | - Your Samsung phone will start to spawn pairing request popup
14 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/ble_spam/swiftpair_ble_spam.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: SwiftPair BLE spam
4 | ---
5 |
6 | Swift Pair is a fast pairing tecnology used by Microsoft from Windows 10 1803 and like others fast pairing systems it's vulnerable to BLE spam attacks. Like AppleJuice and Samsung BLE spam, the attack, discovered by [Spooks4576](https://github.com/Spooks4576/ESP32Marauder), make your Windows PC spawn pairing requests from fake devices.
7 |
8 | ## Start the attack
9 |
10 | - Go under bluetooth attack section of CapibaraZero
11 | - Select BLE spam bluetooth
12 | - Select Samsung BLE spam and start the exploit
13 | - Your Windows PC will start to spawn pairing request popup
14 |
--------------------------------------------------------------------------------
/docs/esp32_s3/bluetooth/hid_attack.WIP:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 4
3 | title: HID Attack
4 | ---
5 |
6 | Usually you perform an HID attack using a USB interface but capibaraZero have support also BLE HID.
7 |
8 | In this way a device can connect to capibaraZero and it will act like a HID interface.
9 |
10 | capibaraZero HID doesn't have any type on bluetooth PIN, so as soon as a device connects, capibaraZero will start to execute the ducky script.
11 |
12 | ## Configuration
13 |
14 | In the capibaraZero JSON configuration you can set BLE device name, HID manufacturer and battery level.
15 |
16 | By default the following are used:
17 |
18 | - Device name: capibaraZero HID
19 | - HID manufacturer: capibaraZero
20 | - Battery level: 100
21 |
22 | ### Run attack
23 |
24 | - Go in the bluetooth attack section
25 | - Select HID attack
26 | - Connect to capibaraZero and see the ducky script running
27 |
--------------------------------------------------------------------------------
/docs/esp32_s3/boards/ArduinoNanoESP32.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: Arduino Nano ESP32
4 | ---
5 |
6 |
7 |
8 | | Feature | Specs |
9 | |:-------:|:----------------------------------------------------------------:|
10 | | Module | NORA-W106(ESP32-S3) |
11 | | Flash | 16MB |
12 | | PSRAM | 8MB |
13 | | Screen** | 240x320 |
14 | | SubGHZ | SX1276 |
15 | | Navigation | Navigation button |
16 | | WiFi | :white_check_mark:|
17 | | BLE | :white_check_mark:|
18 | | USB OTG | :white_check_mark:|
19 | | NFC | PN532 |
20 | | Battery chip | TP4057 |
21 |
22 | Here you can find breadboard boards of CapibaraZero on Arduino Nano ESP32(photo is outdated):
23 |
24 |
25 |
26 | And here the electrical diagram:
27 |
28 |
29 |
30 | You can also download the original project [here](https://github.com/CapibaraZero/resources/tree/main/electrical_diagram/Arduino_Nano_ESP32)
31 |
32 | ## Arduino Nano ESP32 pinout
33 |
34 | With an Arduino Nano ESP32 board you must use the following pin if you doesn't want to modify source code:
35 |
36 | ### SD card
37 |
38 | For the SD card we must use the SPI bus.
39 |
40 | - CS: pin D10
41 | - MOSI: pin D11
42 | - MISO: pin D12
43 | - SCK: pin D13
44 |
45 | ### SX1276
46 |
47 | For the SX1276 we must use the SPI bus. We use the same pin of SD card but make sure to change CS pin since is the one that identify the devices on SPI bus.
48 |
49 | We also need DIO 1 and DIO 2 pin to receive data from module in OOK/FSK mode. LoRa™ mode use SPI to get data.
50 |
51 | - DIO1: pin D0
52 | - NSS: pin D7
53 | - DIO2: pin D1
54 | - MOSI: pin D11
55 | - MISO: pin D9
56 | - SCK: pin D13
57 |
58 | ### PN532
59 |
60 | Make sure to put PN532 in I2C mode since we use it in this way. You can also use in UART mode or SPI mode but you need to change source code
61 |
62 | - SCL: pin A6
63 | - SDA: pin A7
64 |
65 | ### Display
66 |
67 | - SCL(SCLK): D4
68 | - RST: Not connected
69 | - SDA(MOSI): D2
70 | - CS: pin D6
71 | - DC: pin D5
72 | - BLK: 3v3
73 |
74 | ### IR
75 |
76 | - Emitter: D3
77 | - Receiver: D8
78 |
79 | ### TP4057
80 |
81 | - BAT+: A0
82 |
83 | ### Buttons
84 |
85 | - Right: pin A1
86 | - Down: pin A2
87 | - OK: pin A3
88 | - Left: pin A4
89 | - Up: pin A5
90 |
--------------------------------------------------------------------------------
/docs/esp32_s3/boards/ESP32S3.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: ESP32-S3
4 | ---
5 |
6 |
7 |
8 | | Feature | Specs |
9 | |:-------:|:----------------------------------------------------------------:|
10 | | Module | ESP32-S3-WROOM-1U |
11 | | Flash | 16MB |
12 | | PSRAM | :x: |
13 | | Screen** | 240x320 |
14 | | SubGHZ | SX1276 |
15 | | Navigation | Navigation button |
16 | | WiFi | :white_check_mark:|
17 | | BLE | :white_check_mark:|
18 | | USB OTG | :white_check_mark:|
19 | | NFC | PN532 |
20 | | Battery chip | TP4057 |
21 |
22 | ** You can change dimension in project config
23 |
24 | Here you can find breadboard boards of CapibaraZero on ESP32 S3 DevkitC(photo is outdated):
25 |
26 |
27 |
28 | And here the electrical diagram:
29 |
30 |
31 |
32 | You can also download the original project [here](https://github.com/CapibaraZero/resources/tree/main/electrical_diagram/ESP32-S3-DEVKITC-1)
33 |
34 | ## ESP32-S3 pinout
35 |
36 | With an ESP32-S3 board you must use the following pin if you doesn't want to modify source code:
37 |
38 | ### SD card
39 |
40 | For the SD card we must use the SPI bus.
41 |
42 | - CS: pin 13
43 | - MOSI: pin 35
44 | - MISO: pin 37
45 | - SCK: pin 36
46 |
47 | ### SX1276
48 |
49 | For the SX1276 we must use the SPI bus. We use the same pin of SD card but make sure to change CS pin since is the one that identify the devices on SPI bus.
50 |
51 | We also need DIO 1 and DIO 2 pin to receive data from module in OOK/FSK mode. LoRa™ mode use SPI to get data.
52 |
53 | - NSS: pin 1
54 | - DIO2: pin 15
55 | - DIO1: pin 16
56 | - MOSI: pin 35
57 | - MISO: pin 7
58 | - SCK: pin 37
59 |
60 | ### PN532
61 |
62 | Make sure to put PN532 in I2C mode since we use it in this way. You can also use in UART mode or SPI mode but you need to change source code
63 |
64 | - SDA: pin 8
65 | - SCL: pin 9
66 |
67 | ### Display
68 |
69 | - RST: 4
70 | - DC: pin 5
71 | - CS: pin 10
72 | - SDA(MOSI): pin 11
73 | - SCL(SCLK): pin 12
74 |
75 | ### IR
76 |
77 | - Emitter: 14
78 | - Receiver: 6
79 |
80 | ### TP4057
81 |
82 | - BAT+: 2
83 |
84 | ### Buttons
85 |
86 | - Left: pin 39
87 | - OK: pin 40
88 | - Down: pin 41
89 | - Right: pin 42
90 | - Up: pin 47
91 |
92 |
100 |
107 |
--------------------------------------------------------------------------------
/docs/esp32_s3/boards/LilyGo_T_Embed_CC1101.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 4
3 | title: LilyGo T-Embed CC1101
4 | ---
5 |
6 |
7 |
8 | | Feature | Specs |
9 | |:-------:|:----------------------------------------------------------------:|
10 | | Module | ESP32-S3-WROOM-1U |
11 | | Flash | 16MB |
12 | | PSRAM | 8MB |
13 | | Screen | 320x170 |
14 | | SubGHZ | CC1101 |
15 | | Navigation | Rotary encoder |
16 | | NFC | PN532 |
17 | | Battery chip | BQ27220 |
18 |
19 | CapibaraZero natively support LilyGo T-Embed CC1101 from firmware 0.5.1.
20 |
21 | You can download the latest firmware from [here](https://github.com/CapibaraZero/fw/releases)
22 |
23 |
--------------------------------------------------------------------------------
/docs/esp32_s3/boards/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Boards",
3 | "position": 8,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "Check this section to build your CapibaraZero"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/boards/box/Box.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: -1
3 | title: Box
4 | ---
5 |
6 | # Official Box enclosure of capibaraZero
7 |
8 | #### Credits
9 |
10 | Thanks to [XyDrive](https://github.com/XyDrive) for his work!
--------------------------------------------------------------------------------
/docs/esp32_s3/boards/box/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Box",
3 | "position": 1,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "Check this section to build your CapibaraZero"
7 | },
8 | "className": "hidden"
9 | }
10 |
--------------------------------------------------------------------------------
/docs/esp32_s3/boards/getting_started.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: Getting Started
4 | ---
5 |
6 | Here you can check how to build your capibaraZero. The project, actually, need an ESP32-S3 to enjoy all the features, SD card socket, 5 push buttons and some external modules that are listed below. Or you can buy ready board like [LilyGo T-Embed CC1101](/docs/esp32_s3/boards/LilyGo_T_Embed_CC1101)
7 |
8 |
9 |
22 |
23 | ## External module
24 |
25 | There are some features that need external module in order to work:
26 |
27 | - ST7789 display
28 | - NFC(PN532)
29 | - SubGHZ(SX1276)
30 | - IR(IR emitter + receiver)
31 |
32 | After building capibaraZero board, you must flash firmware. You can download the latest from [here](https://github.com/CapibaraZero/fw/releases/)
33 |
--------------------------------------------------------------------------------
/docs/esp32_s3/development/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Development",
3 | "position": 8,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "More information about CapibaraZero development"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/development/code_structure.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: Code structure
4 | ---
5 |
6 | # CapibaraZero's code structure
7 |
8 | ## Feature framework
9 |
10 | Most complex feature have a framework that works as layer between UI code that launch the attack and the attack code. This make more easy to fix or improve a single attack.
11 |
12 | Also, this separation made the attack code easy to find and easier to understand. The typical framework code is designed to works without the capibaraZero's code so the framework can be used as a standalone library for every project.
13 |
14 | You can find frameworks used in capibaraZero here:
15 |
16 | - [NFCFramework](https://github.com/CapibaraZero/NFCFramework)
17 | - [IrFramework](https://github.com/CapibaraZero/IrFramework)
18 | - [HID](https://github.com/CapibaraZero/HID)
19 |
20 | Others feature have only a library included in the main repository. For example:
21 |
22 | - [Networks attacks](https://github.com/CapibaraZero/fw/blob/main/lib/network_attacks/network_attacks.cpp)
23 |
24 | If you are unsure where to add your code, feel free to open an issue on GitHub or write on Matrix/Discord server.
25 |
26 | ## Attack code
27 |
28 | Every section have a corresponding section_attacks.cpp/.hpp files, they are used to start an attack from the framework and usually the attack code includes also tasks that need to be run to avoid UI block or because they run until they are stopped by the user or by a condition. This tasks, except in rare cases, controls also the UI if the content is dynamic(e.g WiFi scan progress).
29 |
30 | ## UI navigation
31 |
32 | The (Feature)Navigation.cpp/.hpp declare functions that will be called from the UI, they are usually a wrapper for the attack code since UI page require a void function without parameters.
33 |
34 | ## UI pages
35 |
36 | A UI pages is controlled by the Page class that define primitives for the UI movement(up, down, etc.), all the primitives can be overloaded if the page require it(for example we overload primitives in MainPage).
37 |
38 | Basically, every page is composed by a grid that includes all the widgets that you see on the page. The button call a specified callback passed in his constructor and usually call a void function without parameters from the FeatureNavigation.cpp/.hpp
39 |
40 | ## Pins.h
41 |
42 | The file include/pins.h define all the pin used by the CapibaraZero's firmware, if you are planning to port a new board to the CapibaraZero's firmware you should define all the pin in that file following the name of the other board pin beyond the correct #ifdef macro for your board, if your board doesn't specify a specific flag like the [ESP32-S3 DevkitC](https://github.com/platformio/platform-espressif32/blob/f6ec3926f9f660ee9abada8540ffe1e205da4bbf/boards/esp32-s3-devkitc-1.json), you can define a build_flag in the platformio.ini
43 |
44 | To find if your board expose a build_flag you can check [here](https://github.com/platformio/platform-espressif32/tree/develop/boards) the build_flags for your board
--------------------------------------------------------------------------------
/docs/esp32_s3/development/new_porting.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: Add a new board support
4 | ---
5 |
6 | # Create a new porting
7 |
8 | capibaraZero is borned for ESP32-S3-DevKitC-1 and that is the only way to use all the features but you can also port for other platforms. Here is a little guide to explain general steps to port capibaraZero to a new platform.
9 |
10 | ## Add a new env to platformio
11 |
12 | In order to add a new platform, you need to create a new environment for the ESP that you wanna port in the platformio.ini, for example for an ESP32, you need to create an environment based on your board.
13 |
14 | For example:
15 |
16 | ```ini
17 | [env:lilygo_t_embed_cc1101]
18 | platform = espressif32
19 | framework = arduino ; Must not be changed
20 | board = lilygo-t-display-s3
21 | build_type = debug ; Give better stacktrace for debugging
22 | monitor_filters = esp32_exception_decoder ; Give better stacktrace for debugging
23 | lib_deps =
24 | ${common.lib_deps_builtin} ; FW libraries
25 | ${common.lib_deps_external} ; FW libraries
26 | mathertel/RotaryEncoder@^1.5.3 ; Device specific library
27 | build_flags =
28 | ${common.build_flags} ; FW build flags
29 | -DARDUINO_USB_MODE=1 ; Device flags
30 | -DARDUINO_USB_MSC_ON_BOOT=0 ; Device flags
31 | -DLILYGO_T_EMBED_CC1101=1 ; Describe board. This flag will identify your board in fw code
32 | -DENCODER_NAVIGATION=1 ; Specify navigation(button or encoder)
33 | -DCC1101_SUBGHZ=1 ; Specify SubGHZ chip
34 | ```
35 |
36 | Let's break down this section of platformio.ini:
37 |
38 | - `[env:lilygo_t_embed_cc1101]` is the name of the environment. Please use the name of the board with underscore instead of space
39 | - `platform = espressif32` It must not be changed if you want to add support for an ESP32 board. If you wanna try to add another MCU family, you must change platform but not framework
40 | - `board = lilygo-t-display-s3` is the configuration of the board. You can find all supported boards [here](https://registry.platformio.org/platforms/platformio/espressif32/boards)
41 | - `lib_deps` describe the libraries needed for the board. It includes all the libraries needed for the firmware and you can add also specific device library
42 | - `build_flags` contains all the flags needed by the board. It can safeguard if needed
43 |
44 | Now you may want to try to build, if you are lucky, the build will be successful else you need to fix errors to adapt code([you may need safeguard](#add-safeguard) to avoid linker errors).
45 |
46 | Generally if you are building for an ESP32 based platform, shouldn't be any errors but probably for ESP8266 based boards you need to change some code.
47 |
48 | ## Add Peripherals code
49 |
50 | Since some boards need some specific code for a proper initialization, we decided to separate every board in a different c++ class. This section can be found [here](https://github.com/CapibaraZero/fw/tree/main/lib/Peripherals)
51 |
52 | Each Peripherals have three methods:
53 |
54 | - `init_i2c_bus()`: Initialize I2C bus. It may needed if you have multiple device on same bus.
55 | - `init_sd()`: Initialize SD card.
56 | - `init_navigation()`: Initialize navigation buttons/encoder.
57 |
58 | In order to add a board you need to follow this steps:
59 |
60 | - Create a new pinout header under `include/boards/BOARD_NAME/pins.h`. BOARD_NAME must be named like board environment name from platformio.ini
61 | - Add pinout under `include/pins.h`. Remember to use the right build_flag for your board
62 | - Create a folder under `lib/Peripherals` named like board environment name from platformio.ini
63 | - Create a new class in your created folder name with this convention `Peripherals_BOARD_NAME`. You can copy the template class from ESP32-S3-DevKitC. Remember to change all the #ifdef header safeguard with your build_flag
--------------------------------------------------------------------------------
/docs/esp32_s3/installation/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Installation",
3 | "position": 2,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "Flashing CapibaraZero to your device, both manually and using the web flasher"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/installation/from_release.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: From Release
4 | ---
5 |
6 | ## Requirements:
7 |
8 | - Python3
9 | - esptool
10 |
11 | esptool is a Python module which is installed through `pip3 install esptool`.
12 |
13 | ## Obtain From Release
14 |
15 | 1. Navigate to the firmware releases tab on Github: [releases](https://github.com/CapibaraZero/fw/releases/) and select the version you want to install.
16 | 2. Download the release zip for the device you have.
17 | 3. Unzip the downloaded file, and open a terminal in the newly created folder.
18 |
19 | ## Install
20 |
21 | ```bash
22 | python3 -m esptool --chip esp32s3 --port UPLOAD_PORT --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x0000 bootloader.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 firmware.bin
23 | ```
24 |
--------------------------------------------------------------------------------
/docs/esp32_s3/installation/from_source.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: From Source
4 | ---
5 |
6 | ## Requirements:
7 |
8 | :::warning
9 |
10 | It is strongly advised to use baremetal **Linux**, or **WSL**, for installing from source.
11 |
12 | :::
13 |
14 | - Python3
15 | - [Platformio](https://platformio.org/)
16 | - GNU Bison
17 | - Flex
18 |
19 | Platformio can also be installed as a python package, requiring python 3 to be available:
20 | `python3 -m pip install -U platformio`
21 |
22 | GNU Bison and Flex can be installed with your Linux package manager of choice (apt/pacman)
23 |
24 | ## Source Code:
25 |
26 | Source code can be found on the official Capibara Zero firmware repository, on Github. [Source](https://github.com/CapibaraZero/fw)
27 |
28 | To obtain the source code for a particular release, it can be downloaded from the [releases page](https://github.com/CapibaraZero/fw/releases/).
29 |
30 | ## Install:
31 |
32 | :::info
33 |
34 | If you installed platformio from Python pip, you may need to run `python3 -m platformio run` instead of `pio run`.
35 |
36 | :::
37 |
38 | ```
39 | # Init NFC libs
40 | bash init_libs.sh
41 |
42 | pio run
43 | # OR python3 -m platformio run
44 |
45 | # To upload firmware
46 | pio run -t upload
47 | ```
48 |
--------------------------------------------------------------------------------
/docs/esp32_s3/installation/web_flasher.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: Web Flasher
4 | ---
5 |
6 | CapibaraZero has a convenient web flasher found at [flash.capibarazero.com](https://flash.capibarazero.com).
7 |
8 | You must select the device you are using, as well as the version of the firmware you wish to install. Follow through the steps as prompted.
9 |
10 | :::warning
11 |
12 | Web flasher works **only** with Chromium-based browsers such as Google Chrome and Microsoft Edge.
13 |
14 | :::
15 |
16 |
17 | ## Known Issues
18 |
19 | `failed to execute 'open' on 'serialport': failed to open serial port`
20 |
21 | This is known to affect Linux users. The solution is to run the following which gives the user read/write access to the USB device
22 | ```bash
23 | sudo setfacl -m u:$USER:rw /dev/ttyACM0
24 | ```
25 |
--------------------------------------------------------------------------------
/docs/esp32_s3/ir/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "IR",
3 | "position": 5,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "The IR section of CapibaraZero"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/ir/emulate_signal.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: Emulate Signal
4 | ---
5 |
6 | # Emulate Signal
7 |
8 | CapibaraZero is able to emulate many protocols but also RAW signal that cannot be decoded by the capibaraZero.
9 |
10 | Upload the signals that you want to emulate in your SD under /IR/signals
11 |
12 | # Requirements
13 |
14 | - ESP32-S3
15 | - IR trasmitter
16 | - SD card
17 |
18 | ## Signal file format
19 |
20 | ```json
21 | {
22 | "protocol": 8,
23 | "address": 32989,
24 | "command": 151,
25 | "number_of_bits": 32,
26 | "extra": 0
27 | "decoded_raw_data": 1754759389,
28 | "raw_len": 3,
29 | "raw_data": [
30 | 181,
31 | 44,
32 | 11
33 | ]
34 | }
35 | ```
36 |
37 | ### Protocol number:
38 |
39 | | Keyword | Protocol Number |
40 | | -------------------- | ------------------------ |
41 | | NEC | 8 |
42 | | NEC2 | 9 |
43 | | Onkyo | 10 |
44 | | Apple | :x: |
45 | | Denon | 4 |
46 | | Sharp | 22 |
47 | | Panasonic | 11 |
48 | | Kaseikyo | 12 |
49 | | Kaseikyo Denon | 13 |
50 | | Kaseikyo JVC | 15 |
51 | | Kaseikyo Mitsubishi | 16 |
52 | | Kaseikyo Sharp | 14 |
53 | | Kaseikyo | 12 |
54 | | JVC | 5 |
55 | | LG | 6 |
56 | | LG2 | 7 |
57 | | RC5 | 17 |
58 | | RC6 | 18 |
59 | | Samsung | 19 |
60 | | Samsung48 | 21 |
61 | | SamsungLG | 20 |
62 | | Sony | 23 |
63 | | Pulse Distance | 2 |
64 | | Pulse Width | 1 |
65 | | BoseWave | 25 |
66 | | Bang & Olufsen | 24 |
67 | | Lego | 26 |
68 | | FAST | 29 |
69 | | Whynter | 30 |
70 | | MagiQuest | :x: |
71 |
72 | ### Address and Command
73 |
74 | Address and command is required for the following protocols: NEC, NEC2, Onkyo, Denon, Kaseikyo(all vendors), LG, LG2, Panasonic, RC5, Samsung(all), Sharp and Sony
75 |
76 | ### Number of bits
77 |
78 | Number of bits is required for the following protocols: Bang & Olufsen, JVC, Lego, RC6 and Whynter
79 |
80 | ### Extra
81 |
82 | Extra is required only for Kaseikyo
83 |
84 | ### Decoded Raw Data
85 |
86 | Decoded raw data is required for the following protocols: Bang & Olufsen, JVC, Lego, RC6 and Whynter
87 |
88 | ### Raw length
89 |
90 | Raw length is required by Pulse Width, Pulse Distance and RAW signals.
91 |
92 | ### Raw data
93 |
94 | Raw data is required by Pulse Width, Pulse Distance and RAW signals.
95 |
96 | ### Signals list
97 |
98 | ```json
99 | [
100 | {
101 | "protocol": 8,
102 | "address": 32989,
103 | "command": 151,
104 | "number_of_bits": 32,
105 | "extra": 0
106 | "decoded_raw_data": 1754759389,
107 | "raw_len": 3,
108 | "raw_data": [
109 | 181,
110 | 44,
111 | 11
112 | ]
113 | },
114 | {
115 | "protocol": 9,
116 | "address": 32989,
117 | "command": 159,
118 | "number_of_bits": 32,
119 | "extra": 0
120 | "decoded_raw_data": 1754759312,
121 | "raw_len": 3,
122 | "raw_data": [
123 | 181,
124 | 44,
125 | 15
126 | ]
127 | }
128 | ]
129 | ```
130 |
131 | CapibaraZero's signal emulator supports also array of signals like the one above. It will sends all the signals in the array consecutively.
132 |
133 | ### Notes
134 |
135 | IR signals captured by the capibaraZero have all of this property even though they are not used.
136 |
137 | Protocols that doesn't support one or more properties like RAW or Pulse Width/Distance have unused property set to 0.
138 |
139 | If you are creating a signal it's better to not include unused properties.
140 |
141 | ### IRDB
142 |
143 | You can find capibaraZero's IRDB at the following [link](https://github.com/CapibaraZero/resources/tree/main/IRDB)
144 |
145 | Contributions are welcome! If you capture a signal that are not available in capibaraZero's IRDB, you can upload it under the IRDB github repository by opening a pull request after forked the repo and uploaded the IR file under the right category.
146 |
147 | ## How to emulate an IR signal?
148 |
149 | - Go to the IR section
150 | - Select Emulate Signal
151 | - Select file that you want to emulate
152 | - The capibaraZero will transmit the signal through the IR emitter
153 |
154 | If you have a list of signals the operation can take some times
--------------------------------------------------------------------------------
/docs/esp32_s3/ir/rc_emulator.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: RC Emulator
4 | ---
5 |
6 | # RC Emulator
7 |
8 | CapibaraZero can also emulate entire(or partial) remote controller.
9 |
10 | Upload the RC that you want to emulate in your SD under /IR/signal_rc
11 |
12 | # Requirements
13 |
14 | - ESP32-S3
15 | - IR trasmitter
16 | - SD card
17 |
18 | ## Signal file format
19 |
20 | ```json
21 | [
22 | {
23 | "name": "Off",
24 | "protocol": 7,
25 | "address": 136,
26 | "command": 49157
27 | },
28 | {
29 | "name": "On",
30 | "protocol": 7,
31 | "address": 136,
32 | "command": 49158
33 | }
34 | ]
35 | ```
36 |
37 | ### Name
38 |
39 | Name property give a name to the command, it's better do not exceed the 6 characters for the name to avoid UI glitch due to small display size.
40 |
41 | ### Other properties
42 |
43 | For the other properties check here: [IR protocol format](/esp32_s3/ir/emulate_signal.md#signal-file-format)
44 |
45 | ### Notes
46 |
47 | IR signals captured by the capibaraZero have all of this property even though they are not used.
48 |
49 | Protocols that doesn't support one or more properties like RAW or Pulse Width/Distance have unused property set to 0.
50 |
51 | If you are creating a signal it's better to not include unused properties.
52 |
53 | The current limit of button is 8 for each file.
54 |
55 | ## How to emulate an RC remote?
56 |
57 | - Go to the IR section
58 | - Select Emulate RC
59 | - Select file that you want to emulate
60 | - The capibaraZero will transmit the signal through the IR emitter when you select a button
--------------------------------------------------------------------------------
/docs/esp32_s3/ir/record_signal.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: Record Signal
4 | ---
5 |
6 | # Record Signal
7 |
8 | CapibaraZero is able to capture and decode many IR protocol but can also works with RAW protocol.
9 |
10 | Recorded signal can be used for protocol analysis or can be sent by an IR emitter.
11 |
12 | # Requirements
13 |
14 | - ESP32-S3
15 | - IR receiver
16 | - SD card
17 |
18 | ## How to record an IR signal?
19 |
20 | - Go to the IR section
21 | - Select Record Signal
22 | - Put the remote controller near to the capibaraZero's IR receiver
23 | - Press the button that you want to record
24 | - Press save when the signal got received by the capibaraZero
25 |
26 | The recorded signal will saved under /IR/signals make sure that directory exists on SD, otherwise it will fail.
27 |
28 | ### Supported Protocols:
29 |
30 |
31 | | Keyword | Supported |
32 | | -------------------- | ------------------ |
33 | | NEC | :white_check_mark: |
34 | | NEC2 | :white_check_mark: |
35 | | Onkyo | :white_check_mark: |
36 | | Apple | :white_check_mark: |
37 | | Denon | :white_check_mark: |
38 | | Sharp | :white_check_mark: |
39 | | Panasonic | :white_check_mark: |
40 | | Kaseikyo | :white_check_mark: |
41 | | JVC | :white_check_mark: |
42 | | LG | :white_check_mark: |
43 | | LG2 | :white_check_mark: |
44 | | RC5 | :white_check_mark: |
45 | | RC6 | :white_check_mark: |
46 | | Samsung | :white_check_mark: |
47 | | Sony | :white_check_mark: |
48 | | Pulse Distance | :white_check_mark: |
49 | | Pulse Width | :white_check_mark: |
50 | | Pulse Distance Width | :white_check_mark: |
51 | | Hash | :white_check_mark: |
52 | | Pronto | :white_check_mark: |
53 | | BoseWave | :white_check_mark: |
54 | | Bang & Olufsen | :white_check_mark: |
55 | | Lego | :white_check_mark: |
56 | | FAST | :white_check_mark: |
57 | | Whynter | :white_check_mark: |
58 | | MagiQuest | :white_check_mark: |
--------------------------------------------------------------------------------
/docs/esp32_s3/network_attacks/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "The network attacks",
3 | "position": 7,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "The network attacks of CapibaraZero"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/network_attacks/arp_poisoner.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: ARP poisoner
4 | ---
5 | import MacToJson from '@site/src/components/mac_to_json';
6 |
7 |
8 | CapibaraZero's ARP poisoner is an implementation of ARP poisoning DoS through the WiFi interface.
9 |
10 | It will send ARP reply requests where it will announce its MAC address as default gateway of the network.
11 |
12 | This attack requires to know victim MAC address and IP address besides ARP reply request will update likely all ARP table of hosts in the network.
13 |
14 | ## How to make attack
15 |
16 | - Create config.json under /arp_poisoner path like [this](/example_config/arp_poisoner/example.json) with SSID and password of AP to connect then target IP in the form of array and target MAC address in the form of array(convert HEX to decimal like the example config since JSON doesn't support HEX.)
17 | - Go to NetAt.(Network attacks)
18 | - Select ARPoisoner
19 | - Attack start to run. You can stop when you want
20 |
21 |
22 | ### Convert MAC to JSON array
23 |
24 | In order to configure ARPoisoner, you need to convert a MAC address in hexadecimal format to a decimal JSON array. Here there is a converter that can make the work for you. Put MAC in aa:bb:cc:dd:ee:ff form or AA:BB:CC:DD:EE:FF form and submit the form.
25 |
26 |
34 |
--------------------------------------------------------------------------------
/docs/esp32_s3/network_attacks/evilportal.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: EvilPortal
4 | ---
5 |
6 | EvilPortal is an attack that creates an AP with a captive portal access and it captures all the POST requests on the login form.
7 |
8 | It can be used to capture body of POST requests to /login. You must create a webpage like [this](https://github.com/CapibaraZero/EvilPortal/blob/main/example.html) with a form that submit to /login URL.
9 |
10 | You must upload the whole pages to SD under /captive_portal path.
11 |
12 | CapibaraZero captive portal act like a web server so you can upload CSS, JS or other assets.
13 |
14 | ## How to make the attack
15 |
16 | - Upload web pages and resources(CSS, JS) to SD under /captive_portal path
17 | - (Optional) Create config.json under /captive_portal path like [this](/example_config/dhcp_glutton/config.json) with SSID and password of capibaraZero AP
18 | - If you not provide config.json, capibaraZero will create AP with capibaraZero SSID without any password. You can change default_ssid at [this line](https://github.com/CapibaraZero/fw/blob/main/lib/network_attacks/network_attacks.cpp#L31) and recompile firmware
19 | - Go to NetAt.(Network attacks)
20 | - Select EvilPortal
21 | - Connect to ESP and login to captive portal
22 | - Check captured packets in GUI. You can stop when you want. Requests received will be printed on serial port and saved in SD card under /captive_portal path
23 |
24 | ## Custom Handler
25 |
26 | If want to perform custom action when receiving credentials, you can create a custom handler [here](https://github.com/CapibaraZero/fw/tree/main/lib/captive_portal_callback) then recompile the firmware.
27 |
28 | ## Custom page
29 |
30 | Custom HTML page must make POST requests to /login path. capibaraZero will gets all the fields in the form.
31 |
32 | ### GUI
33 |
34 |
35 |
--------------------------------------------------------------------------------
/docs/esp32_s3/nfc/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "The NFC module",
3 | "position": 6,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "The NFC module of CapibaraZero powered by a PN532"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/esp32_s3/nfc/clone_tag.WIP:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 5
3 | title: Clone tag
4 | ---
5 |
6 |
7 | ### Getting started
8 |
9 | Make sure to correctly connects the PN532 to the ESP board and check that can be found by the firmware.
10 | Now make sure that you have the right key for both card if you wanna read/write all the sector, otherwise you will get an authentication error. Save original card key under /NFC/original.key and cloned card key under /NFC/cloned.key
11 |
12 | ### Supported cards
13 |
14 | - ISO14443A tag(only reading UID then can be written in a supported clonable card)
15 | - Mifare Classic and Ultralight
16 | - NTAG2xx
17 | - Felica support is WIP
18 |
19 | ### How to use?
20 |
21 | - Under the NFC menu select clone tag
22 | - Put the path of original and the cloned card key(eg. /NFC/original.key) in the prompt
23 | - Put the tag near the PN532 and wait until the tag get read
24 | - Put the target tag near the PN532, confirm from the CLI that you wanna finish clone and wait until all the sectors will be written.
25 |
26 |
--------------------------------------------------------------------------------
/docs/esp32_s3/nfc/create_key.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | title: Create key list to read tag
4 | ---
5 |
6 | # Why you need a key?
7 |
8 | The key is used to read or write the tag sectors and it's needed for the read and dump features. Each sector have Key A and Key B, more details [here](https://github.com/XaviTorello/mifare-classic-toolkit/blob/master/README.md#Keys). In the section we will see how to save a list of authentication keys in the SD card.
9 |
10 | ## Key format
11 |
12 | The key is composed by a 6 hexadecimal bytes and allow NFC reader to read the sectors.
13 |
14 | The key format followed by CapibaraZero(and Mifare app) is the following: FFFFFFFFFFFF
15 |
16 | ### Save key in SD card
17 |
18 | To save key in SD card you will need to create a file called keys.txt under the path /NFC/. Full path will be: /NFC/keys.txt
19 |
20 | An example can be:
21 |
22 | ```txt
23 | FFFFFFFFFFFF
24 | B4C132439EEF
25 | 7BBEBOC8FB49
26 | 1BC1F6FF32CC
27 | D9D923DAE083
28 | 990AEB52D8AC
29 | 90DEAB425EA5
30 | 40A061DABC43
31 | 43D65DC2363C
32 | 5AFE558BC710
33 | ```
34 |
35 | You can also create comment using the # character.
36 |
37 | ### Keys collection
38 |
39 | Here a list of some NFC keys:
40 |
41 | [FlipperZero Mifare keys collection](https://github.com/UberGuidoZ/Flipper/tree/main/NFC/mf_classic_dict)
42 |
43 | [MifareClassicTool keys](https://github.com/ikarus23/MifareClassicTool/blob/master/Mifare%20Classic%20Tool/app/src/main/assets/key-files/extended-std.keys)
44 |
--------------------------------------------------------------------------------
/docs/esp32_s3/nfc/dump_tag_sd.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | title: Dump a card in the SD
4 | ---
5 |
6 | ### Getting started
7 |
8 | Make sure to correctly connects the PN532 to the ESP board and check that can be found by the firmware.
9 |
10 | ## Supported Card
11 |
12 | - Mifare Classic, Ultralight and NTAG2xx
13 | - FeliCa cards
14 |
15 | ## How to read a tag
16 |
17 | - Go under NFC section
18 | - Select Polling ISO14443A tag for Mifare or NTAG2xx family otherwise select Polling ISO18092 for FeliCa cards
19 | - Put tag near PN532 reader
20 | - Wait until PN532 read tag details(UID or IDm, PMm and System code)
21 | - Now you can dump tag. The CapibaraZero will try each key you put in the list until it will find the right one for each sector. It will find the Key A and the Key B
22 |
23 | The dump will be saved under /NFC/dumps in binary format(useful to analyze tag data) and JSON format(useful for clone).
24 |
25 |
--------------------------------------------------------------------------------
/docs/esp32_s3/nfc/emv_read.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 5
3 | title: Read EMV Credit Card
4 | ---
5 |
6 |
7 | :::danger[Warning]
8 | This section is for experimental purposes only and is not meant for any illegal activity/purposes.
9 | We are not responsable of illegal activity made with this tool.
10 | :::
11 |
12 | ### Getting started
13 |
14 | Make sure to correctly connects the PN532 to the ESP board and check that can be found by the firmware. **EMV read feature is only supported by Elechouse PN532, others module won't work due to hardware issue.**
15 |
16 | ## Tested EMV Cards
17 |
18 | - MasterCard(Tested)
19 |
20 | Others card may work, please contribute, updating this section if you test a card that is not present here.
21 |
22 | ## How to read an EMV card
23 |
24 | - Go in NFC section
25 | - Select Read EMV
26 | - Put your EMV card near the PN532 reader
27 | - Wait until your capibaraZero will parse the EMV data
28 |
29 |
--------------------------------------------------------------------------------
/docs/esp32_s3/nfc/getting_started.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | title: Getting Started
4 | ---
5 |
6 | # Getting started with NFC
7 |
8 | ## Features
9 |
10 | - Read UID ISO14443A tag
11 | - Read IDm, PMm and System code of FeliCa™ card
12 | - Read block of FeliCa™ card
13 | - MIFARE classic© support
14 | - Bruteforce MIFARE© card
15 | - MIFARE© Ultralight© support
16 | - Read/Write NTAG2xx©
17 | - Dump card to SDCard
18 |
19 |
20 | | Tag type | Read sector* | Write sector | Authentication** |
21 | | ----------------- | ------------------ | ------------------ | ------------------ |
22 | | Mifare classic | :white_check_mark: | :x: | :white_check_mark: |
23 | | Mifare Ultralight | :white_check_mark: | :x: | :x: |
24 | | Felica | :white_check_mark: | :x: | :x: |
25 | | NTAG2xx | :white_check_mark: | :x: | :x: |
26 |
27 | *If read sector supported, dump to SD card is possible
28 |
29 | ** If Authentication supported, bruteforce is possible
30 |
31 | Read UID is always supported for all ISO14443A tags
32 |
33 | ## Requirements
34 |
35 | - PN532 module
36 | - SDCard
37 |
38 | The NFC module of CapibaraZero can read almost any ISO14443A like Mifare Classic, Ultralight, ecc... and ISO18092(FeliCa) card but there are some limitation:
39 |
40 | - Write tag not implemented yet(both MIFARE and FeliCa)
41 | - Tag with different tag than default(FFFFFFFFFFFF) will give authentication error(We will add support to different keys soon)
42 |
43 |
Output MAC: {mac}
38 |