How police can get your deleted files: When you delete a file, it is not immediately erased from the storage device. Instead, the system marks the space occupied by the file as "available" for reuse. This means that the original file's data is still present on the device until it is overwritten by new data.
During this interval, forensic analysis can recover the data from the original file using specialized techniques. These techniques may involve directly reading the storage device or using advanced software tools to search for residual information.
Here's how to evade this technique:
I have created a program in C that allows you to effectively delete files by overwriting them with a random compilation of bytes 15 times. As intellectual property does not exist, feel free to modify it (ONLY WORKS FOR RASPBERRY PI PICO!).
//code:
#include
#include
#include
#include "pico/stdlib.h"
#include "hardware/flash.h"
#include "pico/bootrom.h"
void fill_random_data(uint8_t *buffer, uint32_t size) {
for (uint32_t i = 0; i < size; ++i) {
buffer[i] = rand() & 0xFF;
}
}
int main() {
uint flash_size_bytes;
#ifndef PICO_FLASH_SIZE_BYTES
flash_size_bytes = 16 * 1024 * 1024;
#else
flash_size_bytes = PICO_FLASH_SIZE_BYTES;
#endif
flash_range_erase(0, flash_size_bytes);
uint32_t file_start_address = /* file start address */;
uint32_t file_size_bytes = /* file size in bytes */;
uint8_t* random_data = malloc(file_size_bytes);
for (int i = 0; i < 15; ++i) {
fill_random_data(random_data, file_size_bytes);
flash_range_program(file_start_address, random_data, file_size_bytes);
}
free(random_data);
#ifdef PICO_DEFAULT_LED_PIN
gpio_init(PICO_DEFAULT_LED_PIN);
gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
for (int i = 0; i < 3; ++i) {
gpio_put(PICO_DEFAULT_LED_PIN, 1);
sleep_ms(100);
gpio_put(PICO_DEFAULT_LED_PIN, 0);
sleep_ms(100);
}
#endif
reset_usb_boot(0, 0);
return 0;
}
!Replace with the actual size of the file and the starting position