Test performed with AOF enabled, fsync policy 1 second, allowing the rewrites to be triggered.
Command lines used:
./redis-benchmark -q -P 32 -n 1000000 -t set,get -r 1000000
#include <stdio.h> | |
//bsize=$(du -b ./data.dns|awk '{print $1}') | |
//hping3 -1 -p 53 -E ./data.dns -d ${bsize} 127.0.0.1 -jJ | |
main( ) | |
{ | |
FILE *fp; | |
fp=fopen("data.dns", "w"); | |
fprintf(fp, "%c%c%c%c", 0x00, 0x01, 0x01, 0x00); | |
fprintf(fp, "%c%c%c%c", 0x00, 0x01, 0x00, 0x00); |
When creating your rules for YARA keep in mind the following guidelines in order to get the best performance from them. This guide is based on ideas and recommendations by Victor M. Alvarez and WXS.
Global rules are evaluated first. Only if they are satisfied non-global rules are evaluated. This may be useful if all samples exhibit the same characteristics. Use them combined with the "private" statement to suppress a match notification on the global rules.
obj-m += lkm_hello1.o | |
KDIR ?= /lib/modules/$(shell uname -r)/build | |
all: | |
make -C $(KDIR) M=$(PWD) modules | |
clean: | |
make -C $(KDIR) M=$(PWD) clean |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
#!/bin/bash | |
# install can-utils | |
git clone https://github.com/linux-can/can-utils.git | |
cd can-utils | |
./autogen.sh | |
./configure | |
make | |
sudo make install |
#!/usr/bin/env python3 | |
# | |
# Exploit for "assignment" of GoogleCTF 2017 | |
# | |
# CTF-quality exploit... | |
# | |
# Slightly simplified and shortened explanation: | |
# | |
# The bug is a UAF of one or both values during add_assign() if a GC is | |
# triggered during allocate_value(). The exploit first abuses this two leak a |
#!/usr/bin/env python3 | |
# | |
# Exploit for "assignment" of GoogleCTF 2017 | |
# | |
# CTF-quality exploit... | |
# | |
# Slightly simplified and shortened explanation: | |
# | |
# The bug is a UAF of one or both values during add_assign() if a GC is | |
# triggered during allocate_value(). The exploit first abuses this two leak a |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/sysinfo.h> | |
void printMemStat(){ | |
struct sysinfo si; | |
sysinfo(&si); | |
printf("===\n"); | |
printf("Total: %llu\n", si.totalram); | |
printf("Free: %llu\n", si.freeram); |
import sys | |
def factors(n): return ([x]+factors(n/x) for x in xrange(2,n+1) if n%x==0).next() if n>1 else [] | |
num=int(sys.argv[1]) | |
print factors(num) |