for /L %a IN (1,1,254) DO ping /n 1 /w 3 192.168.1.%a | find "Reply"
Category: Cheatsheet
Arduino UNO R3 as USB HID
Ignore all old instructions. They are either outdated as HoodLoader1.8 is too old or just wrong.
- Install HoodLoader2 on Arduino UNO R3.
https://github.com/NicoHood/HoodLoader2/wiki - Update Arduino IDE with HooderLoader2 board definition according to the instructions.
- Install HID-project library on Arduino IDE .
- To program the USB MCU, select board-> Hoodloader 16u2.
Note:
- Two MCU exist now -> USB MCU (16u2) and IO MCU (original – atmega328)
- To stop USB MCU from loading and go to IO MCU, short the reset pins twice. The normal Arduino Uno name will appear in the COM port. You can program the USB MCU directly from here too.
- HID functions are slightly different. Follow the example in HID-project closely.
Arduino Script
#include "HID-Project.h"
void setup() {
// Setup
Keyboard.begin();
delay(1000);
// Attack
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press('r');
Keyboard.releaseAll();
delay(1000);
Keyboard.println("iexplore https://imsj.dev/tools/test.php");
Keyboard.press(KEY_ENTER);
Keyboard.releaseAll();
delay(1000);
// End
}
void loop() {
}
Additional PHP Modules Installation
Additional PHP modules that should be installed
apt-get install -y memcached
apt-get install -y php7.*-tidy php-memcached
phpenmod memcached
phpenmod tidy
systemctl restart apache2
Proper Nmap High Speed Scan
sysctl -w net.ipv4.ip_local_port_range="15000 61000"
sysctl -w net.ipv4.tcp_fin_timeout=30
sysctl -w net.ipv4.tcp_tw_recycle=1
sysctl -w net.ipv4.tcp_tw_reuse=1
sysctl -w net.ipv4.icmp_ratelimit=0
nmap -A -sS -sU -Pn -p- -T4 address
How to prevent hotlinking in AWS S3
Simple way to prevent hotlinking via referer fields in the HTTP Request.
(Does not block crafted requests)
- Go to AWS S3 Console
- Go to your bucket name -> Permissions -> Bucket Policy
- Enter the following policy (with replacement at the correct places)
{ "Version": "2008-10-17", "Id": "", "Statement": [ { "Sid": "Allow in my domains", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::imsj-wordpress/*", "Condition": { "StringLike": { "aws:Referer": "https://imsj.dev/*" } } }, { "Sid": "Deny access if referer is not my sites", "Effect": "Deny", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::imsj-wordpress/*", "Condition": { "StringNotLike": { "aws:Referer": "https://imsj.dev/*" } } } ] }