text
stringlengths
100
9.93M
category
stringclasses
11 values
from Crypto.Util.number import * class Key: def __init__(self, bits): assert bits >= 512 self.p = getPrime(bits) self.q = getPrime(bits) self.n = self.p * self.q self.e = 0x100007 self.d = inverse(self.e, (self.p-1)*(self.q-1)) self.dmp1 = self.d%(self.p-1) ...
sec-knowleage
# Toppo 1 > https://download.vulnhub.com/toppo/Toppo.zip 靶场IP:`192.168.32.15` 扫描对外端口服务 ``` ┌──(root㉿kali)-[~] └─# nmap -sV -p1-65535 192.168.32.15 Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-08 22:53 EDT Nmap scan report for 192.168.32.15 Host is up (0.00013s latency). Not shown: 65531 closed tcp ports (reset) ...
sec-knowleage
# Windows 域搭建 --- ## 域结构 创建域首先要创建 DC,DC 创建完成后,把所有的客户端加入到 DC,这样就形成了域环境。 DC 域控制器是由工作组计算机升级而成,通过 dcpromo 命令就可以完成升级。只有 Windows Server(WEB 版本除外)才可以提升为域控制器。在升级 DC 之前不需要安装 DNS 服务,域控制器上必须要有 NTFS 文件系统的分区。 --- ## 安装域控 这里域为 ffffffff0x.com ### Windows Server 2008 R2 安装域控 首先,域控制器需要固定的 ip 地址以及 DNS 服务器为自己 WIN+R ,打开运行框,输入 : dcpromo 一路...
sec-knowleage
# 0x00 简介 insert,delete,update 主要是用到盲注和报错注入,此类注入点不建议使用sqlmap等工具,会造成大量垃圾数据,和其他情况。 # 0x01 insert,delete,update #### insert 可以看到假如没闭合是会产生很多垃圾数据的,所以这类注入建议手工或者自己写工具。 一般这种注入会出现在 注册、ip头、留言板等等需要写入数据的地方,同时这种注入不报错一般较难发现。 1. 报错 ``` mysql> insert into admin (id,username,password) values (2,"or updatexml(1,concat(0x7e,(version())),...
sec-knowleage
## sqlmap参数详解: 由于Sqlmap 是常用工具之一,所以本篇的篇幅较长,详解一次所有参数。 ### 1、Options(选项) ```bash Usage: python sqlmap.py [options] Options(选项): -h, --help Show basic help message and exit ## 展示帮助文档 参数 -hh Show advanced help message and exit ## 展示详细帮助文档参数 --version Show program's version number and exit ## 显示程序的版本号 -v VERBOSE Verbosit...
sec-knowleage
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29. .TH TEXI2DVI "1" "June 2003" "texi2dvi 1.23" "User Commands" .SH NAME texi2dvi \- 打印 Texinfo 文档 .SH "SYNOPSIS 总览" .B texi2dvi [\fIOPTION\fR]... \fIFILE\fR... .SH "DESCRIPTION 描述" 依次从 Tex 系统中运行每个 Texinfo 或者 LaTex 文件 FILE,直到解决了所有的交叉引用,建立所有的索引。每个包含 FILE 的目录都...
sec-knowleage
# Symbol Reslove ## 基本原理 链接器在处理目标文件时,需要对目标文件中的某些位置进行重定位,即将符号指向恰当的位置,确保程序正常执行。例如,当程序调用了一个函数时,相关的调用指令必须把控制流交给适当的目标执行地址。 在 ELF 文件中,对于每一个需要重定位的 ELF 节都有对应的重定位表,比如说 .text 节如果需要重定位,那么其对应的重定位表为 .rel.text。 举个例子,当一个程序导入某个函数时,.dynstr 就会包含对应函数名称的字符串,.dynsym 中就会包含一个具有相应名称的符号(Elf_Sym),在 .rel.plt 中就会包含一个指向这个符号的的重定位表项。即,这几者之间的引用关系是 总的...
sec-knowleage
.TH LOCKFILE 1 .SH NAME(名称) lockfile \- 条件标志文件创建命令 .SH SYNOPSIS(总览) .B lockfile .I "\fB\-\fPsleeptime" | .I "\fB\-r \fPretries" | .if n .ti +0.5i .I "\fB\-l \fPlocktimeout" | .I "\fB\-s \fPsuspend" | .B "\-!" | .B "\-ml" | .B "\-mu" | .I filename \&.\|.\|. .SH DESCRIPTION(描述) .B lockfile可以用来创建一个或多个 .I 信号量(semaphore) .I...
sec-knowleage
# T1587-004-开发能力-漏洞利用 ## 来自ATT&CK的描述 攻击者可能会开发可在攻击目标期间使用的漏洞。利用了一个错误或漏洞,以使计算机硬件或软件发生非预期或意料之外的行为。与其从网上寻找,修改漏洞或从漏洞供应商那里购买漏洞,攻击者可能会自行挖掘漏洞。作为漏洞利用开发过程的一部分,攻击者可能会通过模糊测试和补丁分析等方法发现可利用的漏洞。 与合法的开发工作一样,开发漏洞可能需要不同的技能。所需的技能可能位于内部,也可能需要外包。使用承包商可以被认为是该攻击者开发能力的扩展,只要攻击者在制定要求方面发挥作用,并保持对漏洞的独有性。 攻击者可能会在攻击生命周期的各个阶段使用漏洞利用(即利用面向公众的应用程序、利用客户端执行...
sec-knowleage
# Bwv2342 (reverse, 499p, 4 solved) In the challenge we get a [binary](bwv2342) which was obfuscated by movfuscator. We also get a netcat address for the server running the binary. We tried using some de-movfuscators but to no avail. Therefore we decided to try blackbox approach. Using `ltrace` and `strace` we could se...
sec-knowleage
### CWEID:CWE-5 J2EE Misconfiguration: Data Transmission Without Encryption title_zh:J2EE误配置:未经加密的数据传输 Information sent over a network can be compromised while in transit. An attacker may be able to read or modify the contents if the data are sent in plaintext or are weakly encrypted. ### CWEID:CWE-14 Compiler Removal ...
sec-knowleage
'\" '\" Copyright (c) 1993 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. '\" '\" '\" The definitions below are for supplemental m...
sec-knowleage
gcc === 基于C/C++的编译器 ## 补充说明 **gcc命令** 使用GNU推出的基于 `C/C++` 的编译器,是开放源代码领域应用最广泛的编译器,具有功能强大,编译代码支持性能优化等特点。现在很多程序员都应用 `GCC`,怎样才能更好的应用 `GCC`。目前,`GCC` 可以用来编译 `C/C++`、`FORTRAN`、`JAVA`、`OBJC`、`ADA`等语言的程序,可根据需要选择安装支持的语言。 ### 语法 ```shell gcc(选项)(参数) ``` ### 选项 ```shell -o:指定生成的输出文件; -E:仅执行编译预处理; -S:将C代码转换为汇编代码; -wall:显示警告信息; -c:...
sec-knowleage
### ABPTTS简介: ABPTTS是NCC Group在2016年blackhat推出的一款将TCP流量通过HTTP/HTTPS进行流量转发,在目前云主机的大环境中,发挥了比较重要的作用,可以通过脚本进行RDP,SSH,Meterpreter的交互与连接。也意味着这样可以建立一个通过80端口得流量出站来逃避防火墙。与其它http隧道不同的是,abptts是全加密。 2016年blackhat介绍: https://www.blackhat.com/us-16/arsenal.html#a-black-path-toward-the-sun Github: https://github.com/nccgroup/ABPT...
sec-knowleage
# CVE-2022-22978: Spring Security Authorization Bypass in RegexRequestMatcher In Spring Security versions 5.5.6 and 5.6.3 and older unsupported versions, RegexRequestMatcher can easily be misconfigured to be bypassed on some servlet containers. Applications using RegexRequestMatcher with `.` in the regular expression...
sec-knowleage
version: '2' services: web: image: vulhub/thinkphp:5.0.9 depends_on: - mysql ports: - "80:80" volumes: - ./www/controller:/var/www/application/index/controller - ./www/model:/var/www/application/index/model - ./www/database.php:/var/www/application/database.php mysql: image: mysql:5...
sec-knowleage
# MSSQL Injection ## Summary * [MSSQL Default Databases](#mssql-default-databases) * [MSSQL Comments](#mssql-comments) * [MSSQL User](#mssql-user) * [MSSQL Version](#mssql-version) * [MSSQL Hostname](#mssql-hostname) * [MSSQL Database Name](#mssql-database-name) * [MSSQL Database Credentials](#mssql-database-credential...
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 EXPR 1 2022年9月 "GNU coreutils 9.1...
sec-knowleage
### 获取地址方式概述 在漏洞利用的过程中,我们常常需要获取一些变量,函数的地址,以便于能够进行进一步的利用。这里我将获取地址的方法分为如下几类 - 直接寻找地址,即我们可以通过反编译等手段直接看到对应符号的地址。 - 泄漏地址,即需要我们通过控制程序的执行流来泄漏程序中的某些符号指针的内容,来获取对应的地址。 - 推测地址,这里我们一般常用的就是根据某个段内的符号之间的偏移是固定的,从而来推断一些新的符号的地址。 - 猜测地址,一般主要指的是,我们需要自己去猜测对应符号的地址,这里伴随的往往就是暴力枚举了。 上述几种方法,是一种递进地考虑方式,我们在获取相关符号的地址时,应保持这样的思考方式。 在上面的几种方式中,我认为主要有两...
sec-knowleage
## 0x00 FastCGI 是什么 FastCGI模式是CGI模式的优化升级版,主要解决了CGI模式性能不佳的问题。 FastCGI其实是一个协议,是在CGI协议上进行了一些优化。众所周知,CGI进程的反复加载是CGI性能低下的主要原因,如果CGI解释器能够保持在内存中并接受FastCGI进程管理器调度,则可以提供良好的性能、伸缩性、Fail-Over特性等等,而这些改进正是FastCGI所提供的。 ## 0x01 FastCGI 的数据结构 ### FastCGI record 类比HTTP协议来说,fastcgi协议则是http服务和某个语言后端进行数据交换的协议。Fastcgi协议由多个record组成,record包括h...
sec-knowleage
# Crypto > 文章作者 [RyuZU](https://github.com/RyuZUSUNC) & [r0fus0d](https://github.com/No-Github) > 注 : 笔记中拓扑图 drawio 源文件在其图片目录下 --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- ## 大纲 * **常见编码** * [ASCII](#ascii) * [Base](#base) * [Base64](#base64) * [Base16](#base16) ...
sec-knowleage
firewall-cmd === Linux上新用的防火墙软件,跟iptables差不多的工具 ## 补充说明 firewall-cmd 是 firewalld的字符界面管理工具,firewalld是centos7的一大特性,最大的好处有两个:支持动态更新,不用重启服务;第二个就是加入了防火墙的“zone”概念。 firewalld跟iptables比起来至少有两大好处: 1. firewalld可以动态修改单条规则,而不需要像iptables那样,在修改了规则后必须得全部刷新才可以生效。 2. firewalld在使用上要比iptables人性化很多,即使不明白“五张表五条链”而且对TCP/IP协议也不理解也可以实现大部分功能。 ...
sec-knowleage
--- title: let --- ## Let 语句 **let**(声明变量)声明一个块级作用域的本地变量,并且可选的将其初始化为一个值。 let允许你声明一个作用域被限制在块级中的变量、语句或者表达式。与var关键字不同的是,var声明的变量只能是全局或者整个函数块的。 ### 块级作用域 let实际上为 JavaScript 新增了块级作用域。 (let被限制在大括号里{}) ``` function f1() { let n = 5; if (true) { let n = 10; } console.log(n); // 5 } ``` let声明的变量只在它所在的代码块有效 ```es6 { ...
sec-knowleage
# Constellation (misc, 200p) In the task we get a [pcap](traffic.pcap) and some [python code](proc.py). In the traffic dump we can notice that ICMP packets carry some data which look like points coordinates so we dump [them](points.txt). The python code performs some clustering of the points and draws a chart. But the ...
sec-knowleage
import string code = open("priner.tb").read().strip().split(" ") pointer = 0 memory = [0, 0, 0] alphabet = " " + string.uppercase res = "" for instruction in code: print memory, "Pointer:", pointer print "Executing:", instruction if instruction == "%%": pointer = 0 elif instruction == "#%": ...
sec-knowleage
s7 = [int(c, 16) for c in open("s7").read().split()] s17 = [int(c, 16) for c in open("s17").read().split()] s17 = s17[1::2] inverse = [0] * 256 for i, j in enumerate(s17): inverse[j] = i print(s7) print(s17) print(inverse) for potential_sum in range(256*len(s7)): flag = [] for ch in s7: for i in ...
sec-knowleage
# 变量覆盖 --- **相关文章 & Source & Reference** - https://www.mi1k7ea.com/2019/06/20/PHP%E5%8F%98%E9%87%8F%E8%A6%86%E7%9B%96%E6%BC%8F%E6%B4%9E/ - https://www.jianshu.com/p/a4d782e91852 --- ## $$导致的变量覆盖问题 **$$介绍** $$这种写法称为可变变量 一个可变变量获取了一个普通变量的值作为这个可变变量的变量名。 ```php <?php $a = "hello"; echo "$a"; //输出hello $a="world"; e...
sec-knowleage
# Writeup 3DS CTF 2016 Team: msm, nazywam, c7f.m0d3, akrasuski, rev, psrok, shalom ### Table of contents * [rot13 (crypto 100)](crypto_100_rot13) * [merces (re 100)](re_100_merces) * [get started (pwn 100)](pwn_100_get_started) * [unbreakable (crypto 200)](crypto_200_unbreakable) * [what the hex (forensics 300)](for_30...
sec-knowleage
# Kali <p align="center"> <img src="../../../assets/img/logo/kali.png" width="30%"> </p> --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- **官网** - https://www.kali.org/downloads/ **教程 & Reference** - [Kali-learning-notes Wiki](https://github.com/Keybird0/Kali-learning-notes/wiki) - [Kali Linux 渗...
sec-knowleage
# Redis in the wild * Category: OSINT * 300 Points * Solved by the JCTF Team ## Description > In order to evaluate your OSINT skills, we hid a server on the internet! > > All we share is the following things: > > Our server is located in Frankfurt and belongs to DigitalOcean. > Our server has been indexed in ...
sec-knowleage
# epic mount Forensics ## Description: > A little bit of stego. Not every header field looks like the other. A binary file was attached. ## Solution: Let's inspect the binary: ```console root@kali:/media/sf_CTFs/35c3ctf/epic_mount# file f9be7cb88a778615216f212d58f62ea3-epic-fs.bin f9be7cb88a778615216f212d58f62ea3-epic-...
sec-knowleage
# servlet-2 --- ## 表单数据 当你需要从浏览器到 Web 服务器传递一些信息并最终传回到后台程序时,你一定遇到了许多情况。浏览器使用两种方法向 Web 服务器传递信息。这些方法是 GET 方法和 POST 方法。 **GET 方法** GET 方法向页面请求发送已编码的用户信息。页面和已编码的信息用 ? 字符分隔,如下所示: - http://www.test.com/hello?key1=value1&key2=value2 GET 方法是从浏览器向 web 服务器传递信息的默认的方法,且它会在你的浏览器的地址栏中产生一个很长的字符串。如果你向服务器传递密码或其他敏感信息,请不要使用 GET 方法。GET 方法有...
sec-knowleage
# Array List (Pwn, 350p) The task is similar to https://github.com/p4-team/ctf/tree/master/2018-01-20-insomnihack/pwn_magic_hat and a bit to https://github.com/p4-team/ctf/tree/master/2016-08-21-bioterra-ctf/akashic_records In short: we have a Java RMI server running, and we need to craft a deserialization chain to exp...
sec-knowleage
'\" '\" Copyright (c) 1990-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: tkvars.n,v 1.2 2003/11/24 05:...
sec-knowleage
# 相关文章 [1] 卢明樊:爱奇艺的业务安全风控“秘籍”, https://www.freebuf.com/articles/people/233378.html \[2] 情报驱动的安全自动化, [叶伟](https://home.cnblogs.com/u/pmyewei/), https://www.cnblogs.com/pmyewei/archive/2004/01/13/12250897.html \[3] 平安集团企业信息安全实践,[安全建设](https://www.secrss.com/articles?tag=%E5%AE%89%E5%85%A8%E5%BB%BA%E8%AE%BE),https://www.s...
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
# IDOR `整个部分结构大部分基于乌云的几篇密码找回、逻辑漏洞类文章,在其基础上记录和归纳` --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- ## 大纲 * [认证绕过](#认证绕过) * [未授权访问](#未授权访问) * [身份认证绕过](#身份认证绕过) * [密码重置](#密码重置) * [验证码突破](#验证码突破) * [Ticket_Trick](#ticket_trick) * [授权绕过](#授权绕过) * [越权测试](#越权测试) * [执行顺序绕过](#执行顺序...
sec-knowleage
### House of Roman原理以及展示 作者提供给了我们一个 demo 用于展示,整个利用过程大概可以分为三步骤。 1. 将 FD 指向 malloc_hook 2. 修正 0x71 的 Freelist 3. 往 malloc_hook 写入 one gadget 先对 demo 进行一个大致的分析: 开启的保护情况: ```bash [*] '/media/psf/Home/Desktop/MyCTF/House-Of-Roman/new_chall' Arch: amd64-64-little RELRO: Partial RELRO Stack: No canary fo...
sec-knowleage
# Linux - Privilege Escalation ## Summary * [Tools](#tools) * [Checklist](#checklists) * [Looting for passwords](#looting-for-passwords) * [Files containing passwords](#files-containing-passwords) * [Old passwords in /etc/security/opasswd](#old-passwords-in-etcsecurityopasswd) * [Last edited files](#last-ed...
sec-knowleage
# Misc ## __ro_after_init ### 介绍 Linux 内核中有很多数据都只会在 `__init` 阶段被初始化,而且之后不会被改变。使用 `__ro_after_init` 标记的内存,在 init 阶段结束后,不能够被再次修改。 ### 攻击 我们可以使用 `set_memory_rw(unsigned long addr, int numpages)` 来修改对应页的权限。 ## mmap_min_addr mmap_min_addr 是用来对抗 NULL Pointer Dereference 的,指定用户进程通过 mmap 可以使用的最低的虚拟内存地址。 ## 参考 - https://lwn.net...
sec-knowleage
# Random (crypto, 100p) We were given this simple C++ code: ```cpp #include <fstream> #include <iomanip> #include <iostream> #include <random> #include <string> using std::cin; using std::cout; using std::endl; using std::ifstream; using std::string; [[noreturn]] void fatal_error(const string& msg) { cout << ms...
sec-knowleage
# Misc 04 (misc, 140p, 36 solved) In the task we get access to an application: ``` Wellcom to Friendly face challenge According to experts, the formula for measuring the friendliness of a face is (lip point**nose point)**(eyes point**forehead point) mod Face_index No...
sec-knowleage
#include <stdio.h> #include <stdlib.h> #include <windows.h> #include "zygote.h" void __RPC_FAR * __RPC_USER midl_user_allocate(size_t size) { return malloc(size); } void __RPC_API midl_user_free(void __RPC_FAR * memory) { free(memory); } void __wine_rtl_unwind() { printf("__wine_rtl_unwind()\n"); ...
sec-knowleage
pfctl === PF防火墙的配置命令 ## 补充说明 **pfctl命令** 是PF防火墙的配置命令,PF防火墙( 全称:Packet Filter )是UNIX LIKE系统上进行TCP/ip流量过滤和网络地址转换的软件系统。PF同样也能提供TCP/IP流量的整形和控制,并且提供带宽控制和数据包优先集控制。PF最早是由Daniel Hartmeier开发的,现在的开发和维护由Daniel和openBSD小组的其他成员负责。 PF防火墙的功能很多,本站只列举一些基本配置。 ### 激活 要激活pf并且使它在启动时调用配置文件,编辑`/etc/rc.conf`文件,修改配置pf的一行: ```shell pf=yes ``` 重启...
sec-knowleage
# Indiana Jones and the Coded Cave Category: Miscellaneous ## Description > Indiana Jones is conducting his postdoctoral research at the Technion Institute. > > Yesterday, on his way back home he bumped into a strange person who had given him a Disk On Key. > > This person said to him - "The treasure is in the cave"...
sec-knowleage
# Unknown - Master Office Category: Reversing ## Description > You press a button and enter through a tinted glass door. There is a vast oil painting on the wall that depicts a bold man with a scar under his left eye, under his arms rests a white chubby cat. Below the painting is the very same man, and he’s addressing ...
sec-knowleage
# Vigenere 3d (Crypto, 100p) In the task we get the code: ```python import sys def _l(idx, s): return s[idx:] + s[:idx] def main(p, k1, k2): s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz_{}" t = [[_l((i+j) % len(s), s) for j in range(len(s))] for i in range(len(s))] i1 = 0 i2 =...
sec-knowleage
# Short Address Attack ## 原理 短地址攻击,利用 EVM 在参数长度不够时自动在右方补 0 的特性,通过去除钱包地址末位的 0,达到将转账金额左移放大的效果。 ## 例子 ```solidity pragma solidity ^0.4.10; contract Coin { address owner; mapping (address => uint256) public balances; modifier OwnerOnly() { require(msg.sender == owner); _; } function ICoin() { owner = msg.se...
sec-knowleage
# 反攻的一次溯源 -- 项目实战3 ## 事件过程 某厂商通过日志分析发现可疑 IP,但是日志记录里显示该 IP 的行为是频繁地登陆内网,并无发现有攻击的迹象,因此无法下手进行内网安全的加固和清除后门。而且显示的是外国 IP,无法确定是真实 IP 还是代理 IP,因此无法定位攻击者的地理位置。 **思路:** 反入侵得到攻击者机器权限 -> 入侵现场还原,摸清入侵思路 -> 并且须知入侵者的相关后门遗留,以便处理后门 -> 抓取入侵者的真实IP获得地理位置 -> 并按照攻击者的攻击路线加固相关漏洞安全。 ### 一、日志分析 1. 某厂商日志:该IP 为韩国,login 状态全部为success ![](med...
sec-knowleage
xinit === 是Linux下X-Window系统的初始化程序 ## 补充说明 **xinit命令** 是Linux下X-Window系统的初始化程序,主要完成X服务器的初始化设置。 ### 语法 ```shell xinit(参数) ``` ### 参数 * 客户端选项:客户端指令及选项; * --:用于区分客户端选项和服务器端选项; * 服务器端选项:服务器端选项指令及选项。
sec-knowleage
# T1218-003-win-基于白名单Cmstp.exe执行Payload ## 来自ATT&CK的描述 微软的命令行程序CMSTP.exe用于安装连接管理器服务配置文件。CMSTP.exe将收到的安装信息文件(INF)作为参数,安装用于远程访问连接的服务配置文件。 攻击者可能会向CMSTP.exe提供带恶意命令的INF文件。与Regsvr32/"Squiblydoo"类似,CMSTP.exe可能被滥用来从远程服务器加载和执行动态链接库和/或COM脚本小程序。攻击者还可能用CMSTP.exe来绕过AppLocker及其他白名单防御,因为CMSTP.exe本身是一个合法的、已签名的微软应用。 CMSTP.exe也可能被滥用来绕过用...
sec-knowleage
# Warm Up Crypto, 50 points ## Description: > Everyone says that PGP is hard to use. Show ‘em how it’s done. ## Solution: The following files were provided: ```console # ls flag.html.enc key.enc mitre-ctf-2019-private.asc passphrase.txt root@kali:/media/sf_CTFs/mitre/warmup# cat passphrase.txt just use ctfd ``` The d...
sec-knowleage
# DNSChef包描述 DNSChef旨在为渗透测试人员和恶意软件分析师提供一个高度可配置的DNS代理。DNS代理(也称为“Fake DNS”)是用于应用程序 网络流量分析以及其他用途的工具。例如,DNS代理可以用于伪造对“badguy.com”的请求使其指向本地机器来终止或拦截,而不是指向Internet上的某个真实主机。 现有的一些DNS代理,大多只是简单地将所有DNS查询指向单个IP地址或仅实施初步过滤。DNSChef是作为渗透测试的一部分而开发的,这需要配置更灵活的系统。 因此,DNSChef是跨平台应用程序,基于广泛和专用域名列表,能够支持多个DNS记录类型,匹配域与通配符,代理不匹配域的真实响应,定义外部配置文件, I...
sec-knowleage
## smartcat0 (web) ###ENG [PL](#pl-version) We get a webpage where we can input an IP address and the page will ping it and show us the results. The task was very similar to the one from teaser (https://github.com/p4-team/ctf/tree/master/2016-01-16-insomnihack/web_100_smartcat#eng-version), but this time `;` was not bl...
sec-knowleage
.TH SETLEDS 1 "09 Oct 1997" "Console tools" "Linux User's Manual" .SH NAME setleds \- 设置键盘 led 标志 .SH "总览 (SYNOPSIS)" .B setleds .BI [ "-v" "] [" "-L" "] [" "-D" "] [" "-F" ] .BI [ {+|-}num "] [" {+|-}caps "] [" {+|-}scroll ] .SH "描述 (DESCRIPTION)" .PP .B setleds 显示 改变 当前 虚拟终端 的 led 标志 (就是 NumLock, CapsLock 和 ScrollLoc...
sec-knowleage
ip6tables-save === 保存ip6tables表配置 ## 补充说明 **ip6tables-save命令** 将Linux内核中ip6tables表导出到标准输出设备上。 ### 语法 ```shell ip6tables-save(选项) ``` ### 选项 ```shell -c:指定在保存iptables表时,保存当前的数据包计数器和字节计数器值; -t:指定要保存的表的名称。 ```
sec-knowleage
'\" '\" Copyright (c) 1992 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: tkwait.n,v 1.2 2003/11/24 05:10:00...
sec-knowleage
# Level15 #### About strace the binary at /home/flag15/flag15 and see if you spot anything out of the ordinary. You may wish to review how to “compile a shared library in linux” and how the libraries are loaded and processed by reviewing the dlopen manpage in depth. Clean up after yourself :) To do this level, log in...
sec-knowleage
logrotate === 系统日志进行轮转、压缩和删除 ## 补充说明 **logrotate命令** 用于对系统日志进行轮转、压缩和删除,也可以将日志发送到指定邮箱。使用logrotate指令,可让你轻松管理系统所产生的记录文件。每个记录文件都可被设置成每日,每周或每月处理,也能在文件太大时立即处理。您必须自行编辑,指定配置文件,预设的配置文件存放在`/etc/logrotate.conf`文件中。 ### 语法 ```shell logrotate(选项)(参数) ``` ### 选项 ```shell -?或--help:在线帮助; -d或--debug:详细显示指令执行过程,便于排错或了解程序执行的情况; -f或--f...
sec-knowleage
# digitalworld.local: DEVELOPMENT > https://download.vulnhub.com/digitalworld/devt-improved.7z 靶场IP:`192.168.32.200` 扫描对外端口 ``` ┌──(root💀kali)-[/tmp] └─# nmap -p 1-65535 -sV 192.168.32.200 ...
sec-knowleage
# 基于Rapid7数据集的安全分析实战 ## 目标概要 - 数据搭建: - 基于Rapid7数据集,搭建一套安全数据系统 - 安全分析: - 使用该数据集进行具体场景下的安全分析,主要关注于: - 从FDNS数据中挖掘恶意域名 - 从RDNS中挖掘动态IP - 数据评估: - 对恶意域名进行手动验证,并输入到MISP中进行情报关联 - 对动态IP,使用IPinfo查询画像数据 ## 数据系统搭建 数据系统搭建需要考虑到数据总量、并发量、数据实时性等。由于不是工程化项目,一切从简,数据系统搭建主要是为了后面更高效率的分析。 考虑到R...
sec-knowleage
<p align="center"> <a href="https://github.com/trimstray/the-book-of-secret-knowledge"> <img src="https://github.com/trimstray/the-book-of-secret-knowledge/blob/master/static/img/the-book-of-secret-knowledge-preview.png" alt="Master"> </a> </p> <p align="center">"<i>Knowledge is powerful, be careful how you use...
sec-knowleage
# Leetcode 题解 - 哈希表 <!-- GFM-TOC --> * [Leetcode 题解 - 哈希表](#leetcode-题解---哈希表) * [1. 数组中两个数的和为给定值](#1-数组中两个数的和为给定值) * [2. 判断数组是否含有重复元素](#2-判断数组是否含有重复元素) * [3. 最长和谐序列](#3-最长和谐序列) * [4. 最长连续序列](#4-最长连续序列) <!-- GFM-TOC --> 哈希表使用 O(N) 空间复杂度存储数据,并且以 O(1) 时间复杂度求解问题。 - Java 中的 **HashSet** 用于存储一个集合,可以查找元素是否...
sec-knowleage
# Fedora shop (Web) We get access to a online shop with fedoras (every hacker should wear one!): ![](page.png) Once we add some stuff to the cart, we can submit the order and there we can see that the order initially has status `Pending approval` and after a a short while it gets changed to `Shipped`. It seems like a t...
sec-knowleage
# Fastbin Attack ## 介绍 fastbin attack 是一类漏洞的利用方法,是指所有基于 fastbin 机制的漏洞利用方法。这类利用的前提是: * 存在堆溢出、use-after-free 等能控制 chunk 内容的漏洞 * 漏洞发生于 fastbin 类型的 chunk 中 如果细分的话,可以做如下的分类: - Fastbin Double Free - House of Spirit - Alloc to Stack - Arbitrary Alloc 其中,前两种主要漏洞侧重于利用 `free` 函数释放**真的 chunk 或伪造的 chunk**,然后再次申请 chunk 进行攻击,后两种侧重于故...
sec-knowleage
import ebcdic import sys data = open("data.txt", "r").read().split() for i in range(0,len(data),2): a = ((int(data[i],2) >> 1) << 4) + (int(data[i+1],2) >> 1) sys.stdout.write(chr(a).decode("cp500"))
sec-knowleage
# Raven 2 > https://download.vulnhub.com/raven/Raven2.ova 靶场IP:`192.168.32.208` 扫描对外端口服务 ``` ┌──(root💀kali)-[/tmp] └─# nmap -p 1-65535 -sV 192.168.32.208 ...
sec-knowleage
# Postbook - FLAG0 ## 0x00 Index ![](./imgs/index.jpg) ## 0x01 Log In Try weak password ``` username: user password: password ``` ![](./imgs/login.jpg) ## 0x02 FLAG ![](./imgs/flag.jpg)
sec-knowleage
# T1218-010-win-基于白名单Regsvr32执行payload ## 来自ATT&CK的描述 命令行程序Regsvr32.exe用于在Windows系统上注册和注销对象链接及嵌入控件,包括动态链接库(DLL)。Regsvr32.exe可用于执行任意二进制文件。 攻击者可能会利用此功能代理执行代码,从而避免触发那些可能不会监控regsvr32.exe进程执行及其加载模块的安全工具,因为正常操作中使用regsvr32.exe的Windows会有白名单或误报。Regsvr32.exe也是微软签名的二进制文件。 Regsvr32.exe还可用于专门绕过进程白名单,方法是加载COM脚本小程序在用户权限下执行动态链接库。由于reg...
sec-knowleage
# 权限维持 --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- ## 大纲 * **[web](#web)** * [webshell](#webshell) * webshell 管理工具 * webshell 爆破 * 无字母数字 webshell * 无文件 webshell * [中间件](#中间件) * **[win](#win)** * [后门用户](#后门用户) * [MSF权限维持](#MSF权限维持) * [权限维持技巧](#...
sec-knowleage
# Writeup ASIS CTF Finals 2016 Team: akrasuski, c7f.m0d3, cr019283, ppr, nazywam, rev, msm, shalom ![](./asis_scoreboard.png) ![](./asis_scoreboard_2.png) ### Table of contents * [Secu Prim (PPC)](secu_prim) * [RSA (Crypto)](rsa) * [DAM (Crypto)](dam) * [Races (Crypto)](races) * [SRPP (Crypto)](srpp) * [P1ng (Forensics...
sec-knowleage
# .symtab: Symbol Table ## 概述 每个目标文件都会有一个符号表,熟悉编译原理的就会知道,在编译程序时,必须有相应的结构来管理程序中的符号以便于对函数和变量进行重定位。 此外,链接本质就是把多个不同的目标文件相互“粘”在一起。实际上,目标文件相互粘合是目标文件之间对地址的引用,即函数和变量的地址的相互引用。而在粘合的过程中,符号就是其中的粘合剂。 目标文件中的符号表包含了**一些通用的符号**,这部分信息在进行了 `strip` 操作后就会消失。这些符号信息可能包括变量名、函数名。 符号表可以被视为一个数组,数组中的每一个元素都是一个结构体,具体如下 ```c typedef struct { Elf...
sec-knowleage
# HAProxy Common Bugs ## Introduction What would you do if you came across a website that uses HAProxy? ## How to Detect `-` 1. CVE-2021-40346 (HTTP Request Smuggling) ``` POST /index.html HTTP/1.1 Host: abc.com Content-Length0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
sec-knowleage
arptables === 管理ARP包过滤规则表 ## 补充说明 **arptables命令** 用来设置、维护和检查Linux内核中的arp包过滤规则表。 ### 语法 ```shell arptables(选项) ``` ### 选项 ```shell -A:向规则链中追加规则; -D:从指定的链中删除规则; -l:向规则链中插入一条新的规则; -R:替换指定规则; -P:设置规则链的默认策略; -F:刷新指定规则链,将其中的所有规则链删除,但是不改变规则链的默认策略; -Z:将规则链计数器清零; -L:显示规则链中的规则列表; -X:删除指定的空用户自定义规则链; -h:显示指令帮助信息; -j:指定满足规则的添加时的目...
sec-knowleage
lvscan === 扫描逻辑卷 ## 补充说明 **lvscan命令** 用于扫描当前系统中存在的所有的LVM逻辑卷。使用lvscan指令可以发现系统中的所有逻辑卷,及其对应的设备文件。 ### 语法 ```shell lvscan(选项) ``` ### 选项 ```shell -b:显示逻辑卷的主设备和次设备号。 ``` ### 实例 使用lvscan命令扫描系统中的所有逻辑卷。在命令行中输入下面的命令: ```shell [root@localhost ~]# lvscan #扫描所有的逻辑卷 ``` 输出信息如下: ```shell ACTIVE '/dev/vg1000/lvol0' [2...
sec-knowleage
CSysSec注: 本文来自Diting0x的个人博客,分析了Linux下不同类型的rootkit、相关原理以及源码分析,值得推荐。 转载本文请务必注明,文章出处:《[Rootkit综合教程](http://www.csyssec.org/20170102/rootkittutorial/)》与作者信息:Diting0x ## 0x01 Definition of rootkit The term rootkit originates from the composition of the individual terms root, referring to the highest privilege of access ...
sec-knowleage
**Authors**: < [nixawk](https://github.com/nixawk) > ---- # Ports |**Port Number**|**Protocol**|**Service & Application**|**Commands**| |:--------------|:-----------|:------------------------|:-----------| |1|tcp|blackice|| |7|tcp|echo|| |11|tcp|systat|| |13|tcp|daytime|| |15|tcp|netstat|| |17|tcp|quote of the day|| |1...
sec-knowleage
.\" auto-generated by docbook2man-spec $Revision: 1.1 $ .TH "CREATE INDEX" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands" .SH NAME CREATE INDEX \- 定义一个新索引 .SH SYNOPSIS .sp .nf CREATE [ UNIQUE ] INDEX \fIname\fR ON \fItable\fR [ USING \fImethod\fR ] ( { \fIcolumn\fR | ( \fIexpression\fR ) } [ \fIopclass...
sec-knowleage
# Google CTF - Registers Matter (347pt / 12 solves) We have an unknown remotely accessible board that hides the flag. Try to debug it to steal the flag! Files: - debugger.zip ## 1. Investigating the `debugger.py` We quickly realised that `debugger.py` was a helpful client, allowing to interact with the server via simpl...
sec-knowleage
version: '2' services: rocketchat: image: vulhub/rocketchat:3.12.1 command: > bash -c "for i in `seq 1 30`; do node main.js && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 secs...\"; sleep 5; done; (exit $$s)" restart: unless-stop...
sec-knowleage
##Web 100 (web, 100p) ###PL [ENG](#eng-version) W zadaniu dostajemy prostą stronę wyświetlającą ilość pieniędzy na koncie oraz okienko do aktywacji kodów. Zostaje nam udostępniony jednorazowy kod doładowujący 10$. Po użyciu kodu dostajemy komunikat, że ciągle mamy za mało pieniędzy, zatem musimy znaleźć jakiś sposób na...
sec-knowleage
--- title: Terraform 介绍与安装 --- <center><h1>Terraform 介绍与安装</h1></center> --- ## 介绍 Terraform 是一种安全有效地构建、更改和版本控制基础设施的工具(基础架构自动化的编排工具)。 简单的说就是可以通过编写一些类似于 JSON 格式的文件,直接创建一批云上的服务资源,Terraform 和 AWS 的 CloudFormation 产品有些类似,但 CloudFormation 只支持 AWS,于是 HashiCorp 公司打造了一个多云 (Multi Cloud) 的开源的基础设施即代码 (IaC) 工具,即 Terraform ## 安装 T...
sec-knowleage
# frp --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- **简介** frp 是一个专注于内网穿透的高性能的反向代理应用,支持 TCP、UDP、HTTP、HTTPS 等多种协议。可以将内网服务以安全、便捷的方式通过具有公网 IP 节点的中转暴露到公网。 **项目地址** - https://github.com/fatedier/frp --- ## 安装 linux 配置方式见如下链接🔗 - [frp安装配置](../../../../Integrated/Linux/Power-Linux.md#frp) --- ## 配置案例 - ...
sec-knowleage
## Android Webview远程代码执行漏洞 > 砸漏发布于2020-11-05 ### 漏洞描述 Webview是Android用于浏览网页的组件,其包含的接口函数addJavascriptInterface可以将Java类或方法导出以供JavaScript调用,实现网页JS与本地JAVA的交互。由于系统没有限制已注册JAVA类的方法调用,因此未注册的其它任何JAVA类也可以被反射机制调用,这样可能导致被篡改的URL中存在的恶意代码被执行,用户手机被安装木马程序,发送扣费短信,通信录或者短信被窃取,甚至手机被远程控制。 ### 影响范围 Android API level 小于17 (即Android 4.2之前的系统版本...
sec-knowleage
# 0x00 延时过狗 盲注过狗相对联合注入来说,感觉上是更简单,我们先来试试时间盲注把,比布尔稍稍灵活一点 ``` if(1,1,1) 不拦截 a if(1,1,1) 不拦截 and if(1,1,1) 拦截 | if(1,1,1) 不拦截 || if(1,1,1) 拦截 && if(1,1,1) 拦截 /*!and*/ if(1,1,1) 拦截 /*!11440and*/ if(1,1,1) 不拦截 andaif(1,1,1) 不拦截 ``` 通过上面的测试我们其实可以很简单的看出来 他是拦截的 xx if 这个语句,其中xx 为and 和 or 这2个词有点敏感,但是绕过还是可以的 通过上一章的测试语句 发现版...
sec-knowleage
## 6. 原型模式(Prototype) ### Intent 使用原型实例指定要创建对象的类型,通过复制这个原型来创建新对象。 ### Class Diagram <div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/b8922f8c-95e6-4187-be85-572a509afb71.png"/> </div><br> ### Implementation ```java public abstract class Prototype { abstract Prototype myClone(...
sec-knowleage
--- title: 列出对象存储服务 --- ::: warning 注意 * 为了提高程序运行速度,当获取一次结果后,获取的结果会缓存下来,缓存文件为 `~/.config/cf/cache.db` * 如果不想使用缓存数据,可以在执行命令的时候加上 `--flushCache` 参数 ::: ## 列出阿里云 OSS 对象存储服务 使用以下命令列出 OSS 对象存储服务 ```bash cf alibaba oss ls ``` 如果想指定获取对象的数量,可以使用 `-n` 或者 `--number` 参数 ```bash cf alibaba oss ls -n 100 ``` > 当 CF 使用缓存数据时,由于对象数量已...
sec-knowleage
# 62. 圆圈中最后剩下的数 ## 题目链接 [NowCoder](https://www.nowcoder.com/practice/f78a359491e64a50bce2d89cff857eb6?tpId=13&tqId=11199&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 让小朋友们围成一个大圈。然后,随机指定一个数 m,让编号为 0 的小朋友开始报数。每次喊到 m-1 的那个小朋友要出列唱首歌,然后可以在礼品箱中任意的挑选礼物,并且不再回到圈中,从他的下...
sec-knowleage
### Detecting debugging概述 检测调试器的方法很多, 比如检测进程名之类. 这里我们介绍一种方法, 就是通过检测一些函数的调用情况来分析程序当前是否处于被调试状态 ```c int main() { if (ptrace(PTRACE_TRACEME, 0, 1, 0) < 0) { printf("DEBUGGING... Bye\n"); return 1; } printf("Hello\n"); return 0; } ``` 一个进程只能被一个进程ptrace, 如果你自己调用ptrace, 那么其它程序就无法通过ptrace调试或向你的程序注入代码. 如果程序当前被gdb调试, ...
sec-knowleage
mysqldump === MySQL数据库中备份工具 ## 补充说明 **mysqldump命令** 是mysql数据库中备份工具,用于将MySQL服务器中的数据库以标准的sql语言的方式导出,并保存到文件中。 ### 语法 ```shell mysqldump(选项) ``` ### 选项 ```shell --add-drop-table:在每个创建数据库表语句前添加删除数据库表的语句; --add-locks:备份数据库表时锁定数据库表; --all-databases:备份MySQL服务器上的所有数据库; --comments:添加注释信息; --compact:压缩模式,产生更少的输出; --complete-ins...
sec-knowleage
--- title: 列出所有服务 --- ## 一键列出阿里云上的 OSS、ECS、RDS 服务 直接使用 `ls` 命令即可列出当前访问凭证下的云服务资源。 ```bash cf alibaba ls ``` 如果想指定区域,可以使用 `-r` 或者 `--region` 命令 ```bash cf alibaba ls -r cn-beijing ``` 在 CF 中还集成了阿里云的私有区域,不过在默认情况下是不调用的,如果想遍历阿里云的私有区域,可以使用 `-a` 命令表示遍历所有区域 ```bash cf alibaba ls -a ``` <Vssue /> <script> export default { m...
sec-knowleage
# Adobe ColdFusion Directory Traversal Vulnerability (CVE-2010-2861) [中文版本(Chinese version)](README.zh-cn.md) Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995. There is a directory traversal vulnerability in the Adobe ColdFusion 9.0.1 and earlier,...
sec-knowleage
--- title: Audacity date: 2022-11-23 16:23:31.701833 background: bg-[#0000e1] label: tags: - - categories: - Keyboard Shortcuts intro: | A visual cheat-sheet for the 135 default keyboard shortcuts found in Audacity --- Keyboard Shortcuts ------------------ ### File Menu Shortcut | Action ---|--- `Ct...
sec-knowleage
# Java pwn (misc, 300p) This was a pretty straightforward task, since we've done similar exploits already here: https://github.com/p4-team/ctf/tree/master/2016-08-21-bioterra-ctf/akashic_records https://github.com/p4-team/ctf/tree/master/2018-01-20-insomnihack/pwn_magic_hat In the task we get a [Java Web Archive](bluep...
sec-knowleage
# Photo Gallery - FLAG2 ## 0x00 Space Used ![](../flag1/imgs/index.jpg) We know there are images taking some of the spaces here, but the total space used are showing 0. So as we already got the source code of the page, we can check how the space calculated in [line 39][1]. ```python rep += '<i>Space used: ' + subproces...
sec-knowleage
# Drupal Drupalgeddon 2 Remote Code Execution Vulnerability (CVE-2018-7600) [中文版本(Chinese version)](README.zh-cn.md) Drupal before 7.58, 8.x before 8.3.9, 8.4.x before 8.4.6, and 8.5.x before 8.5.1 allows remote attackers to execute arbitrary code because of an issue affecting multiple subsystems with default or comm...
sec-knowleage
#!/usr/bin/python3 from pwn import * def exploit(connection): connection.recvuntil(b"Now loading...\n") info("Step 1: Leak locations of libc and stack by exploiting the format string vulnerability...") connection.recvuntil(b"Input name > ") connection.send(b"%p\t" * 9) message = connection.re...
sec-knowleage
### MIPS通用寄存器介绍 MIPS 有 32 个通用寄存器 (General purpose registers),以美元符号 (`$`) 表示。可以表示为 `$0~$31`,也可以用寄存器名称表示如,`$sp` 、 `$t9` 、`$fp` 等等。 | Register Number | Conventional Name | Usage | Usage | | --------------- | -------------...
sec-knowleage
# picoCTF - 2019 Writeups for various challenges from the 2019 [picoCTF competition](https://2019game.picoctf.com/). Ranking at the buzzer: 117/15834 with 27000 points (104 challenges solved). ![Profile](images/Profile.png)
sec-knowleage
# Golly Gee Willikers Forensics, 100 points ## Description > Someone sent me this weird file and I don't understand it. It's freaking me out, this isn't a game! Please help me figure out what's in this file. ``` x = 0, y = 0, rule = B3/S23 3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob3ob 3ob3ob3ob3...
sec-knowleage