Skip to content

Instantly share code, notes, and snippets.

View leveryd's full-sized avatar
💭
working

leveryd leveryd

💭
working
View GitHub Profile
@leveryd
leveryd / nfqueue_backdoor.md
Last active March 20, 2024 06:00
nfqueue_backdoor.c
// https://github.com/irontec/netfilter-nfqueue-samples/blob/master/sample-helloworld.c
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netinet/in.h>
#include <linux/types.h>
#include <linux/netfilter.h>
#include <libnetfilter_queue/libnetfilter_queue.h>
  • 为什么要做go安全研究?

    工作上我需要审计cncf下的应用,其中有一半以上的项目用到go,自然地需要研究go安全。

    感觉java和go目前是后端开发最活跃的两个语言,java安全太卷了,go安全目前还比较"新",所以更倾向于研究go安全。

  • 为什么要写本文档?

    三个原因:

  • 整理自己的思路

@leveryd
leveryd / docs.go
Created April 23, 2022 02:12
tidb-dashboard生成的swagger文件
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag
package swaggerspec
import (
"bytes"
"encoding/json"
"strings"
@leveryd
leveryd / go.md
Last active May 15, 2022 08:51

规则

  • 命令执行

    \.exec\(|\.exec\.Command
    
  • 文件操作

@leveryd
leveryd / shiro.py
Last active December 28, 2021 09:31
# coding:utf-8
import requests
import uuid
import subprocess
import unittest
import os
import base64
import traceback
from Crypto.Cipher import AES

背景

#include <stdio.h>
#include <malloc.h>

int main() {
    int *m = NULL, *n = NULL;
    printf("begin\n");
    m = malloc(64 * 1024);
    getchar();
@leveryd
leveryd / 检测方案.md
Last active December 19, 2024 08:17
webshell检测调研

webshell检测技术

技术 举例
沙箱 百度webdir
RASP 百度OpenRASP
静态分析-正则
静态分析-统计学角度
静态分析-AST
机器学习/深度学习
@leveryd
leveryd / hellofs.go
Created October 1, 2021 16:20
自制文件系统
// 实现一个叫做 hellofs 的文件系统
// https://mp.weixin.qq.com/s?__biz=Mzg3NTU3OTgxOA==&mid=2247491246&idx=1&sn=d4b50e713618b10e44a6925ab9305706&chksm=cf3e0e6bf849877df80ad428f881ad989c6cc8387dd88b6510c8d80c40aa3789c4b27c6ba7d7&cur_album_id=1819478029098663939&scene=189#rd
package main
import (
"context"
"flag"
"log"
"os"
"syscall"
@leveryd
leveryd / test_thread.c
Created September 29, 2021 10:41
测试execve是否会销毁所有线程
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define NUM_OF_TASKS 1
void *func()
{