Skip to content

Instantly share code, notes, and snippets.

View trupples's full-sized avatar
🚀
filtering kalmans

Ioan Dragomir trupples

🚀
filtering kalmans
View GitHub Profile
@trupples
trupples / _writeup.md
Last active July 16, 2021 19:47
OneSmallHackForMan HackASat 2021 Quals scripts

OneSmallHackForMan

HackASat 2021 Quals writeups

Solution scripts can be found at: https://gist.github.com/trupples/5cc02e24d1d639fe62ecea3ad03aa892

Tasks we solved but did not get to do writeups for:

  • Cape Canaveral (warmup)
  • Vandenberg (warmup)
  • Edwards (warmup)
  • Cotton Eye GEO (script attached; similar to Fiddlin' John Carson, with the addition of using pyorbital to plan the rather simple maneuver)
@trupples
trupples / 1a_demod.py
Last active May 20, 2020 13:04
Code samples for my Defcon CTF 2020 mooodem writeup
from pwn import *
import struct
samples_per_second = 48000
bits_per_second = 1200
samples_per_bit = samples_per_second // bits_per_second
assert samples_per_second % bits_per_second == 0, "The following code assumes samples/bit is an integer"
START_BIT = 0
STOP_BIT = 1
@trupples
trupples / context-free-grammar-all-words-max-len.cpp
Created May 6, 2020 10:58
O tema de Limbaje si Automate Finite care mi s-a parut interesanta
/* Pentru o gramatica independenta de context, sa se genereze toate cuvintele
* avand o lungime maxima data.
*
* Input:
* o gramatica independenta de context oarecare si un numar natural
* oarecare, n
*
* Output:
* toate cuvintele de lungime mai mica sau egala cu n generate de gramatica
* data ca input G.
@trupples
trupples / 0_writeups.md
Last active May 9, 2020 12:54
PwnThyBytes CTF Writeups - easy_heap_trick

PwnThyBytes CTF Writeups - easy_heap_trick

Bilingual

Author: dnne Scripts: bilingual.py

After examining the files we can see that the program expects a single shellcode which should open a shell for both x86 and x86_64.

@trupples
trupples / _breakingin-2.md
Last active April 22, 2019 08:17
https://youtu.be/muY4U0XH28Q | breakingin - writing a proxy to bypass the firewall - WPICTF 2019

breakingin 2

Writing a proxy to bypass the firewall

This gist contains all the scripts written in the last video of the series.

  • breakingin-run.py takes in 3 arguments: the attacker host, port and the VM assembly file. It replaces {port} and {ip} with the ones from the first two arguments and sends the compiled code to breakingin.wpictf.xyz:31337.

  • breakingin-run-with-slowdown.py is identical to the previous one but also sends a regular stream of messages on stdin.

  • breakingin-run-with-proxy.py also adds the local proxy logic.

  • proxy1.fasm is the code for the first proxy. This one has the problem of expecting alternating packet directions.

@trupples
trupples / _breakingin-1.5.md
Last active April 22, 2019 08:20
https://youtu.be/zcbIycJ5q1E | breakingin - automating program assembly - WPICTF 2019

breakingin 1.5

Automating assembly with FASM macros

This gist contains all the scripts written in the intermediary mini-video of the series.

  • macros.inc contains all the macros.
  • breakingin-add-2.fasm is the add program we wrote to test this workflow works.
  • assemble.py contains both the assemble function as well as a test program.
@trupples
trupples / _breakingin-1.md
Last active June 9, 2023 00:07
https://youtu.be/yEbAQXDKRKY | breakingin - reverse engineering a custom VM - WPICTF 2019 | python scripts

breakingin 1

Reverse engineering a custom VM architecture

This gist contains all the scripts written in the first video of the series.

  • breakingin-add.py sends the first program we wrote: a simple addition.
  • breakingin-good-bf.py implements the more efficient opcode search.
  • breakingin-syscall-search.py tries all syscall numbers.
  • breakingin-write.py demonstrates syscall call convention with the write (1) syscall.

Studiu structura tablourilor de tip bool

Atat la concursuri si olimpiade cat si in aplicatii practice, de multe ori se intalneste problema eficientei spatiului, cel mai grav caz al acesteia fiind stocarea unui tablou care contine valori de tip bool. Toate seturile de instructiuni moderne (x86, x64, ARM) pot adresa memorie doar la nivel de octet. Din aceasta cauza, aplicatii care necesita granularitate mai mare pentru elemente ce nu necesita ocuparea unui intreg octet trebuie ori sa sacrifice timp de executie pentru a combina mai multe elemente intr-un singur octet, ori sa sacrifice memorie, punand un singur element per octet si ignorand spatiul ramas neutilizat.

Exista un zvon ca tablourile din C sunt optimizate automat de compilator pe sisteme Linux in cadrul Olimpiadei de Informatica.

Deoarece mediul incurajat in cadrul Olimpiadei este Code::Blocks cu compilatoarele gcc/g++ MinGW, e natural ca si comisia de evaluare sa foloseasca aceleasi compilatoare pe Windows si variantele lor de linux pentru eva

<html>
<head>
<script>
var db = {
citizens:
[
{
phoneNumber:"40749254162",
lastName:"Bootan",
firstName:"Lee View",
<html><body><script>/*
* Acesta este un editor de JavaScript.
*
* Introduceți niște cod JavaScript, apoi clic dreapta sau alegeți din meniul Executare:
* 1. Rulează pentru a evalua textul selectat (Ctrl+R),
* 2. Inspectează pentru a deschide inspectorul de obiect pe rezultat (Ctrl+I), sau
* 3. Afișează pentru a insera rezultatul într-un comentariu după selecție. (Ctrl+L)
*/
clearInterval(interval);