text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
### 一步到达 OEP 法介绍
所谓的一步到达OEP的脱壳方法, 是根据所脱壳的特征, 寻找其距离OEP最近的一处汇编指令, 然后下int3断点, 在程序走到OEP的时候dump程序.
如一些压缩壳往往popad指令距离OEP或者大jmp特别近, 因此使用Ollydbg的搜索功能, 可以搜索壳的特征汇编代码, 达到一步断点到达OEP的效果.
### 一步到达 OEP 法要点
1. ctrl+f 查找popad
2. ctrl+l 跳转到下一个匹配处
3. 找到匹配处, 确认是壳解压完毕即将跳转到OEP部分, 则设下断点运行到该处
4. 只适用于极少数压缩壳 | sec-knowleage |
# fermat-strings
Binary Exploitation, 250 points
## Description
> Fermat's last theorem solver as a service.
A binary file was attached, together with the source code:
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#define SIZE 0x100
int main(void)
{
char A[SIZE]... | sec-knowleage |
# VM-Plan
<p align="center">
<a href="https://twitter.com/mittye97/status/1237293281202978817"><img src="../../assets/img/banner/VM-Plan.jpg" width="90%"></a>
</p>
---
## VMware 常见问题
**关闭虚拟内存**
使用 VMWare 虚拟机,虚拟机启动后,会在虚拟机目录下建立一个与虚拟内存大小相同的 .vmem 文件,这个文件主要是将虚拟机内存的内容映射到磁盘,以支持在虚拟机的暂停等功能
- **对特定的虚拟机"禁用" vmem 文件**
修改特定虚... | sec-knowleage |
# CTF writeups from P4 Team
## 2023
* [2023.04.01 **Hack-a-Sat 4 Quals**(4th place/381 teams)](2023-04-01-hackasat-quals)
* [2023.03.24 **Insomni'hack CTF 2023**(7th place/84 teams)](2023-03-24-insomnihack-finals)
## 2022
* [2022.01.29 **InsomniHack Teaser 2022**(1st place/489 teams)](2022-01-29-insomnihack)
## 2021
* ... | sec-knowleage |
# timbre
Category: Steganography
## Description
> Seek the KEY, save the world. Find it in the very not suspicious [playlist](https://www.youtube.com/playlist?list=PLQHSEXRhc1RgfdFWMHyAclXWMc9a98RoH).
>
> The flag is in the format KEY: (FLAG), all uppercase.
>
> Please convert it to the format cstechnion{FLAG} and ch... | sec-knowleage |
## TexMaker (Web, 90p)
Description: Creating and using coperate templates is sometimes really hard. Luckily,
we have a webinterace for creating PDF files. Some people doubt it's secure, but I reviewed
the whole code and did not find any flaws.
###ENG
[PL](#pl-version)
In this task we could upload latex file, which ... | sec-knowleage |
# Super Safe RSA
Cryptography, 350 points
## Description:
> Dr. Xernon made the mistake of rolling his own crypto.. Can you find the bug and decrypt the message?
## Solution:
After connecting to the server, we receive a response similar to the the following:
```console
root@kali:/media/sf_CTFs/pico/Super_Safe_RSA# nc ... | sec-knowleage |
# Django Potential SQL injection via Trunc(kind) and Extract(lookup_name) arguments (CVE-2022-34265)
[中文版本(Chinese version)](README.zh-cn.md)
Django released a security update on July 4, 2022, which fixes a SQL injection vulnerability in the Trunc() and Extract() database functions.
Reference link:
- https://www.dj... | sec-knowleage |
### RAR文件格式
RAR 文件主要由标记块,压缩文件头块,文件头块,结尾块组成。
其每一块大致分为以下几个字段:
| 名称 | 大小 | 描述 |
| ---------- | ---- | --------------------- |
| HEAD_CRC | 2 | 全部块或块部分的CRC |
| HEAD_TYPE | 1 | 块类型 |
| HEAD_FLAGS | 2 | 阻止标志 |
| HEAD_SIZE | 2 | 块大小 |
| ADD_SI... | sec-knowleage |
fdisk
===
查看磁盘使用情况和磁盘分区
## 补充说明
**fdisk命令** 用于观察硬盘实体使用情况,也可对硬盘分区。它采用传统的问答式界面,而非类似DOS fdisk的cfdisk互动式操作界面,因此在使用上较为不便,但功能却丝毫不打折扣。
### 语法
```shell
fdisk [选项] <磁盘> 更改分区表
fdisk [选项] -l [<磁盘>...] 列出分区表
```
### 选项
```shell
选项:
-b, --sectors-size <大小> 显示扇区计数和大小
-B, --protect-boot 创建新标签时不要擦除 boo... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/phpmyadmin:4.4.15.6
volumes:
- ./config.inc.php:/var/www/html/config.inc.php
ports:
- "8080:80"
depends_on:
- mysql
mysql:
image: mysql:5.5
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=test | sec-knowleage |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | sec-knowleage |
\" 中文版版权所有 Liu JingSong, www.linuxforum.net 2000
\" 本文档可在遵照LDP GENERAL PUBLIC LICENSE,Version 1, September 1998
\" 中描述的条件下进行复制,且该文件发布时必须包含该文档.
\"
.TH bzip2 1
.SH NAME 命令名
.br
bzip2, bunzip2 \- 一种块排序文件压缩软件,v0.9.5
.br
bzcat \- 将文件解压缩至标准输出
.br
bzip2recover \- 恢复损坏的 bzip2 文件
.SH 总览
.ll +8
.B bzip2
.RB [ " \-cdfkqstvzVL1234... | sec-knowleage |
ulimit
===
控制shell程序的资源
## 补充说明
**ulimit命令** 用来限制系统用户对shell资源的访问。如果不懂什么意思,下面一段内容可以帮助你理解:
假设有这样一种情况,当一台 Linux 主机上同时登陆了 10 个人,在系统资源无限制的情况下,这 10 个用户同时打开了 500 个文档,而假设每个文档的大小有 10M,这时系统的内存资源就会受到巨大的挑战。
而实际应用的环境要比这种假设复杂的多,例如在一个嵌入式开发环境中,各方面的资源都是非常紧缺的,对于开启文件描述符的数量,分配堆栈的大 小,CPU 时间,虚拟内存大小,等等,都有非常严格的要求。资源的合理限制和分配,不仅仅是保证系统可用性的必要条件,也... | sec-knowleage |
# fastjson 1.2.24 反序列化导致任意命令执行漏洞
fastjson在解析json的过程中,支持使用autoType来实例化某一个具体的类,并调用该类的set/get方法来访问属性。通过查找代码中相关的方法,即可构造出一些恶意利用链。
参考资料:
- https://www.freebuf.com/vuls/208339.html
- http://xxlegend.com/2017/04/29/title-%20fastjson%20%E8%BF%9C%E7%A8%8B%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96poc%E7%9A%84%E6%9E%84%E9%80%A0%E5%92... | sec-knowleage |
look
===
显示文件中以指定字符串开头的任意行
## 补充说明
**look命令** 用于显示文件中以指定字符串开头的任意行。
### 语法
```shell
look(选项)(参数)
```
### 选项
```shell
-a:使用另一个字典文件web2,该文件也位于/usr/dict目录下;
-d:只对比英文字母和数字,其余一概忽略不予比对;
-f:忽略字符大小写差别;
-t<字尾字符串>:设置字尾字符串。
```
### 参数
* 字符串:指定要查找的字符串;
* 文件:指定要查找的目标文件。 | sec-knowleage |
lsmod
===
显示已载入系统的模块
## 补充说明
**lsmod命令** 用于显示已经加载到内核中的模块的状态信息。执行lsmod命令后会列出所有已载入系统的模块。Linux操作系统的核心具有模块化的特性,应此在编译核心时,务须把全部的功能都放入核心。您可以将这些功能编译成一个个单独的模块,待需要时再分别载入。
### 语法
```shell
lsmod
```
### 实例
```shell
[root@LinServ-1 ~]# lsmod
Module Size Used by
ipv6 272801 15
xfrm_nalgo ... | sec-knowleage |
# symfonos5-WalkThrough
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶机地址**
- https://www.vulnhub.com/entry/symfonos-5,415/
**Description**
Beginner real life based machine designed to teach people the importance of understanding from the interior.
Tested on VMware and Virtualbox
**知识点**
- ssr... | sec-knowleage |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH PRINTF 1 2022年9月 "GNU coreutils 9... | sec-knowleage |
# mongo-express 远程代码执行漏洞(CVE-2019-10758)
mongo-express是一款mongodb的第三方Web界面,使用node和express开发。如果攻击者可以成功登录,或者目标服务器没有修改默认的账号密码(`admin:pass`),则可以执行任意node.js代码。
## 漏洞环境
执行如下命令启动一个0.53.0版本的mongo-express:
```bash
docker compose up -d
```
环境启动后,访问`http://your-ip:8081`即可查看到Web页面。
## 漏洞复现
直接发送如下数据包,即可执行代码`this.constructor.c... | sec-knowleage |
# Writeup Whitehat CTF GP 2016
Team: nazywam, c7f.m0d3, akrasuski1, cr019283, shalom
### Table of contents
* [Banh can / Hello (web)](hello) | sec-knowleage |
## Delphi 代码审计 -- 项目实战1
### 1、Function & Procedure
Delphi 把操作数据的方法分成了两种,一种是 function,另一种是 procedure,大致理解为“函数”和“过程”。
Procedure 类似 C 语言中的无返回值函数,即 VOID。而 Function 就是 C 语言中的有返回值函数,即没有 Void。

### 2、连接数据库
程序分为两种连接数据库模式:
... | sec-knowleage |
# 威胁情报的落地
本篇主要记录威胁情报落地相关的内容,从威胁情报的实际作用环节开始。
> - TTPs树结合CEP引擎可以从行为上判断是否是被标记的攻击者或相近攻击者
> - TTPs情报可以给红队当做指导手册来模拟真实风险下的真实敌人
> - 特定类型的pDNS、IoC标记可以融入告警中为事件提供背景支撑
> - 漏洞情报中的触发点描述可以结合RASP等安全组件采集的数据捕获一些在野的利用并同步到waf(类似于切面安全)
## 作用环节
威胁情报的实际应用环节:
- TTPs结合复杂事物处理(CEP)引擎从行为上判断是否被是被标记的攻击者或相近攻击者[1]
- 简单讲是从数据中进行... | sec-knowleage |
[计算机操作系统](https://github.com/CyC2018/CS-Notes/blob/master/notes/%E8%AE%A1%E7%AE%97%E6%9C%BA%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%20-%20%E7%9B%AE%E5%BD%95.md) | sec-knowleage |
# 企业安全中价值需求和成熟度模型
## 价值需求
> 对于企业安全团队而言,永恒的价值需求有四个方面,第一是攻陷主机分析,从告警里面发现和得出哪些机器哪些目标是被攻陷的,是需要被处置的;第二是态势感知,能够有较为完善的平台整理和总结安全数据,为安全运营提供可视化管理能力和感知能力;第三是安全运营,建立安全威胁运营机制,形成监控、预警、处置、调查、加固一系列安全运营流程,实现威胁监测、应急等各项工作标准化、自动化和人力成本最小化;第四,是溯源和报告,对告警事件深入分析,体现安全团队这个成本部门的核心价值。
>
> 【威胁情报】威胁情报之落地实战——由灰向黑篇,[刘威歆](http://blog.nsfocus.net/author/... | sec-knowleage |
vgrename
===
使用vgrename命令可以重命名卷组的名称
## 补充说明
**grename命令** 可以重命名卷组的名称。
### 语法
```shell
vgrename [选项] [旧卷组路径|旧卷组名称|旧卷组UUID] [新卷组路径|新卷组名称]
```
### 选项
```shell
-d 启用调试模式
-t 启用测试模式
```
### 例子
重命名卷组/dev/vg1为/dev/vg2。
```shell
[root@localhost ~]# vgrename /dev/vg1 /dev/vg2
Volume group "vg1" successfullyrenamed to "vg2"
```... | sec-knowleage |
require_relative 'unholy'
include UnHoly
python_hi
puts ruby_hi
puts "Programming Skills: PRIMARILY RUBY AND PYTHON BUT I CAN USE ANY TYPE OF GEM TO CONTROL ANY TYPE OF SNAKE"
puts "give me your flag"
flag = gets.chomp!
arr = flag.unpack("V*")
is_key_correct? arr | sec-knowleage |
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de ... | sec-knowleage |
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de ... | sec-knowleage |
# A...mazeing (Network / PPC, 200) (16 solvers)
Hi!. let's play old nes game. I just plugged this stuff to tcp ports for ya ...
IP: amazeing.hackable.software

In this task we were told that there is a service runnning a game
and several TCP ports represent pressing various buttons on SNES
contro... | sec-knowleage |
sftp-server
===
sftp协议的服务器端程序
## 补充说明
**sftp-server命令** 是一个“sftp”协议的服务器端程序,它使用加密的方式进行文件传输。
### 语法
```shell
sftp-server
``` | sec-knowleage |
# Ethereum Basics
对智能合约一些基础知识的介绍。
## Solidity
> Solidity is an object-oriented programming language for writing smart contracts. It is used for implementing smart contracts on various blockchain platforms, most notably, Ethereum. It was developed by Christian Reitwiessner, Alex Beregszaszi, and several former Ethereum ... | sec-knowleage |
## Kali Linux 工具清单
|[Information Gathering](Information%20Gathering/list.md)||||||
|:-:|:-:|:-:|:-:|:-:|:-:|
|[acccheck](Information%20Gathering/acccheck.md)|[ace-voip](Information%20Gathering/ace-voip.md)|[Amap](Information%20Gathering/Amap.md)|[Automater](Information%20Gathering/Automater.md)|[bing-ip2hosts](Informat... | sec-knowleage |
# 0x00 简介
权限维持以启动CS会话为例,不涉及账号隐藏等等,
常见的可以用于启动会话的权限维持方式。
Windows
1. 注册表
2. 启动项
3. 计时任务
4. 服务
5. shift或者放大镜
6. 各种劫持
7. 利用其他安装的软件
网上都有相关资料这里我就不详细讲述了,这里根据YouTube作者视频讲的"服务",所以这里我也以它为例。
# 0x01 服务
首先生成一个windows Service exe

```
beacon> cd C:\WINDOWS\Temp\
[*] cd C:\WINDOWS\Temp\
[+] host calle... | sec-knowleage |
# S2-013/S2-014 远程代码执行漏洞
影响版本: 2.0.0 - 2.3.14.1
漏洞详情:
- http://struts.apache.org/docs/s2-013.html
- http://struts.apache.org/docs/s2-014.html
## 测试环境搭建
```
docker compose build
docker compose up -d
```
## 原理与测试
Struts2 标签中 `<s:a>` 和 `<s:url>` 都包含一个 includeParams 属性,其值可设置为 none,get 或 all,参考官方其对应意义如下:
1. none -... | sec-knowleage |
## Whiteout Mathmatics (Reverse, PPC, 200p)
tl;dr reverse the program, find the number that matches the problem
Our job is to run the included [whitespace program](program) with following arguments: `100 1000000000000`
After some fiddling with it, we've noticed it's hard to get the output in reasonable for anything bi... | sec-knowleage |
# LAXT (ppc, 145p, 49 solved)
In the challenge we connect to the server and after solving Proof of Work get get:
```
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
| for a give number like 2018 please construct each integer from 0 to 100, with the |
| digits of it, for example: 96 = 12 *... | sec-knowleage |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CVE-2022-22978</title>
</head>
<body>
ERROR sorry...
</body>
</html> | sec-knowleage |
# Serifin (Crypto, 140p, 33 solved)
In the challenge we get [code](serifin.py) and [output](output.txt).
The important part here is the primes generation:
```python
def genPrime(nbit):
while True:
p = getPrime(512)
if p % 9 == 1 and p % 27 >= 2:
q = gmpy2.next_prime(serifin(p, 3) + serif... | sec-knowleage |
# Climate Controller Catastrophe, Exp, 750pts
> Catting cars is a major issue these days. It's impossible to sell your stolen car as a whole, so you sell it in parts. Dashboard computers are popular since they break quite often ;-).
> Unfortunately, the dashboard computer is paired with the main computer. So, simply ex... | sec-knowleage |
# Star CTF 2018
Team: c7f.m0d3, akrasuski1, ppr, shalom, nazywam, Eternal
### Table of contents
* [milktea (re)](milktea)
* [primitive (crypto)](primitive) | sec-knowleage |
---
title: lbd
categories: Information Gathering
tags: [kali linux,recon,lbd,information gathering,webapps]
date: 2017-04-23 09:46:00
---
0x00 介绍
-------
视频介绍:[https://asciinema.org/a/32257][1]
lbd(load balancing detector,负载平衡检测器)检测给定的域是否使用DNS/HTTP负载平衡(通过Server和DateHTTP响应头字段和服务器应答之间的差异)。
<!--more-->
[主页][2] | [仓库][3]
... | sec-knowleage |
# core
Forensics, 350 points
## Description:
> This program was about to print the flag when it died. Maybe the flag is still in this core file that it dumped?
Attached were two binary file.
## Solution:
Let's open the core file with GDB:
```
root@kali:/media/sf_CTFs/pico/core# gdb print_flag core
GNU gdb (Debian 7.12-... | sec-knowleage |
yes
===
重复打印指定字符串
## 补充说明
**yes命令** 在命令行中输出指定的字符串,直到yes进程被杀死。不带任何参数输入yes命令默认的字符串就是y。
### 语法
```shell
yes(参数)
```
### 参数
字符串:指定要重复打印的字符串。
### 实例
```shell
[root@localhost ~]# yes testline
testline
testline
testline
testline
testline
testline
testline
testline
...一直重复打印 testline,按Ctrl+C结束。
``` | sec-knowleage |
---
title: Grep
date: 2020-11-25 18:28:43
background: bg-emerald-400
tags:
- egrep
- search
- pattern
- text
categories:
- Linux Command
intro: This cheat sheet is intended to be a quick reminder for the main concepts involved in using the command line program grep and assumes you already understan... | sec-knowleage |
version: '2'
services:
redis:
image: redis:4.0.14-alpine
postgresql:
image: postgres:11.9-alpine
environment:
- POSTGRES_USER=gitlab
- POSTGRES_PASSWORD=password
- POSTGRES_DB=gitlabhq_production
- DB_EXTENSION=pg_trgm
volumes:
- ./load-extensions.sh:/docker-entrypoint-initdb.d... | sec-knowleage |
.\" This man page is Copyright (C) 1999 Andi Kleen .
.\" Permission is granted to distribute possibly modified copies
.\" of this page provided the header is included verbatim,
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.\" 中文版 Copyright (c) 2000 LetBright... | sec-knowleage |
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de ... | sec-knowleage |
# Apache Couchdb Remote Privilege Escalation (CVE-2017-12635)
[中文版本(Chinese version)](README.zh-cn.md)
Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang. CouchDB uses multiple formats and protocols to store, transfer, and process its data. It uses JSON to store data, JavaScript ... | sec-knowleage |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
from time import sleep
from Crypto.Cipher import AES
from base64 import standard_b64decode
class SecureClient:
def __init__(self):
self.msg_end = '</msg>'
self.msg_wrong_pin = 'BAD_PIN'
self.aes_key = 'aes.key'
... | sec-knowleage |
# Challenge 3
Worked with AvivC, YaakovC.
## Description
After finishing [Challenge 2](Challenge2.md) and finding the external IP of the attacker, we can start Challenge 3.
We got an IP address: `http://13.67.133.176`.
## Solution
### Exploring the Website
Let's check out the website:
```console
root@kali:/media/sf_CTF... | sec-knowleage |
<?php
include 'common.php';
?>
<div class="figure">
<img src="images/mario.png" width="200" height="200" alt="Pixel Mario">
</div>
<div class="article">
<h2>Welcome to PixelShop!</h2>
<p>
PixelShop lets you edit your pixel art to perfection. Edit colors, palettes and more, all for free.<br/>
... | sec-knowleage |
# Arbitrary Writing
## 原理
动态数组的任意 Storage 存储写漏洞,根据 [官方文档](https://docs.soliditylang.org/en/v0.8.1/internals/layout_in_storage.html#) 介绍,可总结如下
- EVM 中,有三个地方可以存储变量,分别是 Memory、Stack 和 Storage。Memory 和 Stack 是在执行期间临时生成的存储空间,主要负责运行时的数据存储,Storage 是永久存在于区块链中的变量。
+ Memory: 内存,生命周期仅为整个方法执行期间,函数调用后回收,因为仅保存临时变量,故 GAS 开销很小
... | sec-knowleage |
**注:**请多喝点热水或者凉白开,可预防**肾结石,通风**等。
### Wmic简介:
WMIC扩展WMI(Windows Management Instrumentation,Windows管理工具),提供了从命令行接口和批命令脚本执行系统管理的支持。在WMIC出现之前,如果要管理WMI系统,必须使用一些专门的WMI应用,例如SMS,或者使用WMI的脚本编程API,或者使用象CIM Studio之类的工具。如果不熟悉C++之类的编程语言或VBScript之类的脚本语言,或者不掌握WMI名称空间的基本知识,要用WMI管理系统是很困难的。WMIC改变了这种情况。
**说明:**Wmic.exe所在路径已被系统添加PATH环境变量中... | sec-knowleage |
# 13. 机器人的运动范围
[牛客网](https://www.nowcoder.com/practice/6e5207314b5241fb83f2329e89fdecc8?tpId=13&tqId=11219&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
地上有一个 m 行和 n 列的方格。一个机器人从坐标 (0, 0) 的格子开始移动,每一次只能向左右上下四个方向移动一格,但是不能进入行坐标和列坐标的数位之和大于 k 的格子。
例如,当 k 为 18 时,机器人能... | sec-knowleage |
# 单步跟踪法
单步跟踪法的原理就是通过Ollydbg的步过(F8), 步入(F7)和运行到(F4)功能, 完整走过程序的自脱壳过程, 跳过一些循环恢复代码的片段, 并用单步进入确保程序不会略过OEP. 这样可以在软件自动脱壳模块运行完毕后, 到达OEP, 并dump程序.
## 要点
1. 打开程序按F8单步向下, 尽量实现向下的jmp跳转
2. 会经常遇到大的循环, 这时要多用 F4 来跳过循环
3. 如果函数载入时不远处就是一个call(近call), 那么我们尽量不要直接跳过, 而是进入这个call
4. 一般跳转幅度大的jmp指令, 都极有可能是跳转到了原程序入口点(OEP)
## 示例
示例程序可以点击此处下载: [1_... | sec-knowleage |
### 导入表概述
当可执行文件使用外来 DLL 的代码或数据时,需要 Windows 装载器记录所有要导入的函数和数据,并将 DLL 装载到可执行文件的虚拟地址空间中;装载器会确保可执行文件运行需要的所有 DLL 都被装载。
但对于可执行文件,它无法确定导入函数在内存中的位置,于是 Windows 装载器在装载 DLL 时将定位导入函数需要的信息写入到 IAT(Import Address Table,导入地址表)。待执行中遇到导入函数的调用时,就通过 IAT 确定导入函数在内存中的位置。
导入表相关数据包括 `IMAGE_IMPORT_DESCRIPTOR` 和 `IMAGE_IMPORT_BY_NAME` 以及相应的字符串数据... | sec-knowleage |
<!DOCTYPE html>
<html>
<head>
<title>CVE-2018-1000006 POC</title>
</head>
<body>
<h1>CVE-2018-1000006 POC</h1>
<p>download the <a href="./vulhub-app.tar.gz">vulhub-app.tar.gz</a></p>
<p>and <a href='vulhub://example.com/" "--no-Sandbox" "--gpu-launcher=calc.exe'>click me</a></p>
</body>
</html> | sec-knowleage |
---
title: Numpy
date: 2020-12-14 18:28:43
background: bg-[#4f6fc3]
tags:
- scientific
- computing
categories:
- Python
intro: |
[NumPy](https://numpy.org/) is the fundamental package for scientific computing with Python. This cheat sheet is a quick reference for NumPy beginners.
plugins:
- copyCode... | sec-knowleage |
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\" Copyright (c) 1993-1997 Bell Labs Innovations for Lucent Technologies
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ... | sec-knowleage |
MIT License
Copyright (c) 2017 trimstray
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribut... | sec-knowleage |
# MortAl mage aGEnts (web, 19 solves, 315 pts)
> I want to make a crypto currency. For now, I made the secure wallet service.
> I give you the source code of its service. Can you hack this service? ☆(ゝω・)v
> ※The database is initialized every hour.
The app's source tell us that the first flag is located in the databas... | sec-knowleage |
# Dependency Check
> https://github.com/jeremylong/DependencyCheck
## 简介
Dependency-Check 是一个开源的安全漏洞扫描工具,用于检查应用程序和依赖项中的已知漏洞。它可以扫描各种编程语言的依赖项,如Java、Python、.NET等,并根据公开的漏洞数据库,如NVD、OSV等,检查依赖项的版本是否存在已知的安全漏洞。
Dependency-Check 可以通过命令行或插件集成到各种构建工具中,如Maven、Gradle、Ant等。它会生成报告,显示已检测到的漏洞以及建议的修复措施。这些报告可以帮助开发人员识别和解决与应用程序或依赖项相关的安全问题,从... | sec-knowleage |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH CP 1 2022年9月 "GNU coreutils 9.1" ... | sec-knowleage |
# Logstash Patterns
[官方文档](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html)
## Centos7安装GrokDebug
[github地址](https://github.com/nickethier/grokdebug)
```
# 安装依赖
yum install openssl-devel.x86_64 gcc.x86_64 -y
# 下载ruby
wget https://ruby.taobao.org/mirrors/ruby/2.1/ruby-2.1.7.tar.gz
# 安装ruby
tar... | sec-knowleage |
# Car Crash, RE, 500pts
> This ECU firmware dump, or what's left of it, was taken out of a crashed prototype car. We have to extract the logs from it to investigate the crash. Bad luck, we get some strange garbage printed instead.
> Attached is a program you can reverse-engineer and a program you can test. Don't mix th... | sec-knowleage |
local
===
在函数内定义局部变量。
## 概要
```shell
local [-aAfFgilnrtux] [-p] [name[=value] ...]
```
## 主要用途
- 在函数内定义局部变量
- 显示局部变量
- 在函数内定义全局变量
## 选项
```shell
local命令的选项与declare命令的相同,请参考declare命令的选项。
```
## 参数
name(可选):变量名或已定义函数名。
value(可选):变量的值。
## 返回值
`local`返回true除非你提供了非法选项、赋值错误或是在函数外使用`local`命令。
## 例子
```shell
相关例子请参考declare命令
`... | sec-knowleage |
# T1078-001-win-DSRM密码重置
## 来自ATT&CK的描述
攻击者可能会使用凭据访问技术窃取特定用户或服务账号的凭据,或者在早起的侦察过程通过社会工程捕获凭据以获得首次访问权限。
攻击者可以使用三种账号:默认账号、本地账号和域账号。默认账号是操作系统的内置账号,例如Windows系统上的访客或管理员账号,或者其他类型系统、软件或设备上的默认提供商账号。本地账号是组织配置给用户、远程支持或服务的账号,或单个系统/服务的管理账号。域账号是AD-DS(活动目录域服务)管理的账号,其访问和权限在域内不同系统和服务之间配置。域账号可以涵盖用户、管理员和服务。
## 测试案例
目录还原模式账户
每一个域控制器都有一个本地管理... | sec-knowleage |
## Hidden in Plain Sight (Forensics)
tl;dr read the file before it's been decrypted
In this task, we're only given a mega download link.(https://mega.nz/#!6N0gmRLK!VsN9gLdiYbxMVTA-AdsRjsvezMpdEqiR9ngwrS6gR7k)
The hint is: `you need to know the basic principle behind how MEGA works in order to solve this challenge. Fla... | sec-knowleage |
# Crackme3000 (reverse, 724p)
> Our opponents have set up a private email server to store their correspondence.
> We need to gain access to it. Could you break their advanced authentication protocols?
> crackme3000
In this task we were given a single MIPS binary. It wasn't too big, but reversing it was still painful. A... | sec-knowleage |
---
title: Emacs
date: 2020-12-17 16:21:49
background: bg-[#7752a9]
tags:
- editor
- text
- shortcut
categories:
- Toolkit
intro: |
[Emacs](https://www.gnu.org/software/emacs) is the extensible, customizable, self-documenting real time display text editor.
This reference was made for Emacs 27.
p... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/magento:2.2.7
depends_on:
- mysql
ports:
- "8080:80"
mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=magento | sec-knowleage |
# Ticketastic: Live Instance - FLAG1
## 0x00 Ticket Page
http://127.0.0.1/xxxxxxxxxx/ticket?id=1

## 0x01 Try Modify Parameters
```sql
ticket?id=1'
```
Get some error message
```
Traceback (most recent call last):
File "./main.py", line 78, in ticket
cur.execute('SELECT title, body, re... | sec-knowleage |
# TLS
> 注 : 笔记中拓扑图 drawio 源文件在其图片目录下
**相关文章 & 参考链接**
- [一篇文章带你读懂 TLS Poison 攻击](https://blog.zeddyu.info/2021/04/20/tls-poison/)
- [TLS1.3握手流程以及参数详解](http://blog.nsfocus.net/tls1-3protocol/)
- [深入浅出 SSL/TLS 协议](https://mp.weixin.qq.com/s/uPe5YRIOqWcr4qYors1rFw)
---
## 什么是 TLS
传输层安全性协议(英语:Transport Layer Security,缩写:TLS... | sec-knowleage |
# BloodHound
BloodHound 绘制 Active Directory 和发现攻击路径的工具。
---
## 使用BloodHound映射AD
AD有一个非常好的特性,域中的每个用户都知道所有资源的位置信息。所以当你获得域中一个用户的凭证或者shell时,你可以在不破坏任何规则的前提下映射整个域。任何用户都可以向Active Directory请求计算机,域控制器,组和会话。
所以我们可以使用这个特性收集大量的信息,并且画出一个特别牛X的AD的地图。首先,有两个需要预先安装的软件,你需要安装BLoodHound和一个数据库去存储数据。我们建议您使用`neo4j`,下面是具体步骤。
## 安装 neo4j
### Li... | sec-knowleage |
ypdomainname
===
显示主机的NIS的域名
## 补充说明
**ypdomainname命令** 显示主机的NIS的域名。
### 语法
```shell
ypdomainname(选项)
```
### 选项
```shell
-v:详细信息模式。
``` | sec-knowleage |
dpkg-reconfigure
===
Debian Linux中重新配制一个已经安装的软件包
## 补充说明
**dpkg-reconfigure命令** 是Debian Linux中重新配置已经安装过的软件包,可以将一个或者多个已安装的软件包传递给此指令,它将询问软件初次安装后的配置问题。
当用户需要再次对软件包配置的时候,可以使用dpkg-reconfigure命令来对指定的软件包进行配置。
### 语法
```shell
dpkg-reconfigure(选项)(参数)
```
### 选项
```shell
-a:重新配置所有的软件包;
-u或--unseen-only:仅显示未提过的问题;
--default-pr... | sec-knowleage |
# SecondLife
Binary Exploitation, 400 points
## Description:
> Just pwn this program using a double free and get a flag.
```c
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#define FLAG_BUFFER 200
#define LINE_BUFFER_SIZE 20
void win() {
char buf[FLAG_BUFFER];
FILE... | sec-knowleage |
---
title: 1Password
date: 2022-11-23 16:23:31.702312
background: bg-[#397fe4]
label:
tags:
- tools
-
categories:
- Keyboard Shortcuts
intro: |
A cheat sheet for 1password's keyboard shortcuts in Mac, Windows, iOS, Linux.
---
1Password Keyboard Shortcuts for Mac
------------------
### Global keyboard s... | sec-knowleage |
# CRC
In this task we were given 26 encrypted zip files. It is easy to notice though, that they have
very small size - they uncompress to 5 byte files. That means we should be able to brute force
the actual contents, and check their validity using crc, since ZIPs contain CRC32 of
their uncompressed contents:
```
[adam... | sec-knowleage |
# JPG
---
jpg 文件头 0xffd8ff 文件尾 0xffd9
---
JPG 的宽高在 FFC0 标志位后,第四五字节是高,第六七字节是宽
jpeg 没有透明度信息。
JPEG 文件大体上可以分成两个部分:标记码(Tag)和压缩数据。
**标记码**
标记码由两个字节构成,其前一个字节是固定值0xFF,后一个字节则根据不同意义有不同数值。在每个标记码之前还可以添加数目不限的无意义的0xFF填充,也就说连续的多个0xFF可以被理解为一个0xFF,并表示一个标记码的开始。而在一个完整的两字节的标记码后,就是该标记码对应的压缩数据流,记录了关于文件的诸种信息。常用的标记有:
- SOI(0xFFD8)
- APP0(0xFF... | sec-knowleage |
---
title: Kubernetes
date: 2023-01-09 10:26:55
background: bg-[#416cde]
tags:
- config
- format
categories:
- Programming
intro: |
This page contains a list of commonly used kubectl commands and flags.
plugins:
- copyCode
---
Viewing and finding resources {.cols-2}
---
### Nodes
```bash
kubectl get no... | sec-knowleage |
#!/usr/bin/python
# Successful Output:
# # python shell_shocker.py <VulnURL>
# [+] Attempting Shell_Shock - Make sure to type full path
# ~$ /bin/ls /
# bin
# boot
# dev
# etc
# ..
# ~$ /bin/cat /etc/passwd
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
fr... | sec-knowleage |
---
title: Homebrew
date: 2023-04-12
background: bg-[#fbb041]
tags:
- packages manager
- macos
categories:
- Toolkit
intro: This is a quick reference cheat sheet to getting started with homebrew.
plugins:
- copyCode
---
## Getting Started
### Install
If not installed, instll Command Line Tools (CTL)
```
xcode-s... | sec-knowleage |
# API
We are given URL of some service that allegedly provides `Secure API`.
The site was plain, nothing was interactive, there were no links that could point us to any endpoint worth exploring.
After a lot of poking, changing random things in burp we found a way to trigger LFI with `GET file:///../../../../etc/passwd`... | sec-knowleage |
# Phonic Frenzy 1, Misc, 100pts
> Your car has a brand new infotainment center. In order to activate the system you have to register the serial number on the company's website. The only problem is, it's not trivial to find the dang thing.
When we flashed given binary to the device, it wrote some
story-related, but othe... | sec-knowleage |
### 内存镜像法概述
内存镜像法是在加壳程序被加载时, 通过OD的`ALT+M`快捷键, 进入到程序虚拟内存区段. 然后通过加两次内存一次性断点, 到达程序正确OEP的位置.
内存镜像法的原理在于对于程序资源段和代码段下断点, 一般程序自解压或者自解密时, 会首先访问资源段获取所需资源, 然后在自动脱壳完成后, 转回程序代码段. 这时候下内存一次性断点, 程序就会停在OEP处.
### 内存镜像法要点
1. 选择菜单的`选项->调试选项->异常`
2. 勾选所有的忽略异常
3. 按下`ALT+M`, 打开内存镜像, 找到程序的第一个`.rsrc`, 按F2下断点, 然后按`SHIFT+F9`运行到断点
4. 再按`ALT+M`, ... | sec-knowleage |
# Java 容器
<!-- GFM-TOC -->
* [Java 容器](#java-容器)
* [一、概览](#一概览)
* [Collection](#collection)
* [Map](#map)
* [二、容器中的设计模式](#二容器中的设计模式)
* [迭代器模式](#迭代器模式)
* [适配器模式](#适配器模式)
* [三、源码分析](#三源码分析)
* [ArrayList](#arraylist)
* [Vector](#vector)
* [CopyOnWriteArra... | sec-knowleage |
# Crunch
************
## Crunch 包描述
************
Crunch是一款词表(字典)生成器,您可以在其中生成指定标准字符集或指定的字符集。Crunch可以产生所有可能的排列和组合。
[crunch 主页](https://sourceforge.net/projects/crunch-wordlist/)
[Kali crunch仓库](https://git.kali.org/gitweb/?p=packages/crunch.git;a=summary)
[资料来源](https://sourceforge.net/projects/crunch-wordlist//)
作者:bofh... | sec-knowleage |
halt
===
关闭正在运行的Linux操作系统
## 补充说明
**halt命令** 用来关闭正在运行的Linux操作系统。halt命令会先检测系统的runlevel,若runlevel为0或6,则关闭系统,否则即调用shutdown来关闭系统。
### 语法
```shell
halt(选项)
```
### 选项
```shell
-d:不要在wtmp中记录;
-f:不论目前的runlevel为何,不调用shutdown即强制关闭系统;
-i:在halt之前,关闭全部的网络界面;
-n:halt前,不用先执行sync;
-p:halt之后,执行poweroff;
-w:仅在wtmp中记录,而不实际结束系统。
```
##... | sec-knowleage |
pvremove
===
删除一个存在的物理卷
## 补充说明
**pvremove命令** 用于删除一个存在的物理卷。使用pvremove指令删除物理卷时,它将LVM分区上的物理卷信息删除,使其不再被视为一个物理卷。
### 语法
```shell
pvremove(选项)(参数)
```
### 选项
```shell
-d # 调试模式;
-f # 强制删除;
-y # 对提问回答“yes”。
```
### 参数
物理卷:指定要删除的物理卷对应的设备文件名。
### 实例
使用pvremove指令删除物理卷`/dev/sdb2`。在命令行中输入下面的命令:
```shell
pvremove /dev/sdb2 # ... | sec-knowleage |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH PR 1 2022年9月 "GNU coreutils 9.1" ... | sec-knowleage |
# Basis32
* Category: Crypto
* 100 Points
* Solved by the JCTF Team
## Description
> We captured this message from Shabak's traffic, Can you decode the message?
>
> Message: טייצעשדומםךהרץסעזאשדא6תמם53ץ6עך7ךץקזטשכעמםתזג3ףהכ5הז65ת7טינקזשיףזיןפג3דחם5שזע5דטםץןץמ33עםםשקת===
## Solution
This indeed looks like base32, just ... | sec-knowleage |
# T1608-003-阶段性能力-安装数字证书
## 来自ATT&CK的描述
攻击者可能会安装SSL/TLS证书,在攻击过程中可以使用。SSL/TLS证书是可以安装在服务器上的文件,以实现系统之间的安全通信。数字证书包括关于密钥的信息,关于其所有者身份的信息,以及一个实体的数字签名,该实体已经验证了证书的内容是正确的。如果签名是有效的,并且检查证书的人信任签名者,那么他们知道他们可以使用该钥匙与它的所有者进行安全通信。证书可以被上传到服务器上,然后服务器可以被配置为使用证书来实现与它的加密通信。
攻击者可能会安装SSL/TLS证书,用来推进他们的行动,如加密C2流量(例如:网络协议的非对称加密法),或将可信度借给证书采集网站。数字... | sec-knowleage |
**知识点介绍:**
Windows PowerShell是以.NET Framework技术为基础,并且与现有的WSH保持向后兼容,因此它的脚本程序不仅能访问.NET CLR,也能使用现有的COM技术。同时也包含了数种系统管理工具、简易且一致的语法,提升管理者处理,常见如登录数据库、WMI。Exchange Server 2007以及System Center Operations Manager 2007等服务器软件都将内置Windows PowerShell。Windows PowerShell的强大,并且内置,在渗透过程中,也让渗透变得更加有趣。而安全软件的对抗查杀也逐渐开始针对powershell的一切行为。在 https... | sec-knowleage |
.\" Copyright 1993 Giorgio Ciucci (giorgio@crcc.it)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual ... | sec-knowleage |
# ZIP
---
* ZIP 文件头 `50 4B 03 04 0A 00 00 00`
* ZIP 文件尾 `50 4B 05 06 00 00 00 00 + 其他字符`
---
Zip文件主要由三部分构成,分别为
* 压缩源文件数据区
* 压缩源文件数据区中每一个压缩的源文件/目录都是一条记录,其中
* local file header:文件头用于标识该文件的开始,记录了该压缩文件的信息,这里的文件头标识由固定值 50 4B 03 04 开头,也是 Zip 的文件头的重要标志
* file data:文件数据记录了相应压缩文件的数据
* data descriptor... | sec-knowleage |
---
title: 一键获得用户数据
---
## 在阿里云上一键获得用户数据
使用 `-u` 命令一键获得用户数据
```bash
cf alibaba ecs exec -u
```
指定单个实例获取用户数据
```bash
cf alibaba ecs exec -u -i i-abcdefghijklmn
```
## 在腾讯云上一键获得用户数据
### 云服务器
```bash
cf tencent cvm exec -u
```
### 轻量应用服务器
```bash
cf tencent lh exec -u
```
<Vssue />
<script>
export default {
mounted ()... | sec-knowleage |
.\" Copyright 1995-1996 David Engel (david@ods.com)
.\" Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
.\" Most of this was copied from the README file. Do not restrict distribution.
.\" May be distributed under the GNU General Public License
.TH LDD 1 "30 March 1995"
.SH NAME
ldd \- 显示共享库的依赖情况
.SH "总览 (SYNOPSIS)"... | sec-knowleage |
from library import *
i, o, t = load_npz(sys.argv[1])
normalize(t)
smooth(t, 25)
align_fft(t, 35000)
i, o, t = filter_corr(i, o, t, 0.4)
print len(t)
save_npz(sys.argv[2], i, o, t) | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.