text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
'\"
'\" Copyright (c) 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: fileevent.n,v 1.2 2003/11/24 05:09... | sec-knowleage |
# PHP-CGI远程代码执行漏洞(CVE-2012-1823)
## 原理
- 参考文章 http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- 影响版本 php < 5.3.12 or php < 5.4.2
## 测试环境
编译及运行环境:
```
docker compose up -d
```
环境启动后,访问`http://your-ip:8080/`可见“Hello”字样。
访问`http://your-ip:8080/index.php?-s`即爆出源码,说明漏洞存在。发送如下数据包,可见Body中的代码已被执行:
```
PO... | sec-knowleage |
---
title: APT2
categories: Information Gathering
tags: [kali linux,APT2,information gathering,Penetration]
date: 2019-04-19 17:47:00
---
APT2 Package Description
========================
自动渗透测试工具包。
此工具将执行NMap扫描,或从Nexpose,Nessus或NMap导入扫描结果。 处理结果将用于根据可配置的安全级别和枚举服务信息启动漏洞利用和枚举模块。
所有模块结果都存储在localhost中,并且是APT2知识库(KB)的一部分。 可... | sec-knowleage |
make
===
GNU的工程化编译工具
## 补充说明
**make命令** 是GNU的工程化编译工具,用于编译众多相互关联的源代码文件,以实现工程化的管理,提高开发效率。
### 语法
```shell
make(选项)(参数)
```
### 选项
```shell
-f:指定“makefile”文件;
-i:忽略命令执行返回的出错信息;
-s:沉默模式,在执行之前不输出相应的命令行信息;
-r:禁止使用build-in规则;
-n:非执行模式,输出所有执行命令,但并不执行;
-t:更新目标文件;
-q:make操作将根据目标文件是否已经更新返回"0"或非"0"的状态信息;
-p:输出所有宏定义和目标文件描述;
-d:De... | sec-knowleage |
# dotnet安全
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**教程**
- [aleenzz/.NET_study](https://github.com/aleenzz/.NET_study)
**案例**
- [越权漏洞反打钓鱼网站](https://www.t00ls.net/articles-58941.html)
---
## 反编译
**反编译工具**
- [dnSpy/dnSpy](https://github.com/dnSpy/dnSpy)
- [dnSpyEx/dnSpy](https://github.... | sec-knowleage |
---
title: 关于文库
---
<center><h1>关于文库</h1></center>
---
## 为什么搭建 T Wiki
`T Wiki` 是一个面向云安全方向的知识库,这一点是和其他文库最大的不同,也许这是国内第一个云安全知识文库?
在 `云服务` 板块可以看到在云服务方向的文章、笔记,在 `云原生` 板块可以看到在云原生方向的文章、笔记,在 `CF 使用手册` 板块里记录了云环境利用框架 CF 的使用,在 `云安全资源` 板块可以看到汇总的云安全资源,比如云安全相关的文章、公众号、工具、靶场等等。
我现在就职于某乙方安全创业公司,因为公司要做 CSPM 产品,所以我们需要学习了解大量云安全相关知识,在学习的过... | sec-knowleage |
## Crypto 50 (crypto, 50p)
### PL
[ENG](#eng-version)
Bardzo przyjemne (dla autora tego writeupa) zadanie. Dostajemy 10 tekstów zaszyfrowanych tym samym stream cipher (z tym samym IV/kluczem), i mamy za zadanie rozszyfrować 11.
Teksty w pliku [input.txt](input.txt)
Orientujemy się od razu, że to sytuacja podobna do te... | sec-knowleage |
# 国内外安全公司·整合
## Part1
该部分转载自:[threat-intelligence](https://github.com/NewBee119/threat-intelligence)[2],偏向于对提供威胁情报服务的公司
### 综合类咨询
<https://www.hackread.com/hacking-news/> 科学上网,多为一些比较新鲜的安全咨询
<https://github.com/kbandla/APTnotes> 收集了从2008年到最近的APT事件,有人维护
<https://badcyber.com> 一群想要成为研究员的人和记者维护的网站,每个月都会收集几次与网络... | sec-knowleage |
# 0x00 简介
MSF内部集成很多模块,我这里用的一个flash漏洞模块adobe_flash_hacking_team_uaf 然后把会话给CS 这篇文章的内容很早就在[油管](https://www.youtube.com/watch?v=fnCLdPOmZOk)上就有了,所以手法不是很超前,但是写出来也是提供一个思路,让大家发挥。
# 0x01 过程
### 环境:
攻击机:kali
目标机:win7
flash版本:flashplayer14_0r0_125_winax
首先我们启动msf 配置我们的payload

```
msf > use exploi... | sec-knowleage |
## Broken Box (Crypto, 300p)
We are given web service signing data for us, and we are told that it is somehow "broken".
Indeed, this service looks suspicious - for example, it sometimes give different signature for the same data.
We guessed that somewhere, somehow bit is flipped, because this is common trope with RSA o... | sec-knowleage |
# GiFON
Category: Web, 200 points
## Description
> Jeff D. Spleier applied for a job in the ISA. His interview went really well and he seemed the right man for the job.
>
> Naturally, we decided not to recruit him.
>
> We suspect that he is in possession of some classified documents that must not be leaked. We worry ... | sec-knowleage |
# 静态分析 java 层例子
## 2014 tinyCTF Ooooooh! What does this button do
### 确定文件类型
通过linux的file命令可以看出该文件是一个压缩包,解压打开发现它其实是一个apk文件。
### 安装apk
安装文件之后,查看一下
可以看出其就是输入一个字符串,然后应该会弹出结果。
### 查看程序
```java
class C00721 implements OnClickListener {
C00721() {
}
public void onClick(View view) {
if ... | sec-knowleage |
# Datetime (ppc 100)
###ENG
[PL](#pl-version)
In the task we a lot of [messages](messages.zip).
Each message has a timestamp in the format `Friday_1_April_2015` and contains some random hash value.
The flag is one of those hashes and we have to find the right one.
The point is to find the message with correct timestamp... | sec-knowleage |
# Level02
#### About
There is a vulnerability in the below program that allows arbitrary programs to be executed, can you find it?
To do this level, log in as the level02 account with the password level02. Files for this level can be found in /home/flag02.
#### Sources
```
#include <stdlib.h>
#include <unistd.h>
#inclu... | sec-knowleage |
### kernel UAF介绍
UAF 即 Use After Free,通常指的是**对于释放后未重置的垂悬指针的利用**,此前在用户态下的 heap 阶段对于 ptmalloc 的利用很多都是基于UAF漏洞进行进一步的利用。
在 CTF 当中,内核的“堆内存”主要指的是直接映射区(direct mapping area),常用的分配函数 kmalloc 从此处分配内存,常用的分配器为 slub,若是在 kernel 中存在着垂悬指针,我们同样可以以此完成对 slab/slub 内存分配器的利用,通过 Kernel UAF 完成提权。
### 内核堆利用与绑核介绍
slub allocator 会优先从当前核心的 `kmem_c... | sec-knowleage |
## Android Drm service 堆溢出漏洞(CVE-2017-13253)
> zimperium发表于2018年03月15日
### 漏洞描述
Android 8.0版本和8.1版本中的CryptoPlugin.cpp文件的CryptoPlugin::decrypt存在提权漏洞,该漏洞源于程序缺少边界检测。远程攻击者可利用该漏洞执行任意代码或造成拒绝服务(越边界写入)。
### 影响范围
android 8.0/8.1
### 漏洞详情
#### 漏洞位置
CryptoPlugin.cpp文件的CryptoPlugin::decrypt, 代码前置做了很多安全校验,但百密一疏,漏掉了一个判断解密数据加目标偏移是否会大... | sec-knowleage |
### 离散对数基本定义
在了解离散对数时,我们先来了解几个基本定义。
**定义1**
在群 G 中,g 为 G 的生成元,也就是说群 G 中每一个元素都可以写成 $y=g^k$,我们称 k 为 y 在群 G 中的对数。
**定义2**
设 $m\geq 1$,$(a,m)=1$ ,使得 $a^d \equiv 1\pmod m$ 成立的最小正整数 d 称为 a 对模 m 的指数或者阶,我们一般将其记为 $\delta_m(a)$。
**定义3**
当 $\delta_m(a)=\varphi(m)$ 时,称 a 是模 m 的原根,简称 m 的原根。
### 关于离散对数的一些性质
**性质1**
使得 $a^d \equiv 1\... | sec-knowleage |
ar
===
建立或修改备存文件,或是从备存文件中抽取文件
## 补充说明
**ar命令** 是一个建立或修改备存文件,或是从备存文件中抽取文件的工具,ar可让您集合许多文件,成为单一的备存文件。在备存文件中,所有成员文件皆保有原来的属性与权限
### 语法
```shell
用法: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
ar -M [<mri-脚本]
```
### 选项
> 以下内容来自 GNU ar (GNU Bin... | sec-knowleage |
# T1505-003-webshell-冰蝎
## 来自ATT&CK的描述
Webshell是一个Web脚本,放置在可公开访问的Web服务器上,允许攻击者将Web服务器用作网络的网关。 Web shell可以提供多种功能,如虚拟终端、文件管理、数据库连接等。 除了服务器端脚本之外,Webshell可能还有一个客户端接口程序,用于与管理Web服务器的通信(例如,中国菜刀、C刀、蚁剑、冰蝎等)。
## 测试案例
PHP网站(Phpstudy+DVWA)
冰蝎V1.0/V2.0(客户端+自带shell)
wireshark(必备)
## 检测日志
HTTP流量
## 测试复现
利用DVWA相关漏洞,上传冰蝎默认webshell,利用冰蝎... | sec-knowleage |
# Log Me Policy
* Category: Web
* 200 Points
* Solved by the JCTF Team
## Description
> Hi there, our SOC team recived message that a hacker was quickly able to compromise our customer's senstive data by abuse our super-secure login page.
>
> Could you spot the vulnerability and let us know the flag?
## Solution
We vi... | sec-knowleage |
.TH PanedWindow 3tk "tcllib - BWidget"
.SH NAME
.B PanedWindow - 平铺布局管理器组件
.SH 创建 CREATION
.B PanedWindow pathName ?option value...?
.SH 描述 DESCRIPTION
PanedWindow 是在垂直或水平平铺格局下排布子窗体的一个组件。用户可以调整窗格(pane)的大小,带有在子窗口之间的一个窗格控制窗框(sash)。
.SH 组件特有选项 WIDGET-SPECIFIC OPTIONS
.TP
-pad (只读)
指定在窗框的按钮和子窗口之间的额外的空间。
.TP
-side (只读) ... | sec-knowleage |
### 流密码概述
流密码一般逐字节或者逐比特处理信息。一般来说
- 流密码的密钥长度会与明文的长度相同。
- 流密码的密钥派生自一个较短的密钥,派生算法通常为一个伪随机数生成算法。
需要注意的是,流加密目前来说都是对称加密。
伪随机数生成算法生成的序列的随机性越强,明文中的统计特征被覆盖的更好。
流密码加解密非常简单,在已知明文的情况下,可以非常容易地获取密钥流。
流密码的关键在于设计好的伪随机数生成器。一般来说,伪随机数生成器的基本构造模块为反馈移位寄存器。当然,也有一些特殊设计的流密码,比如 RC4。 | sec-knowleage |
.\" Copyright (c) 1989, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above co... | sec-knowleage |
# T1588-005-获取能力-漏洞利用
## 来自ATT&CK的描述
攻击者可能会购买、窃取或下载可在攻击目标过程中使用的漏洞。利用了一个错误或漏洞,以使计算机硬件或软件发生非预期或意料之外的行为。与其开发自己的漏洞,攻击者可能从网上找到或修改漏洞,或从漏洞供应商那里购买漏洞。
除了从互联网上下载免费的漏洞外,攻击者还可能从第三方实体购买漏洞。第三方实体可以包括专门从事漏洞开发的技术公司、犯罪市场(包括漏洞工具包)或个人。除了购买漏洞,攻击者还可能从第三方实体(包括其他攻击者)窃取和重新利用漏洞。
攻击者可能会监控漏洞提供者的论坛,以了解现有的以及新发现的漏洞状态。在发现漏洞和公开漏洞之间通常会有延迟。攻击者可能以那些已知存在漏... | sec-knowleage |
# T1218-011-win-基于白名单Rundll32.exe执行payload
## 来自ATT&CK的描述
Rundll32.exe程序可以调用来执行任意二进制文件。攻击者可能会利用此功能来代理执行代码,从而避免触发那些可能不会监控rundll32.exe进程执行的安全工具,因为正常操作中使用rundll32.exe的Windows会有白名单或误报。
Rundll32.exe可用于通过未记录的shell32.dll函数Control_RunDLL和 Control_RunDLLAsUser来执行控制面板项目文件(.cpl)。双击.cpl文件也会触发rundll32.exe执行。
Rundll32也可用于执行JavaScrip... | sec-knowleage |
### Exiftool简介:
ExifTool可读写及处理图像、视频及音频,例如Exif、IPTC、XMP、JFIF、GeoTIFF、ICC Profile。包括许多相机的制造商信息读取,如佳能,卡西欧,大疆,FLIR,三星等。
同样它支持多国语言

```bash
root@John:tmp# exiftool ‐lang zh‐cn ‐a ‐u ‐g1 ./55e736d12f2eb9385716e513d8628535e4dd6fdc.jpg
‐‐‐‐ ExifTool ‐‐‐‐
ExifTool 版本 : 11.16
‐‐‐‐... | sec-knowleage |
### RSA 侧信道攻击概述
能量分析攻击(侧信道攻击)是一种能够从密码设备中获取秘密信息的密码攻击方法.与其
他攻击方法不同:这种攻击利用的是密码设备的能量消耗特征,而非密码算法的数学特性.能量分析攻击是一种非入侵式攻击,攻击者可以方便地购买实施攻击所需要的设备:所以这种攻击对智能卡之类的密码设备的安全性造成了严重威胁。
能量分析攻击是安全领域内非常重要的一个部分,我们只在这里简单讨论下。
能量分析攻击分为:
- 简单能量分析攻击(SPA),即对能量迹进行直观分析,肉眼看即可。
- 差分能量分析攻击(DPA),基于能量迹之间的相关系数进行分析。
### RSA 侧信道攻击条件
攻击者可获取与加解密相关的侧信道信息,例如能量消耗、... | sec-knowleage |
## 硬件入侵工具
|Hardware Hacking||||||
|:-:|:-:|:-:|:-:|:-:|:-:|
|[Android SDK](Android%20SDK.md)|[ApkTool](ApkTool.md)|[Arduino](Arduino.md)|[dex2jar](dex2jar.md)|[Sakis 3G](Sakis%203G.md)|[Smali](Smali.md)| | sec-knowleage |
# VoIP (forensics 100)
###ENG
[PL](#pl-version)
In the task we get a [pcap](voip.pcap) of a VoIP call.
There was not much to do here since Wireshark can out-of-the-box decode this for us:
[!](ws.png)
And the flag is `SECCON{9001IVR}`
###PL version
W zadaniu dostajemy [pcapa](voip.pcap) z rozmowy przez VoIP.
Nie było tu... | sec-knowleage |
---
title: Unity 3D
date: 2022-11-23 16:23:31.692703
background: bg-[#7c7c7c]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 50 keyboard shortcuts found in Unity 3D
---
Keyboard Shortcuts
------------------
### Tools
Shortcut | Action
---|---
`Q` | Pan
`W` ... | sec-knowleage |
# T1505-003-windows下webshell检测
## 来自ATT&CK的描述
攻击者可能会通过Web Shell为web服务器创建后门,以便实现对系统的持久访问。Web Shell是攻击者放置在可公开访问的web服务器上的web脚本,以便通过web服务器进入网络。Web Shell可以提供一套待执行的函数,或是为web服务器所在系统提供命令行界面。
除服务器端脚本之外,Web Shell可能还有客户端接口程序,用于与web服务器通信,例如:[China Chopper](https://attack.mitre.org/software/S0020)(引自:Lee 2013)
## webshell简介
webshel... | sec-knowleage |
---
title: KanbanMail
date: 2022-11-23 16:23:31.698423
background: bg-[#4d74e6]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 29 keyboard shortcuts found in KanbanMail
---
Keyboard Shortcuts
------------------
### Global
Shortcut | Action
---|---
`Ctrl` `\` ... | sec-knowleage |
### 非线性反馈移位寄存器介绍
为了使得密钥流输出的序列尽可能复杂,会使用非线性反馈移位寄存器,常见的有三种
- 非线性组合生成器,对多个 LFSR 的输出使用一个非线性组合函数
- 非线性滤波生成器,对一个 LFSR 的内容使用一个非线性组合函数
- 钟控生成器,使用一个(或多个)LFSR 的输出来控制另一个(或多个)LFSR 的时钟 | sec-knowleage |
# ZIP明文攻击
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**相关工具**
- archpr(Advanced Archive Password Recovery)
- [keyunluo/pkcrack](https://github.com/keyunluo/pkcrack)
- [kimci86/bkcrack](https://github.com/kimci86/bkcrack)
```bash
wget https://github.com/kimci86/bkcrack/releases/download... | sec-knowleage |
import re
import requests
s = requests.session()
def oracle(condition):
r = query("<> (%s)" % condition)
if "WAF" in r:
print("WAF")
return "5889" in r
def blind(column, limit, charset):
result = ""
for d in range(limit):
for c in charset:
if oracle("select mid(%s,%d... | sec-knowleage |
.\" From Henry Spencer's regex package (as found in the apache
.\" distribution). The package carries the following copyright:
.\"
.\" Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
.\" This software is not subject to any license of the American Telephone
.\" and Telegraph Company or of the Regents ... | sec-knowleage |
# Nginx越界读取缓存漏洞(CVE-2017-7529)
## 漏洞原理
参考阅读:
- https://cert.360.cn/detailnews.html?id=b879782fbad4a7f773b6c18490d67ac7
- http://galaxylab.org/cve-2017-7529-nginx%E6%95%B4%E6%95%B0%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/
Nginx在反向代理站点的时候,通常会将一些文件进行缓存,特别是静态文件。缓存的部分存储在文件中,每个缓存文件包括“文件头”+“HTTP返回包头”+“HTTP... | sec-knowleage |
# cq_cq_cq
Category: Crypto, 200 Points
## Description
A text file was attached: `A_Message_from_Mr._Phillips.txt`
```
10:38 18 -> CQ
FROM MISTER PHILLIPS TO ALL AGENTS STOP PLEASE UPDATE STOP
10:42 33 -> 18
FROM AGENT THREE FOUR SEVEN TO MISTER PHILLIPS STOP ALL IS READY STOP NEED FLAG STOP
11:17 18 -> CQ
HSVNN PBLMS ... | sec-knowleage |
'\" t
.TH "HALT" "8" "" "systemd 231" "halt"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/50... | 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 PRINTENV 1 2022年9月 "GNU coreutils... | sec-knowleage |
break
===
结束for,while或until循环。
## 概要
```shell
break [n]
```
## 主要用途
- 结束for,while或until循环,可指定退出几层循环。
## 参数
n(可选):大于等于1的整数,用于指定退出几层循环。
## 返回值
返回成功除非n小于1。
## 例子
```shell
# break的可选参数n缺省值为1。
# 从外层for循环继续执行。
for((i=3;i>0;i--)); do
for((j=3;j>0;j--)); do
if((j==2)); then
# 换成break 1时结果一样
break
fi
pri... | sec-knowleage |
'\" t
.TH "KERNEL\-COMMAND\-LINE" "7" "" "systemd 231" "kernel-command-line"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | sec-knowleage |
# 40. 最小的 K 个数
## 题目链接
[牛客网](https://www.nowcoder.com/practice/6a296eb82cf844ca8539b57c23e6e9bf?tpId=13&tqId=11182&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 解题思路
### 大小为 K 的最小堆
- 复杂度:O(NlogK) + O(K)
- 特别适合处理海量数据
维护一个大小为 K 的最小堆过程如下:使用大顶堆。在添加一个元素之后,如果大顶堆的大小大于 K,那... | sec-knowleage |
# Pwn5
Pwn, 372 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/Pwn5# nc pwn.tamuctf.com 4325
ls as a service (laas)(Copyright pending)
Version 2: Less secret strings and more portable!
Enter the arguments... | sec-knowleage |
# Episode 1: Challenge 2
## Description
> Can you find a way to stop the hackers that encrypted your data?
>
> Hint: Find a way to switch it off.
An executable was attached.
## Solution
Let's check the executable:
```console
┌──(user@kali)-[/media/…/h4ck1ng.google/EP001/Challenge_02/a]
└─$ ./wannacry
```
Nothing happ... | sec-knowleage |
# ZIP 格式
## 文件结构
`ZIP` 文件主要由三部分构成,分别为
| 压缩源文件数据区 | 核心目录 | 目录结束 |
| ----------------------------------------------- | ----------------- | ------------------------------- |
| local file header + file data + data descriptor | central directory | end of central... | sec-knowleage |
# 54. 二叉查找树的第 K 个结点
[NowCoder](https://www.nowcoder.com/practice/ef068f602dde4d28aab2b210e859150a?tpId=13&tqId=11215&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 解题思路
利用二叉查找树中序遍历有序的特点。
```java
private TreeNode ret;
private int cnt = 0;
public TreeNode KthNode(Tree... | sec-knowleage |
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.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 Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "SMBCLIENT" 1 "" "" ""
.SH NAME
smb... | sec-knowleage |
# The search for a higher being (2/5)
Category: Innovation
## Description
> You are orbiting mars, is it there where the intelligent life reside?
>
> https://s3.us-west-2.amazonaws.com/cyber-ctf.be/mars.html
>
## Solution
We visit the attached website and see the following text:
```
Welcome! I'm captain Russel, We've... | sec-knowleage |
## 空对象(Null)
### Intent
使用什么都不做
的空对象来代替 NULL。
一个方法返回 NULL,意味着方法的调用端需要去检查返回值是否是 NULL,这么做会导致非常多的冗余的检查代码。并且如果某一个调用端忘记了做这个检查返回值,而直接使用返回的对象,那么就有可能抛出空指针异常。
### Class Diagram
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/22870bbe-898f-4c17-a31a-d7c5ee5d1c10.png"/> </div><br>
### Impl... | sec-knowleage |
# Diary - Misc (50 + 0), 120 solves
> We found a torn diary on the ground. It seems to belong to a local boy.
In this task we were given a small zipped git repository. Trying to do anything with it (`git log` etc.) failed
with errors. It seemed like we had to find the flag in raw git objects then.
The first thing we di... | sec-knowleage |
# SPEL
{% code title="SpelController.java" %}
```java
package com.example.controller;
import org.springframework.expression.Expression;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.web.bind.annotation.GetMapp... | sec-knowleage |
# Rend Asunder
## [Flag0](./flag0) -- Found
- What do you have access to?
- Look around your sandbox
- Some places are Definitely mOre iMportant than others
## [Flag1](./flag1) -- Not Found
- The rendered page looks a bit odd
## [Flag2](./flag2) -- Not Found | sec-knowleage |
# XVWA-WalkThrough
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶场项目地址**
- https://github.com/s4n7h0/xvwa
---
**实验环境**
`环境仅供参考`
- phpstudy
- Microsoft Windows 10 企业版 LTSC - 10.0.17763
- VMware® Workstation 15 Pro - 15.0.0 build-10134415
- kali 4.19.0-kali3-amd64
- CobaltStrike4.1
---
## 搭建/使用
... | sec-knowleage |
# AES-ABC
Cryptography, 400 points
## Description:
> AES-ECB is bad, so I rolled my own cipher block chaining mechanism - Addition Block Chaining! You can find the source here: aes-abc.py. The AES-ABC flag is body.enc.ppm
```python
#!/usr/bin/env python
from Crypto.Cipher import AES
from key import KEY
import os
import... | sec-knowleage |
# 信息
`记录收集 Windows 系统软硬件信息的命令`
- 域信息见 [信息收集](../../../Security/RedTeam/信息收集/信息收集.md#域信息) 笔记
---
## 大纲
* **[软件](#软件)**
* [版本信息](#版本信息)
* [环境变量](#环境变量)
* [开机启动](#开机启动)
* [日志](#日志)
* [应用服务](#应用服务)
* [用户相关](#用户相关)
* **[硬件](#硬件)**
* [网络](#网络)
* [硬盘文件系统](#硬盘文件系统)
---
## 软件
### 版本信息
```cmd
ver ... | sec-knowleage |
neofetch
===
显示带有发行徽标的系统信息的工具
## 补充说明
**neofetch** 支持Linux/Unix、Windows、macOS。各发行版均已集成包可直接进行安装
Neofetch是一个在终端上显示带有发行徽标的系统信息工具,neofetch命令将显示有关相应系统的简要信息。
显示的信息包括: 型号、操作系统、内核、CPU、GPU、内存、正常运行时间、程序包、shell、分辨率、DE、WM、WM主题、主题、图标和终端等
Neofetch是一个开源工具,[项目地址](https://github.com/dylanaraps/neofetch)
### 安装
Debian/Ubuntu
```shell
s... | sec-knowleage |
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
.\" 1993 Michael Haardt, Ian Jackson.
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice... | sec-knowleage |
# gitlist 0.6.0 远程命令执行漏洞(CVE-2018-1000533)
gitlist是一款使用PHP开发的图形化git仓库查看工具。在其0.6.0版本及以前,存在一处命令参数注入问题,可以导致远程命令执行漏洞。
## 环境搭建
执行如下命令启动漏洞环境:
```
docker compose up -d
```
环境启动后,访问`http://your-ip:8080`将看到一个名为`example`的仓库。
## 漏洞原理
在用户对仓库中代码进行搜索的时候,gitlist将调用`git grep`命令:
```php
public function searchTree($query, $branc... | sec-knowleage |
# gpg
---
## 建立新的 GPG 密钥对
```bash
gpg --gen-key
```
## 导出公钥
```bash
gpg --export {user-name}
gpg --export ffffffff0x > ffffffff0x-pub.gpg
```
## 导入其他人的公钥
```bash
gpg --import FileName
```
## 读取加密的消息
```bash
gpg --decrypt test-file.asc
```
---
## Source & Reference
- [Gpg Key-Pair Encryption and Decryption Examples](htt... | sec-knowleage |
.\" Copyright (C) Markus Kuhn, 1995
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Pub... | sec-knowleage |
# Potato
> https://download.vulnhub.com/potato/Potato.ova
靶场IP:`192.168.2.15`
扫描对外端口服务
```
┌──(root㉿kali)-[~]
└─# nmap -p1-65535 -sV 192.168.2.15
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-08 09:22 EDT
Nmap scan report for 192.168.2.15
Host is up (0.00014s latency).
Not shown: 65532 closed tcp ports (reset)
POR... | sec-knowleage |
# Writeup BioTerra CTF 2016
Team: msm, c7f.m0d3, akrasuski1, nazywam, other19, cr019283, shalom
### Table of contents
* [Orgone Market (Web)](orgone_market)
* [Akashic Records (Pwn)](akashic_records)
* [Zip (Forensics)](zip)
* [Job Portal (Web/Pwn)](job_portal)
* [Illuminati (Web)](illuminati) | sec-knowleage |
# Amaze me
Category: Logic, 100 Points
## Description
> All you need to know is:
>
> netcat maze.csa-challenge.com 80
>
> Good luck!
## Solution
Let's connect to the attached server:
```console
root@kali:/media/sf_CTFs/checkpoint/Amaze_me# nc maze.csa-challenge.com 80
The great Mount of Moria towered over a maze that... | sec-knowleage |
.\" Copyright (c) 1988, 1990 The Regents of the University of California.
.\" Copyright (c) 1988 Mark Nudleman
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of... | 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 STDBUF 1 2022年9月 "GNU coreutils 9... | sec-knowleage |
screen
===
用于命令行终端切换
## 补充说明
**Screen** 是一款由GNU计划开发的用于命令行终端切换的自由软件。用户可以通过该软件同时连接多个本地或远程的命令行会话,并在其间自由切换。GNU Screen可以看作是窗口管理器的命令行界面版本。它提供了统一的管理多个会话的界面和相应的功能。
**会话恢复**
只要Screen本身没有终止,在其内部运行的会话都可以恢复。这一点对于远程登录的用户特别有用——即使网络连接中断,用户也不会失去对已经打开的命令行会话的控制。只要再次登录到主机上执行screen -r就可以恢复会话的运行。同样在暂时离开的时候,也可以执行分离命令detach,在保证里面的程序正常运行的情况... | sec-knowleage |
# ELF 文件
> 本部分内容来源于 ELF 1.2 标准,内容经过一定的修改与整理,主要参考文献如下
>
> 1. ELF 文件格式分析,北京大学,滕启明
> 2. ELF-摧毁圣诞
## 简介
ELF (Executable and Linkable Format)文件,也就是在 Linux 中的目标文件,主要有以下三种类型
- 可重定位文件(Relocatable File),包含由编译器生成的代码以及数据。链接器会将它与其它目标文件链接起来从而创建可执行文件或者共享目标文件。在 Linux 系统中,这种文件的后缀一般为 `.o` 。
- 可执行文件(Executable File),就是我们通常在 Linux 中执行的程序... | sec-knowleage |
# Tomcat7+ Weak Password && Backend Getshell Vulnerability
[中文版本(Chinese version)](README.zh-cn.md)
Tomcat version: 8.0
## Introduction
Tomcat supports deploying the war files through backend, so we can directly place the webshell into the web directory. In order to access the backend, permissions are needed.
Perm... | sec-knowleage |
.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your... | sec-knowleage |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import hmac
import socket
from hashlib import sha1
from Crypto.Cipher import AES
from struct import pack, unpack
from threading import Thread, Lock
from base64 import standard_b64encode
from time import time, sleep, strftime
class SecureServer:
... | sec-knowleage |
# miniRSA
Cryptography, 300 points
## Description:
> Lets decrypt this: ciphertext? Something seems a bit small
```
N: 293319224997949857827359760455911649366830593805589503865601601057403432015133699390063075311659227089496191626986236753490304308595478257089947083218037053094594380993404277705800644009114318566569019... | sec-knowleage |
# Investigative Reversing 3
Forensics, 400 points
## Description:
> We have recovered a binary and an image See what you can make of it. There should be a flag somewhere.
## Solution:
This is the follow-up for [Investigative Reversing 2](Investigative_Reversing_2.md).
Again, let's check the binary with Ghidra:
```c
un... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "DROP VIEW" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
DROP VIEW \- 删除一个视图
.SH SYNOPSIS
.sp
.nf
DROP VIEW \fIname\fR [, ...] [ CASCADE | RESTRICT ]
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
\fBDROP VIEW\fR 从数据库中删除一个现存的视图。 执行这条命令必须是视图的所有者。
.SH ... | sec-knowleage |
# Puzzle
Category: Web, 300 points
## Description
> Nati Plemental applied for a job in the ISA. As a recruitment assignment, he was challenged to solve our puzzle. Unfortunately, instead of focusing on actually solving the puzzle, Nati wasted his time and effort on adding meaningless features.
>
> Nati was not good e... | sec-knowleage |
# Very Smooth (Crypto, 300p)
In the task we get a [pcap](s.pcap) with RSA encrypted SSL traffic.
The task name suggests that maybe the RSA modulus or primes are a smooth number and modulus can be factored in some simple way.
First we open the pcap in Network Miner in order to recover the [server certificate](SRL.cer).
... | sec-knowleage |
---
title: bing-ip2hosts
categories: Information Gathering
tags: [enumeration,osint,information gathering,bing-ip2hosts,kali linux]
date: 2016-10-19 03:33:00
---
0x00 bing-ip2hosts介绍
-------------
Bing.com是微软拥有的以前称为MSN搜索和实时搜索的搜索引擎。它具有搜索在特定IP地址上的网站的独特功能。 Bing-ip2hosts使用此功能枚举Bing已为特定IP地址编入索引的所有主机名。这种技术被认为是在渗透测试的信息收集阶段的最佳... | sec-knowleage |
# Table of contents
* [序言](README.md)
* [引用](引用.md)
## devsecops
* [checkmarx](<devsecops/checkmarx/README.md>)
* [codeql](<devsecops/codeql/README.md>)
* [coverity](<devsecops/coverity/README.md>)
* [fortifiy](<devsecops/fortifiy/README.md>)
* [sca](<devsecops/sca/README.md>)
* [Dependency Check](<devsecops/sca/Depe... | sec-knowleage |
# 数字取证和事件响应
数字取证和事件响应(Digital Forensics and Incident Response, DFIR),是一个专注于识别、补救和调查网络安全事件的专业领域,包括收集、保存和分析取证证据,以描绘事件的完整、详细过程的几个方面。
## 标准流程和步骤
### 基本步骤
应急响应操作可分为以下几个步骤:收集信息 -> 判断类型 -> 深入分析 -> 清理处置 -> 产出报告。[1]
- 收集信息:收集客户、业务方反馈的信息,各类安全设备/系统的安全告警
- 判断类型:结合已有信息,判断是否为安全事件,确认后启动应急响应标准流程。以及初步何种安全事件(勒索、挖矿、断网、DoS等),根据安全事件类型来... | sec-knowleage |
# OpenSMTPD 远程命令执行漏洞 (CVE-2020-7247)
OpenSMTPD 是面向 unix 操作系统 (BSD, MacOS, GNU/Linux) 的一个 smtp 服务程序,遵循 RFC 5321 SMTP 协议,OpenSMTPD 最初是为 OpenBSD 操作系统开发的,是 OpenBSD 项目的一部分,由于其开源的特性,进而分发到了其他 unix 平台。根据 ISC 许可,该软件可免费供所有人使用和重用。
`CVE-2020-7247` 是 OpenSMTPD 在实现 RFC 5321 的过程中对 发件人/收件人 校验不严而导致的。
2020年01月29日,OpenSMTPD 官方在 github... | sec-knowleage |
本课是针对前第1-20课时的msfvenom生成payload的自动补全命令补充。虽msfvenom强大,同样有着非常繁琐的参数,参数强大,意味着会增加工作效率,但它并不像MSF有命令补全功能,故本课吸取前20课经验,自动补全msfvenom的参数。
### 需要zsh的支持:
```bash
root@John:~# cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen
/bin/zsh
/usr/bin/zsh
/usr/bin/tmux
root@John:~# echo ... | sec-knowleage |
<?php
include 'common.php';
if(empty($_GET['imagekey'])) {
header('Location: ?op=home');
exit();
}
$imagekey = $_GET['imagekey'];
$im = load_image($imagekey);
$w = imagesx($im);
$h = imagesy($im);
if($w > MAX_IM_SIZE || $h > MAX_IM_SIZE)
fatal("Invalid image dimensions.");
$nc = imagecolorstotal($im);
i... | sec-knowleage |
# nfs 配置案例
---
## 案例 1
**服务端**
- 在 Centos 上配置 nfs 服务以只读的形式方式共享目录 `/public` (目录需要自己创建).
```bash
yum -y install nfs-utils
```
```vim
vim /etc/exports
/public 192.168.xxx.xxx(ro)
```
```bash
mkdir /public
vi /etc/selinux/config
SELINUX=disabled
firewall-cmd --zone=public --add-service=rpc-bind --permanent
firewall-cmd --... | sec-knowleage |
### SFX 法概述
"SFX"法利用了Ollydbg自带的OEP寻找功能, 可以选择直接让程序停在OD找到的OEP处, 此时壳的解压过程已经完毕, 可以直接dump程序.
### SFX 法要点
1. 设置OD, 忽略所有异常, 也就是说异常选项卡里面都打上勾
2. 切换到SFX选项卡, 选择"字节模式跟踪实际入口(速度非常慢)", 确定
3. 重载程序(如果跳出是否"压缩代码?"选择"否", OD直接到达OEP)
### SFX 法示例
示例程序可以点击此处下载: [6_sfx.zip](https://github.com/ctf-wiki/ctf-challenges/blob/master/reverse/unpack/... | sec-knowleage |
# Nacos 认证绕过漏洞(CVE-2021-29441)
Nacos 是阿里巴巴推出来的一个新开源项目,是一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。致力于帮助发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,可以快速实现动态服务发现、服务配置、服务元数据及流量管理。
该漏洞发生在nacos在进行认证授权操作时,会判断请求的user-agent是否为”Nacos-Server”,如果是的话则不进行任何认证。开发者原意是用来处理一些服务端对服务端的请求。但是由于配置的过于简单,并且将协商好的user-agent设置为Nacos-Server,直接硬编码在了代码里,导致了漏洞的出现。并且利用这个... | sec-knowleage |
# stringmaster2
PWN
## Description:
> Eat, sleep, swap, replace This time with more mitigations!
```c++
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <unistd.h>
#include <limits>
using namespace std;
const string chars = "abcdefghijklmnopqrstuvwxy";
void print_menu() {
cout << e... | sec-knowleage |
'\"
'\" Copyright (c) 1995-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: interp.n,v 1.2 2003/11/24 05:09:59 bbbush Exp $
'\"
'\" The definitions below are for supplemental ma... | sec-knowleage |
原文 by [RcoIl的窝](http://rcoil.me/2017/06/%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95-%E4%B9%8B-%E4%BB%A3%E7%90%86%E7%AF%87/)
服务器处于内网,可以访问外部网络。
服务器处于外网,可以访问外部网络,但是服务器安装了防火墙来拒绝敏感端口的连接。
服务器处于内网,对外只开放了80端口,并且服务器不能访问外网网络。
对于以上三种情况,传统的方法可以突破1和2二种(全都可以理解为lcx),第3种可以使用SOCKS代理。
代理小技巧
## 判断什么端口能出来
### VISTA 以下
* TCP
`FOR /L %... | sec-knowleage |
# Connect
> React-Redux只在组件内使用,用来连接 `store` 和 React 组件
react 组件和 redux store 之间是没有任何关系的。这一节,我们就把他们二者 connect 起来。
连接二者,需要一个专门的库,叫做 react-redux,这个是 React 官方的 Redux 对 React 的绑定。
### 安装
```npm
npm i react-redux -S
```
### 使用
具体的使用的主要涉及两个接口`Provider`和`connect`
#### `connect`方法声明
connect作用:**连接** React组件 与 Redux store
```js
... | sec-knowleage |
def KSA(key):
keylength = len(key)
S = range(256)
j = 0
for i in range(256):
j = (j + S[i] + key[i % keylength]) % 256
S[i], S[j] = S[j], S[i] # swap
return S
def PRGA(S):
i = 0
j = 0
while True:
i = (i + 1) % 256
j = (j + S[i]) % 256
S[i], S... | 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 MV 1 2022年9月 "GNU coreutils 9.1" ... | sec-knowleage |
# Shop
Category: Reverse Engineering, 50 points
## Description
> Best Stuff - Cheap Stuff, Buy Buy Buy...
A binary file was attached.
## Solution
Let's run the attached file:
```console
┌──(user@kali)-[/media/sf_CTFs/pico/Shop]
└─$ ./source
Welcome to the market!
=====================
You have 40 coins
Item ... | sec-knowleage |
## Free Web Access (Web)
###ENG
[PL](#pl-version)
In the task we get access to a proxy-gate service.
The task description states that this gate is not really anonymous and that it stores some data.
However there is no registration nor accounts.
There is `/admin` subpage but it says that we're not the admin so we can't ... | 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 |
'\" t
.TH "SYSTEMCTL" "1" "" "systemd 231" "systemctl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.deb... | sec-knowleage |
# MySQL快速入门
---
在本教程中,我将构建一个使用如下实体关系图(ERD)中显示的简单架构的数据库。数据库列出了学生和正在学习的课程。为了保持简单,我使用了两个实体(即表),只有一种关系和依赖。这两个实体称为 `dbo_students` 和 `dbo_courses`。
数据库的多样性是一对多的,因为每门课程可以包含很多学生,但每个学生只能学习一门课程。
关于术语的快速说明:
- 一张表称为一个实体。
- 一个字段称为一个属性。
- 一条记录称为一个元组。
- 用于构建数据库的脚本称为架构。
## 构建架构
要构建数据库,使用 `CREATE TABLE <表名>` 命令,然后定义每个字段的名称和数据类型。数据库使用 ... | sec-knowleage |
# T1190-CVE-2020-35754-QuickCms访问控制错误漏洞
## 来自ATT&CK的描述
使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。
如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。
对于网站和数据库,... | sec-knowleage |
# buffer overflow 3
Binary Exploitation, 450 points
## Description:
> It looks like Dr. Xernon added a stack canary to this program to protect against buffer overflows. Do you think you can bypass the protection and get the flag?
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#incl... | sec-knowleage |
# elFinder ZIP Arguments Injection Leads to Commands Injection (CVE-2021-32682)
[中文版本(Chinese version)](README.zh-cn.md)
elFinder is an open-source file manager for web, written in JavaScript using jQuery UI.
There is a arguments injection vulnerability found in the elFinder 2.1.48 and before. This vulnerability can... | sec-knowleage |
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Chris Torek and the American National Standards Committee X3,
.\" on Information Processing Systems.
.\"
.\" Redistribution and use in source and b... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.