Skip to content

Instantly share code, notes, and snippets.

@ilbaroni
ilbaroni / docker-compose.yml
Created April 8, 2024 14:41 — forked from ykyuen/docker-compose.yml
docker-container-log-rotation-04
version: '3.2'
services:
nginx:
image: 'nginx:latest'
ports:
- '80:80'
logging:
driver: "json-file"
options:
max-size: "1k"
@ilbaroni
ilbaroni / README.md
Created February 2, 2024 16:11 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

; shellcode found on Windows host. Payload was stored in the registry. Powershell
; was used to extract it from the registry and execute it:
; C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -windowstyle \
; hidden -c "$val = (gp HKLM:SOFTWARE\'਀਀').'਀਀'; \
; $d = [System.Text.Encoding]::Unicode.GetString([System.convert]::FromBase64String($val)); iex $d"
; The following references were used to help comment the shellcode
; https://github.com/rapid7/metasploit-framework/blob/master/external/source/shellcode/windows/x86/src/block/block_reverse_https_proxy.asm
; https://hiddencodes.wordpress.com/2014/11/11/api-hash-list-4/

Keybase proof

I hereby claim:

  • I am ilbaroni on github.
  • I am ilbaroni (https://keybase.io/ilbaroni) on keybase.
  • I have a public key ASBwV7nuN9S5ZS9h68BulBvNfGzHuGBuOuKbHOyMIQBO5Qo

To claim this, I am signing this object:

@ilbaroni
ilbaroni / emulator-extended-x64.py
Created May 4, 2022 10:26 — forked from Barakat/emulator-extended-x64.py
Emulating x64 machine code using Unicorn (A CPU scriptable emulator)
#!python3
# -*- coding: utf-8 -*-
# pip install unicorn
import unicorn
import unicorn.x86_const
import struct
def required_mapping_size(size):
page_size = 4096
@ilbaroni
ilbaroni / pyspark-geoip2.py
Created March 24, 2022 14:56 — forked from geekmoss/pyspark-geoip2.py
PySpark Geoip2 udf for get country & least specific region
from pyspark import SparkContext, SparkFiles
from pyspark.sql import SparkSession
from pyspark.sql.types import *
from pyspark.sql.functions import DataFrame, udf, col
from geoip2 import database
from geoip2.errors import AddressNotFoundError
from geoip2.models import City
sc = SparkContext()
spark = SparkSession(sc)
@ilbaroni
ilbaroni / pandas.py
Created November 12, 2021 12:12 — forked from rjurney/pandas.py
Load Gzipped JSON Lines generated by Spark into Pandas
import pandas as pd
import numpy as np
import glob
pd.set_option('display.max_columns', 500)
all_files = glob.glob('../data/patent_applications/2019-04-07.jsonl.gz/part-*.json.gz')
li = []
for filename in all_files:
@ilbaroni
ilbaroni / callcon.md
Created October 25, 2021 11:10 — forked from sucremad/callcon.md
Function Call Conventions

Most Common Calling Conventions

Most commons are cdecl, stdcall, fastcall

In function calls, parameters are pushed onto the stack/registers from right to left.

Example Function Pseudo Code

int func(int x, int y, int z, int m, int k);
 
int a, b, c, d, e, ret;
import ida_netnode
"""
You can also switch the shell into IDC mode and enter del_user_info().
You can also edit your `~/ida-x/cfg/ida.cfg` and set `STORE_USER_INFO` to `NO`.
"""
# This will replace the original user blob with the evaluation version blob.
ORIGINAL_USER = \