text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
# ModSecurity
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**简介**
ModSecurity 是一款开源的跨平台 Web 应用程序防火墙(WAF)引擎,用于 Apache,IIS 和 Nginx,由 Trustwave 的 SpiderLabs 开发。作为 WAF 产品,ModSecurity 专门关注 HTTP 流量,当发出 HTTP 请求时,ModSecurity 检查请求的所有部分,如果请求是恶意的,它会被阻止和记录。
**项目地址**
- https://github.com/SpiderLabs/ModSecuri... | sec-knowleage |
# uWSGI PHP目录穿越漏洞(CVE-2018-7490)
uWSGI是一款Web应用程序服务器,它实现了WSGI、uwsgi和http等协议,并支持通过插件来运行各种语言。
uWSGI 2.0.17之前的PHP插件,没有正确的处理`DOCUMENT_ROOT`检测,导致用户可以通过`..%2f`来跨越目录,读取或运行`DOCUMENT_ROOT`目录以外的文件。
## 漏洞环境
运行存在漏洞的uWSGI服务器:
```
docker compose up -d
```
运行完成后,访问`http://your-ip:8080/`即可看到phpinfo信息,说明uwsgi-php服务器已成功运行。
## 漏洞复现... | sec-knowleage |
# Openfire Admin Console Authentication Bypass (CVE-2023-32315)
[中文版本(Chinese version)](README.zh-cn.md)
Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber).
In the version pri... | sec-knowleage |
magic = [98,32,84,253,217,18,92,22,112,138,147,46,168,229,31,149,72,94,191,124,21,176,10,104,154,213,235,25,237,61,18,15]
target = [3**i for i in range(32)]
def solve(t):
v2 = 1
v3 = 1
v4 = 1
for i in range(t):
v5 = (2*v2 + v3 + 7*v4) % 31337
v4 = v3
v3 = v2
v2 = v5
... | sec-knowleage |
# Healthcare 1
> https://download.vulnhub.com/healthcare/Healthcare.ova
靶场IP:`192.168.32.221`
扫描对外端口服务
```
┌──(root💀kali)-[/tmp]
└─# nmap -p 1-65535 -sV 192.168.32.221 ... | sec-knowleage |
# T1049-系统网络连接发现
## 来自ATT&CK的描述
攻击者可能会通过查询网络上的信息来尝试获取与他们当前正在访问的受感染系统之间或从远程系统获得的网络连接的列表。
获得对基于云环境一部分的系统的访问权的攻击者可能会规划出虚拟私有云或虚拟网络,以便确定连接了哪些系统和服务。取决于操作系统,所执行的操作可能是相同类型的发现技术,但是所得信息可能包括有关与攻击者目标相关的联网云环境的详细信息。云提供商可能具有不同的虚拟网络操作方式。
## 测试案例
### windows
获取此信息的实用程序和命令包括netstat,“net use”和与“net session”。
### Mac和linux
在Mac和Linux,nets... | sec-knowleage |
# 准备一台Kali
您需要一些工具来为后面的实验做准备!创建一个目录然后将这些工具放到里面,不然会很乱。我不会解释这些工具是干啥的以及怎么安装它们,因为不同的工具和程序可能会发生变化。自己谷歌,丰衣足食。
- [Impacket](https://github.com/CoreSecurity/impacket) :python的网络工具包,很有用。
- [Responder](https://github.com/lgandx/Responder):Kali中的网络请求攻击工具。
- [Empire] (https://github.com/EmpireProject/Empire):类似msf,只针对windows,使用pow... | sec-knowleage |
# T1070-004-win-文件删除
## 来自ATT&CK的描述
攻击者可能会删除其入侵活动所留下的文件。攻击者在系统上丢弃创建的恶意软件、工具或其他可能会留下痕迹的非本机文件。这些文件的删除可以在入侵过程中进行,也可以作为入侵后的过程中进行,以最大程度地减少攻击者留下的足迹。
主机操作系统中提供了一些工具来执行清除,但攻击者也可以使用其他工具。其中包括本机cmd函数(例如DEL),安全删除工具(例如Windows Sysinternals SDelete)或其他第三方文件删除工具。
## 测试案例
 and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。用于过滤/搜索的特定字符。可使用正则表达式能配合多种命令使用,使用上十分灵活。
### 选项
```shell
-a --text # 不要忽略二进制数据。
-A <显示行数> --after-context=<显示行数> # 除了显示符合范本样式的那一行之外,并显示该行之后的内容。
-b --byte-offset ... | sec-knowleage |
# Baby RSA (crypto)
## ENG
[PL](#pl-version)
In the task we get [encrypted flag](flag.enc), [public key](pubkey) and encryption [source code](enc.rb) written in Ruby.
All math code is sound and the main part is just:
```ruby
p = rand(2**1024)
q = 19 * p + rand(2**512)
p = next_prime(p)
q = next_prime(q)
e = 65537
d = m... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "CREATE DATABASE" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
CREATE DATABASE \- 创建新数据库
.SH SYNOPSIS
.sp
.nf
CREATE DATABASE \fIname\fR
[ [ WITH ] [ OWNER [=] \fIdbowner\fR ]
[ LOCATION [=] '\fIdbpath\fR' ]
[ ... | sec-knowleage |
# Raiding party (game, 140p, 10 solved)
In this game challenge we have a quest to collect `5 blessed amulets`.
The issue is that there are only 4 of those on the map.
By looking at spells we have available, we found one that seemed interesting:
```python
@magic_spell("7071727374757677")
def spell_rebless(spell, player,... | sec-knowleage |
# Carriage Return Line Feed
> The term CRLF refers to Carriage Return (ASCII 13, \r) Line Feed (ASCII 10, \n). They're used to note the termination of a line, however, dealt with differently in today’s popular Operating Systems. For example: in Windows both a CR and LF are required to note the end of a line, whereas in... | sec-knowleage |
# BaseX, 300p, exploit
> BaseX stores datas from stdin into a buffer.
The binary was allowing us to write arbitrary data to arbitrary offset from
stack (simple buffer overflow). A complication was that we had no echo, which
made debugging the exploit harder. In the end, we ROP-ped to gadgets, overwriting
`fread` GOT en... | sec-knowleage |
# DC4-WalkThrough
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶机地址**
- https://www.vulnhub.com/entry/dc-4,313/
**Description**
DC-4 is another purposely built vulnerable lab with the intent of gaining experience in the world of penetration testing.
Unlike the previous DC releases, this one is... | sec-knowleage |
### 伪随机数生成器概述
伪随机数生成器(pseudorandom number generator,PRNG),又称为确定性随机位生成器(deterministic random bit generator,DRBG),是用来生成**接近于绝对随机数序列的数字序列**的算法。一般来说,PRNG 会依赖于一个初始值,也称为种子,来生成对应的伪随机数序列。只要种子确定了,PRNG 所生成的随机数就是完全确定的,因此其生成的随机数序列并不是真正随机的。
就目前而言,PRNG 在众多应用都发挥着重要的作用,比如模拟(蒙特卡洛方法),电子竞技,密码应用。
### 随机性的严格性概述
- 随机性:随机数应该不存在统计学偏差,是完全杂乱的数列... | sec-knowleage |
## 0x01 简单介绍
CSRF的全称是Cross-Site Request Forgery,跨站请求伪造,即第三方冒充当前用户身份发送请求。
Flash CSRF通常是由于Crossdomain.xml文件配置不当造成的,利用方法是使用swf来发起跨站请求伪造,示例请参照[CSRF](../跨站请求伪造/CSRF.md)
## 0x02 flash的跨域策略
adobe为了限制flash加载任意页面,使用了一种跨域策略来进行限制。
所谓的flash跨域策略文件就是在站点根目录的crossdomain.xml,这个XML文件配置当前站点的资源允许来自哪些域的flash加载。当flash加载一个站点的资源时,如果目标不跟自己一个站... | sec-knowleage |
## Fridginator (Crypto/Web, 200p)
> My brother John just bought this high-tech fridge which is all flashy and stuff,
> but has also added some kind of security mechanism which means I can't steal his
> food anymore... I'm not sure I can survive much longer without his amazing yoghurts.
> Can you find a way to steal the... | sec-knowleage |
# T1018-win-远程系统发现
## 来自ATT&CK的描述
攻击者可能会试图通过IP地址、主机名或网络上的其他逻辑标识符获取其他系统的列表,该列表可用于从当前系统进行横向移动。在远程访问工具中可以存在功能以实现这一点,但也可以使用操作系统上可用的实用工具。攻击者还可以使用本地主机文件来发现远程系统的主机名到IP地址的映射。
windows
获取此信息的工具和命令示例包括使用net的“ping”或“net view”。可以查看 C:\Windows\System32\Drivers\etc\hosts的内容,以了解系统上现有的主机名到IP映射。
MacOS
特定于Mac,在同一广播域内发现其他基于Mac的系统的bonjour协... | sec-knowleage |
原文 by wooyun wiki
## 1、相关背景介绍
由于应用越来越多的需要和其他的第三方应用交互,以及在自身应用内部根据不同的逻辑将用户引向到不同的页面,譬如一个典型的登录接口就经常需要在认证成功之后将用户引导到登录之前的页面,整个过程中如果实现不好就可能导致一些安全问题,特定条件下可能引起严重的安全漏洞。
## 2、成因
对于URL跳转的实现一般会有几种实现方式:
* META标签内跳转(`<meta http-equiv="refresh" content="0;URL='http://thetudors.example.com/'" /> `)
* javascript跳转(`<script>self.location... | sec-knowleage |
原文 by 自娱
## 0x01 身份认证安全
### 1 暴力破解
在没有验证码限制或者一次验证码可以多次使用的地方,使用已知用户对密码进行暴力破解或者用一个通用密码对用户进行暴力破解。
一些工具及脚本
* Burpsuite
* htpwdScan 撞库爆破必备 URL: https://github.com/lijiejie/htpwdScan
* hydra 源码安装xhydra支持更多的协议去爆破 (可破WEB,其他协议不属于业务安全的范畴)
### 2 session & cookie类
会话固定攻击:利用服务器的session不变机制,借他人之手获得认证和授权,冒充他人。
Cookie仿冒:修改cookie中的某个参... | sec-knowleage |
# Echarts
目前市面上的数据可视化工具非常多,比如 iCharts,D3,Chart,Recharts,Raw,Leaflet,canvas 等等,为什么我选择了 Echarts ?
1. 这是百度的项目,一直有更新,是目前最新的是EChart
2. 有详细的中文文档和例子,网上有比较丰富的资料
3. 支持的图形较多,支持动态数据,对移动端的支持友好,有丰富的交互
### 简介
ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容性较好,底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表
ECharts 3 中更是加入了... | sec-knowleage |
# rare mount
Forensics
## Description:
> Little or big, we do not care!
A binary file was attached.
## Solution:
Let's inspect the binary:
```console
root@kali:/media/sf_CTFs/35c3ctf/rare_mount# file ffbde7acedff79aa36f0f5518aad92d3-rare-fs.bin
ffbde7acedff79aa36f0f5518aad92d3-rare-fs.bin: data
root@kali:/media/sf_CTFs... | sec-knowleage |
cv:
personal_informations:
firstname: A
lastname: Schneier
address: 221b Baker Street, London, ENGLAND
position: Security Expert ; Master of Internet
contacts:
mobile: +12 3 456 789 012
email: bruce.schneier@it-is-not-my-real-email.com
homepage: https://www.schneier.com/
github: schn... | sec-knowleage |
[Back to Contents](README.md)
### The Security Checklist
##### AUTHENTICATION SYSTEMS (Signup/Signin/2 Factor/Password reset)
- [ ] Use HTTPS everywhere.
- [ ] Store password hashes using `Bcrypt` (no salt necessary - `Bcrypt` does it for you).
- [ ] Destroy the session identifier after `logout`.
- [ ] Destroy all ... | sec-knowleage |
lftpget
===
调用lftp指令下载指定的文件
## 补充说明
**lftpget命令** 通过调用lftp指令下载指定的文件。
### 语法
```shell
lftpget(选项)(参数)
```
### 选项
```shell
-c:继续先前的下载;
-d:输出调试信息;
-v:输出详细信息。
```
### 参数
文件:指定要下载的文件,文件必须是合法的URL路径。 | sec-knowleage |
version: '2'
services:
nginx:
image: vulhub/nginx:1
volumes:
- ./configuration:/etc/nginx/conf.d
- ./files/:/home/
- ./www/:/usr/share/nginx/html/
ports:
- "8080:8080"
- "8081:8081"
- "8082:8082" | sec-knowleage |
# HTML `<head>`
1. `<head>`元素包含了所有的头部标签元素
2. 在 <head>元素中你可以插入脚本(scripts)、样式文件(CSS)、及各种`meta`信息
3. 可以添加在头部区域的元素标签为: `<title>`、`<style>`、`<meta>`、`<link>`、`<script>`、`<noscript>`、`<base>`
### `<title>`元素
1. `<title>`标签定义文档的标题
2. title 元素在所有 HTML/XHTML 文档中都是必需的
3. title 元素能够:
- 定义浏览器工具栏中的标题
- 提供页面被添加到收藏夹时显示的标题
- 显示在... | sec-knowleage |
# T1190-CVE-2021-41277-Metabase敏感信息泄露漏洞
## 来自ATT&CK的描述
使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。
如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。
对于网站和数据库,... | sec-knowleage |
# Compress and Attack
Category: Cryptography, 130 points
## Description
> Your goal is to find the flag.
>
> Hint:
>
> * The flag only contains uppercase and lowercase letters, underscores, and braces (curly brackets)
A Python script was attached:
```python
#!/usr/bin/python3 -u
import zlib
from random import randint... | sec-knowleage |
# ImageMagick Shell Injection via PDF Password (CVE-2020-29599)
[中文版本(Chinese version)](README.zh-cn.md)
ImageMagick is a free and open-source cross-platform software suite for displaying, creating, converting, modifying, and editing raster images.
References:
- https://insert-script.blogspot.com/2020/11/imagemagic... | 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 |
# Micro-CMS v2
## [Flag0](./flag0) -- Found
- Regular users can only see public pages
- Getting admin access might require a more perfect union
- Knowing the password is cool, but there are other approaches that might be easier
## [Flag1](./flag1) -- Found
- What actions could you perform as a regular user on the last ... | sec-knowleage |
# Rank yourself higher
Category: Web, 250 points
## Description
> challenge 3 in Imperva's GQLDating series
>
> Check your rate. Do you truly agree to be ranked that low? If you will be ranked 100 you will get more exposure.
## Solution
This is the follow up for [GQL all the way](GQL_all_the_way.md). We'll continue us... | sec-knowleage |
# GoAhead 远程命令执行漏洞(CVE-2017-17562)
GoAhead是一个开源(商业许可)、简单、轻巧、功能强大、可以在多个平台运行的Web Server,多用于嵌入式系统、智能设备。其支持运行ASP、Javascript和标准的CGI程序,这个漏洞就出现在运行CGI程序的时候。
GoAhead在接收到请求后,将会从URL参数中取出键和值注册进CGI程序的环境变量,且只过滤了`REMOTE_HOST`和`HTTP_AUTHORIZATION`。我们能够控制环境变量,就有很多攻击方式。比如在Linux中,`LD_`开头的环境变量和动态链接库有关,如`LD_PRELOAD`中指定的动态链接库,将会被自动加载;`LD_... | sec-knowleage |
## boomshakalaka (mobile, 3 points)
play the game, get the highest score
[boomshakalaka](plane.apk)
We're given an android apk, after decompiling it, we learned that our flag is stored in Cocos2dxPrefsFile.xml in shared_prefs folder.
When we looked in the specified file, it turned out that the flag is only partially c... | sec-knowleage |
# Apache APISIX Dashboard API权限绕过导致RCE(CVE-2021-45232)
Apache APISIX是一个动态、实时、高性能API网关,而Apache APISIX Dashboard是一个配套的前端面板。
Apache APISIX Dashboard 2.10.1版本前存在两个API`/apisix/admin/migrate/export`和`/apisix/admin/migrate/import`,他们没有经过`droplet`框架的权限验证,导致未授权的攻击者可以导出、导入当前网关的所有配置项,包括路由、服务、脚本等。攻击者通过导入恶意路由,可以用来让Apache APISIX访问... | sec-knowleage |
# What the hex (for 300)
###ENG
[PL](#pl-version)
In the task we get a large binary file (too large to put here, sorry).
We notice that the file is in fact a 3000 concatenated JPG files with missing headers.
We fix them and split with a script:
```python
s = open("massa.raw", "rb").read().decode("hex")
r = s.split("FIF... | sec-knowleage |
# DEVRANDOM: SLEEPY
> https://download.vulnhub.com/devrandom/sleepy.ova
靶场IP:`192.168.32.171`

扫描对外端口
```
┌──(root💀kali)-[/tmp]
└─# nmap -p1-65535 192.168.32.171 1 ⚙
St... | 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 |
# Weekands of hacker (web 150)
Hint: : Format answer is h4ck1t{<something>}. You must type right flag on keyboard, where? Feel you real hacker.
## ENG
[PL](#pl-version)
This was a very poor and stupid task.
We don't get anything here, we just have to look for something strange.
It was technically trivial, but tedious... | sec-knowleage |
# Atlassian Confluence OGNL表达式注入命令执行漏洞(CVE-2021-26084)
Atlassian Confluence是企业广泛使用的wiki系统,其部分版本中存在OGNL表达式注入漏洞。攻击者可以通过这个漏洞,无需任何用户的情况下在目标Confluence中执行任意代码。
参考链接:
- https://confluence.atlassian.com/doc/confluence-security-advisory-2021-08-25-1077906215.html
- https://jira.atlassian.com/browse/CONFSERVER-67940
- https:/... | sec-knowleage |
# Store
> Redux 应用只有一个单一的`store`
### 概念
1. `Store`就是一个维护应用程序状态的对象
2. 提供提供`getState()`方法获取`state`
```
store.getState(): 获取最近的内部状态对象
- 返回应用当前的 state 树
- 它与 store 的最后一个 reducer 返回值相同
```
3. 提供`dispatch(action)`方法更新`state`
```
store.dispatch(action): 将一个`action`对象发送给 reducer
- 分发 action 这是触发 state 变化的惟一途径。
- 会使当前getSta... | sec-knowleage |
ip
===
网络配置工具
## 补充说明
**ip命令** 用来显示或操纵Linux主机的路由、网络设备、策略路由和隧道,是Linux下较新的功能强大的网络配置工具。
### 语法
```shell
ip(选项)(对象)
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
ip [ -force ] -batch filename
```
### 对象
```shell
OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |
tunnel | tuntap | m... | sec-knowleage |
##4042 (Misc/Crypto, 100p)
```
Unknown document is found in ancient ruins, in 2005.
Could you figure out what is written in the document?
```
###PL
[ENG](#eng-version)
Dostajemy [plik](no-network.txt) który mamy zdekodować. Podpowiedź stanowi `4042` oraz rok `2005`. Pozwala nam to dotrzeć do RFC4042: https://www.ietf.o... | sec-knowleage |
## For2 (Forensics, 200 points)
tl;dr plot mouse movements from pcap
The given [pcap file](capture.pcap) contains usb mouse traffic, knowing that certain bytes in LeftoverCaptureData contain relative mouse movement, we can easily export the needed data and plot the movements: [plotMouse.py](plotMouse.py)
After runnin... | sec-knowleage |
## 9. 策略(Strategy)
### Intent
定义一系列算法,封装每个算法,并使它们可以互换。
策略模式可以让算法独立于使用它的客户端。
### Class Diagram
- Strategy 接口定义了一个算法族,它们都实现了 behavior() 方法。
- Context 是使用到该算法族的类,其中的 doSomething() 方法会调用 behavior(),setStrategy(Strategy) 方法可以动态地改变 strategy 对象,也就是说能动态地改变 Context 所使用的算法。
<div align="center"> <img src="https://cs-notes-125610... | sec-knowleage |
# WinRM
---
**什么是 WinRM**
Windows 远程管理(WinRM)是 WS-Management Protocol 的 Microsoft 实现。
WS-Management 协议是一种基于 SOAP 的防火墙友好协议,旨在用于系统查找和交换管理信息。WS-Management 协议规范的目的是为企业系统提供互操作性和一致性,其对防火墙友好的协议,允许来自不同供应商的硬件和操作系统进行互操作。借助 winrm.exe 和 powershell,管理员可以使用 WS-Management 协议远程执行大多数 Cmd.exe 命令、获取远程机器信息。在内网中,可以借助 WinRM 来进行横向移动或者后门驻留。从 ... | sec-knowleage |
tailf
===
在屏幕上显示指定文件的末尾若干行内容,通常用于日志文件的跟踪输出
## 补充说明
tailf命令几乎等同于`tail -f`,严格说来应该与`tail --follow=name`更相似些。当文件改名之后它也能继续跟踪,特别适合于日志文件的跟踪(follow the growth of a log file)。与`tail -f`不同的是,如果文件不增长,它不会去访问磁盘文件。tailf特别适合那些便携机上跟踪日志文件,因为它能省电,因为减少了磁盘访问。tailf命令不是个脚本,而是一个用C代码编译后的二进制执行文件,某些Linux安装之后没有这个命令。
tailf和tail -f的区别
1. tailf 总是从... | sec-knowleage |
tcpdump
===
一款sniffer工具,是Linux上的抓包工具,嗅探器
## 补充说明
**tcpdump命令** 是一款抓包,嗅探器工具,它可以打印所有经过网络接口的数据包的头信息,也可以使用`-w`选项将数据包保存到文件中,方便以后分析。
### 语法
```shell
tcpdump(选项)
```
### 选项
```shell
-a:尝试将网络和广播地址转换成名称;
-c<数据包数目>:收到指定的数据包数目后,就停止进行倾倒操作;
-d:把编译过的数据包编码转换成可阅读的格式,并倾倒到标准输出;
-dd:把编译过的数据包编码转换成C语言的格式,并倾倒到标准输出;
-ddd:把编译过的数据包编码转换成十进制... | sec-knowleage |
# Pinkys Palace v1
> https://download.vulnhub.com/pinkyspalace/Pinkys-Palace.ova
>
> vm box
靶场IP:`192.168.32.9`

扫描对外端口
```
┌──(root㉿kali)-[~]
└─# nmap -p1-65535 -sV 192.168.32.9
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-20 03:56 EDT
... | sec-knowleage |
---
title: 下载存储桶里的对象
---
## 下载存储桶里的对象
使用以下命令下载存储桶里的对象
```bash
cf alibaba oss obj get
```
指定存储桶
```bash
cf alibaba oss obj get -b bucketName
```
指定存储桶以及对象
```bash
cf alibaba oss obj get -b bucketName -k objectName
```
保存到指定目录
```bash
cf alibaba oss obj get -o ./result
```
在有些情况下,当前 AK 可能会没有列出 Bucket 的权限,如果你知道 Bucket 的名称... | sec-knowleage |
userdel
===
用于删除给定的用户以及与用户相关的文件
## 补充说明
**userdel命令** 用于删除给定的用户,以及与用户相关的文件。若不加选项,则仅删除用户帐号,而不删除相关文件。
### 语法
```shell
userdel(选项)(参数)
```
### 选项
```shell
-f:强制删除用户,即使用户当前已登录;
-r:删除用户的同时,删除与用户相关的所有文件。
```
### 参数
用户名:要删除的用户名。
### 实例
userdel命令很简单,比如我们现在有个用户linuxde,其家目录位于`/var`目录中,现在我们来删除这个用户:
```shell
userdel linuxde ... | sec-knowleage |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29.
.TH INSTALL-INFO "1" "June 2003" "install-info 4.6" "User Commands"
.SH NAME
install-info \- 更新 info/dir 项
.SH "SYNOPSIS 总览"
.B install-info
[\fIOPTION\fR]... [\fIINFO-FILE \fR[\fIDIR-FILE\fR]]
.SH "DESCRIPTION 描述"
从 Info 目录文件 DIR-FILE 中的文件 INFO-FILE 中安装或... | sec-knowleage |
# SomeVideos
* Category: Web
* 400 Points
* Solved by the JCTF Team (after the competition)
## Description
> A friend of mine called me and said that he wants to share some videos with his family, I told him that I'm working on such platform right now and that he should call me back later.
>
> Credentials: If not exis... | sec-knowleage |
# Nginx Common Bugs
## Introduction
What would you do if you came across a website that uses Nginx?
## How to Detect
Usually in the HTTP response there is a header like this `Server: nginx`
1. Find the related CVE by checking nginx version
* How to find the nginx version
By checking the response header or using 404 pag... | sec-knowleage |
# Forensic Tea Party
* Category: Forensics, Reverse Engineering
* 400 Points
* Solved by the JCTF Team
## Description
> Analyze the memory dump to find any suspicious processes and find the flag.
A memory dump was attached.
## Solution
Let's start analyzing our memory dump using `volatility`. We start by extracting the... | sec-knowleage |
alias
===
定义或显示别名。
## 概要
```shell
alias [-p] [name[=value] ...]
```
## 主要用途
- 简化较长的命令。
- 定义、修改或者显示一个或多个别名。
## 选项
```shell
-p:显示全部已定义的别名。
name(可选):指定要(定义、修改、显示)的别名。
value(可选):别名的值。
```
### 返回值
alias 返回 true 除非您要显示的别名未定义。
## 例子
```shell
# 显示全部已定义的别名
alias
alias -p
# 显示已定义的别名(假设当前环境存在以下别名)
alias ls
alias ls grep
# 定义或修改别名... | sec-knowleage |
# Jetty WEB-INF 敏感信息泄露漏洞(CVE-2021-28164)
Eclipse Jetty是一个开源的servlet容器,它为基于Java的Web容器提供运行环境。
Jetty 9.4.37引入对RFC3986的新实现,而URL编码的`.`字符被排除在URI规范之外,这个行为在RFC中是正确的,但在servlet的实现中导致攻击者可以通过`%2e`来绕过限制,下载WEB-INF目录下的任意文件,导致敏感信息泄露。该漏洞在9.4.39中修复。
参考链接:
- https://github.com/eclipse/jetty.project/security/advisories/GHSA-v7ff-8wcx-... | sec-knowleage |
'\" t
.TH "NETWORKCTL" "1" "" "systemd 231" "networkctl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.d... | sec-knowleage |
<?php
header("Content-Type: text/html; charset=utf-8");
echo "Hello, \n";
echo "Your name is <strong>" . (isset($_GET['name']) ? $_GET['name'] : 'Vulhub') . '</strong>'; | sec-knowleage |
#include "twofish.h"
#include <cstdio>
#include <cstdint>
#include <cstring>
#include "dump"
TwofishKey key;
uint32_t raw[] = {
0x0C01A4D6E,
0x0A4CB6636,
0x5B0F5BA1,
0x2B266926,
0x0EF75CB8F,
0x0A037222A,
0x0BA69619A,
0x60798932,
0x26EA859,
0x0F1315893,
0x8B5933A6,
0x0E72BAC67,
0x1ACC8904,
0x2E48D1EF,
0x3F21D5AB,
0x69... | sec-knowleage |
# 0x00 版本收集与路径
识别数据库版本有助于我们进一步对数据库进行注入我们可以用到 `version()` `@@version` `/*!版本号*/`
`/*!*/` 意为在xxx版本之上执行 我的版本是5.6所以可以执行
```
mysql> SELECT * FROM admin WHERE id = 1 union select 1,version(),3;
+------+----------+----------+
| id | username | password |
+------+----------+----------+
| 1 | admin | admin |
| 1 ... | sec-knowleage |
# DC9-WalkThrough
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶机地址**
- https://www.vulnhub.com/entry/dc-9,412/
**Description**
DC-9 is another purposely built vulnerable lab with the intent of gaining experience in the world of penetration testing.
The ultimate goal of this challenge is to ge... | sec-knowleage |
# b00tl3gRSA3
Cryptography, 450 points
## Description:
> Why use p and q when I can use more?
## Solution:
This challenge is similar to last year's [Super Safe RSA 3](/2018_picoCTF/Super%20Safe%20RSA%203.md).
Last year we used [an online service](https://www.alpertron.com.ar/ECM.HTM) to factorize `n`, and had to copy ... | sec-knowleage |
原文 by wooyun zhangsan
## 0x00 测试环境
操作系统:CentOS6.5
Web服务器:Nginx1.4.6
Php版本:Php5.4.26
## 0x01 Nginx介绍
nginx本身不能处理PHP,它只是个web服务器,当接收到请求后,如果是php请求,则发给php解释器处理,并把结果返回给客户端。nginx一般是把请求发fastcgi管理进程处理,fastcgi管理进程选择cgi子进程处理结果并返回被nginx。
nginx涉及到两个账户,一个是nginx的运行账户,一个是php-fpm的运行账户。如果访问的是一个静态文件,则只需要nginx的运行账户对文件具有读取权限;而如果访... | sec-knowleage |
# Tiki-1
> https://download.vulnhub.com/tiki/Tiki.ova
靶场IP:`192.168.32.219`
扫描对外端口服务
```
┌──(root💀kali)-[~]
└─# nmap -p 1-65535 -sV 192.168.32.219 ... | sec-knowleage |
# Cacti Unauthenticated Command Injection (CVE-2022-46169)
[中文版本(Chinese version)](README.zh-cn.md)
Cacti is a robust and extensible operational monitoring and fault management framework for users around the world. A command injection vulnerability allows an unauthenticated user to execute arbitrary code on a server ... | sec-knowleage |
# are you root?
Binary Exploitation, 550 points
## Description:
> Can you get root access through this service and get the flag?
```c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
typedef enum auth_level {
ANONYMOUS = 1,
GUEST = 2,
USER = 3,
ADMIN = 4,
ROOT = 5
} auth_level_t;... | sec-knowleage |
# 3. 数组中重复的数字
## 题目链接
[牛客网](https://www.nowcoder.com/practice/6fe361ede7e54db1b84adc81d09d8524?tpId=13&tqId=11203&tab=answerKey&from=cyc_github)
## 题目描述
在一个长度为 n 的数组里的所有数字都在 0 到 n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字是重复的,也不知道每个数字重复几次。请找出数组中任意一个重复的数字。
```html
Input:
{2, 3, 1, 0, 2, 5}
Output:
2
```
## 解题思路
要求时间复杂度 O(N),空间复杂度 O(... | sec-knowleage |
# Container - Docker Pentest
> Docker is a set of platform as a service (PaaS) products that uses OS-level virtualization to deliver software in packages called containers.
## Summary
- [Tools](#tools)
- [Mounted Docker Socket](#mounted-docker-socket)
- [Open Docker API Port](#open-docker-api-port)
- [Insecure Docker R... | sec-knowleage |
# Windows - DPAPI
> On Windows, credentials saved in the Windows Credentials Manager are encrypted using Microsoft's Data Protection API and stored as "blob" files in user AppData folder.
## Summary
* [Data Protection API](#data-protection-api)
* [List Credential Files](#list-credential-files)
* [DPAPI LocalMac... | sec-knowleage |
inotifywait
===
异步文件系统监控机制
## 补充说明
**Inotify** 一种强大的、细粒度的、异步文件系统监控机制,它满足各种各样的文件监控需要,可以监控文件系统的访问属性、读写属性、权限属性、删除创建、移动等操作,也就是可以监控文件发生的一切变化。。
**inotify-tools** 是一个C库和一组命令行的工作提供Linux下inotify的简单接口。inotify-tools安装后会得到`inotifywait`和`inotifywatch`这两条命令:
* **inotifywait命令** 可以用来收集有关文件访问信息,Linux发行版一般没有包括这个命令,需要安装inotify-tools... | sec-knowleage |
.ig \"-*- nroff -*-
Copyright (C) 2000 Stein Gjoen
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 under the conditions for verb... | sec-knowleage |
smbclient
===
交互方式访问samba服务器
## 补充说明
**smbclient命令** 属于samba套件,它提供一种命令行使用交互式方式访问samba服务器的共享资源。
### 语法
```shell
smbclient(选项)(参数)
```
### 选项
```shell
-B<ip地址>:传送广播数据包时所用的IP地址;
-d<排错层级>:指定记录文件所记载事件的详细程度;
-E:将信息送到标准错误输出设备;
-h:显示帮助;
-i<范围>:设置NetBIOS名称范围;
-I<IP地址>:指定服务器的IP地址;
-l<记录文件>:指定记录文件的名称;
-L:显示服务器端所分享出来的所有资源;
-M<Ne... | sec-knowleage |
version: '2'
services:
es:
image: vulhub/elasticsearch:1.4.2
ports:
- "9200:9200"
- "9300:9300" | sec-knowleage |
#!/usr/bin/python2
from pwn import *
def attack(connection, can):
def sim_run():
can.send(p8(0))
def sim_run_few():
for _ in xrange(1):
sim_run()
connection.recvuntil("MAIN_LOOP")
def can_send_frame(ctrl, sid, eid, data):
sim_run_few()
can.send(p8... | sec-knowleage |
def egcd(a, b):
u, u1 = 1, 0
v, v1 = 0, 1
while b:
q = a // b
u, u1 = u1, u - q * u1
v, v1 = v1, v - q * v1
a, b = b, a - q * b
return a, u, v
def phi(p, q):
return (p - 1) * (q - 1)
def get_d(p, n, e):
q = n / p
phi_v = phi(p, q)
_gcd, d, _2 = egcd(e,... | sec-knowleage |
---
title: Bucket 爆破
---
<center><h1>Bucket 爆破</h1></center>
---
当不知道 Bucket 名称的时候,可以通过爆破获得 Bucket 名称,这有些类似于目录爆破,只不过目录爆破一般通过状态码判断,而这个通过页面的内容判断。
当 Bucket 不存在时有两种返回情况,分别是 InvalidBucketName 和 NoSuchBucket
</br>
<img width="700" src="/img/1650005494.png"></br>
</br>
<img width="700" src="/img/1650005540.png"></br>
当 Bucket... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/joomla:3.4.5
depends_on:
- mysql
environment:
- JOOMLA_DB_HOST=mysql
- JOOMLA_DB_PORT=3306
- JOOMLA_DB_USER=root
- JOOMLA_DB_PASSWORD=vulhub
- JOOMLA_DB_NAME=joomla
ports:
- "8080:80"
mysql:
image: mysql:5.5
environment:
- M... | sec-knowleage |
.TH CBDSQR 3 "15 June 2000" "LAPACK version 3.0"
.SH NAME
CBDSQR \- 计算一个实 (real) NxN 上/下 (upper/lower) 三角 (bidiagonal) 矩阵 B 的单值分解 (singular value decomposition (SVD))
.SH "总览 SYNOPSIS"
.TP 19
SUBROUTINE CBDSQR(
UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
LDU, C, LDC, RWORK, INFO )
.TP 19
.ti +4
CHARACTER
UPLO
.TP 19
.t... | sec-knowleage |
elinks
===
纯文本界面的WWW浏览器
## 补充说明
**elinks命令** 能实现一个纯文本界面的WWW浏览器,操作方式与“lynx”类似。
### 语法
```shell
elinks(选项)(参数)
```
### 选项
```shell
-anonymous:是否使用匿名帐号方式;
-auto-submit:对于偶然遇到的第一个表单是否自动提交;
-config-dir:指定elinks指令运行时读取和写入自身的配置和运行状态的存放目录;
-dump:将HTML文档以纯文本的方式打印到标准输出设备;
-version:显示指令的版本信息;
-h:显示帮助信息。
```
### 参数
URL:指定要访问的UR... | sec-knowleage |
## Reverse 100 (re, 100p)
### PL
[ENG](#eng-version)
Dostajemy [program](./r100) (elf konkretnie), który wykonuje bardzo proste sprawdzenie hasła i odpowiada czy hasło jest poprawne czy nie.
Domyślamy się że poprawne hasło jest flagą.
Cały program to coś w rodzaju:
int main() {
printf("Enter the password: ... | sec-knowleage |
# SpEL 注入
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**相关文章**
- [SpEL表达式注入漏洞总结](https://www.mi1k7ea.com/2020/01/10/SpEL%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E%E6%80%BB%E7%BB%93/)
- [SPEL表达式注入-入门篇](https://www.kingkk.com/2019/05/SPEL%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%B3%A8%E... | sec-knowleage |
# 基本 ROP
随着 NX 保护的开启,以往直接向栈或者堆上直接注入代码的方式难以继续发挥效果。攻击者们也提出来相应的方法来绕过保护,目前主要的是 ROP(Return Oriented Programming),其主要思想是在**栈缓冲区溢出的基础上,利用程序中已有的小片段( gadgets )来改变某些寄存器或者变量的值,从而控制程序的执行流程。**所谓gadgets 就是以 ret 结尾的指令序列,通过这些指令序列,我们可以修改某些地址的内容,方便控制程序的执行流程。
之所以称之为 ROP,是因为核心在于利用了指令集中的 ret 指令,改变了指令流的执行顺序。ROP 攻击一般得满足如下条件
- 程序存在溢出,并且可以控制返回... | sec-knowleage |
#2021移动安全事记
时间线
- 0x00
- 1.3 [【格物实验室】私有5G网络的威胁分析](http://blog.nsfocus.net/private-5g-network-0102/)
- 1.4 [DNSMon:用DNS数据进行威胁发现(2)](https://www.anquanke.com/post/id/227326)
- 1.4 [硬件安全入门(上)](https://www.secpulse.com/archives/150573.html)
- 1.4 [VelVet病毒分析报告—针对韩国用户的IOS应用](https://www.anquanke.com/post/id/227123)
- 1... | sec-knowleage |
arpwatch
===
监听网络上ARP的记录
## 补充说明
**arpwatch命令** 用来监听网络上arp的记录。
### 语法
```shell
arpwatch(选项)
```
### 选项
```shell
-d:启动排错模式;
-f<记录文件>:设置存储ARP记录的文件,预设为/var/arpwatch/arp.dat;
-i<接口>:指定监听ARP的接口,预设的接口为eth0;
-r<记录文件>:从指定的文件中读取ARP记录,而不是从网络上监听。
``` | sec-knowleage |
.\" -*-Nroff-*-
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH W 1 2012年5月 procps\-ng 用户命令
.SH 名称
w \- 显示已登录用户以及他们正在干什么。
.SH 概述
\fB... | sec-knowleage |
# URLCrazy软件包描述
生成和测试域名错误及其变体,以检测域名欺骗、URL劫持、网络钓鱼、企业间谍等活动。
特点
- 能生成15种类型的域名变体
- 已知超过8000个常见的拼写错误
- 支持随机性(宇宙射线引发)的位翻转
- 多种键盘布局(qwerty、azerty、qwertz、dvorak)
- 域名变体有效性检查
- 测试域名变体是否正在使用
- 评估域名变体的流行度
资料来源:http://www.morningstarsecurity.com/research/urlcrazy
[URLCrazy首页](http://www.morningstarsecurity.com/research/urlcrazy) |... | sec-knowleage |
# I heard you like files
Misc, 306 points
## Description:
> Bender B. Rodriguez was caught with a flash drive with only a single file on it. We think it may contain valuable information. His area of research is PDF files, so it's strange that this file is a PNG.
A PNG file was attached.
## Solution:
We start with inspe... | sec-knowleage |
/*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | sec-knowleage |
#!/usr/bin/env python3
from binascii import hexlify
from binascii import unhexlify
import logging
import sys
import os
from curve25519 import Private, Public
import nacl.secret
import hmac
import hashlib
logger = logging.getLogger('challenge')
def ReadLine(reader):
data = b''
while not data.endswith(b'\n'):
... | 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 SEQ 1 2022年9月 "GNU coreutils 9.1"... | sec-knowleage |
comm
===
按行比较两个已排序的文件。
## 概要
```shell
comm [OPTION]... FILE1 FILE2
```
## 主要用途
- 按行比较两个已排序的文件。
- 当`FILE1`或`FILE2`为`-`时,读取标准输入。
- 无选项时输出三列,第一列为`FILE1`独有的行,第二列为`FILE2`独有的行,第三列为`FILE1`,`FILE2`共有的行。
## 选项
```shell
-1 不输出第一列。
-2 不输出第二列。
-3 不输出第三列。
--check-... | sec-knowleage |
# 工程化实战思路
本篇整理了在安全数据分析方向的工程化实战思路。
## 思路一:云环境自动化入侵溯源实战
整理自阿里云安全工程师 徐越师傅的KCon分享[1]。
### 如何评估
> 响应速度是企业安全能力的核心体现
简单来看,安全数据分析的落地,时常遇到理想很丰满,现实很骨感的情况。从企业安全角度出发,能提升响应速度是关键。
### 现状分析
企业安全的中心,SoC的安全运营过程中遇到的问题有:
- 数据缺失
- 该有的没有,不该有的一大堆
- 系统孤立
- 告警、流量、情报、主机各个系统都有自己独立的一套,并且输出的数据都不相同
- 人工检索
- 还是依靠人工来排查上述那些系统的... | sec-knowleage |
# Snakes over cheese
Reversing, 100 points
## Description:
> What kind of file is this?
A *.pyc file was attached.
## Solution:
PYC files are compiled Python. Let's decompile the file:
```console
root@kali:/media/sf_CTFs/tamu/Snakes_over_cheese# uncompyle6 reversing2.pyc
# uncompyle6 version 3.2.5
# Python bytecode 2.7... | sec-knowleage |
# Assertion101
> https://download.vulnhub.com/assertion/Assertion-1.0.1.rar
靶场IP:`192.168.2.138`
扫描对外端口服务
```
┌──(root💀kali)-[~]
└─# nmap -p1-65535 -sV 192.168.2.138 ... | sec-knowleage |
### Android 调试基本原理
一般来说,Android 根据如下的顺序来判断一个应用是否可以被调试
1. 检测 boot.img 中的 ro.debuggable 是否为1,为 1 的话,手机中的任何应用均可以调试。
2. 否则,检测对应应用中 AndroidManifest.xml 中 \<application\> 元素中是否包含了android:debuggable="true",如果有的话,才会开启调试支持。
自然,我们也就有两种方法来使得一个应用可以被调试
1. 将一个 apk 文件解包,在 \<application\> 元素中添加 android:debuggable="true",然后重打包,签名。
... | sec-knowleage |
from library import *
import sys
import numpy as np
SZ = 10
inputs, outputs, traces1 = parse(sys.argv[1], SZ, left = 600000, right=700000)
inputs, outputs, traces2 = parse(sys.argv[2], SZ, left = 600000, right=700000)
traces = np.concatenate((traces1, traces2))
normalize(traces)
for i in range(len(traces)):
tr... | sec-knowleage |
# merces (re 100)
###ENG
[PL](#pl-version)
In the task we get an ELF [binary](merces) to work with.
W put it in ret-dec and we get a nice decompilation result:
```c
// Address range: 0x804842b - 0x804850a
int32_t flag(int32_t a1, int32_t a2) {
// 0x804842b
int32_t chars_printed; // 0x804850a_2
if (a1 != 42 ... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.