text
stringlengths
100
9.93M
category
stringclasses
11 values
package org.vulhub.fastjsondemo; import com.alibaba.fastjson.support.spring.annotation.ResponseJSONP; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; i...
sec-knowleage
# MD5 ## 基本描述 MD5的输入输出如下 - 输入:任意长的消息,512比特长的分组。 - 输出:128比特的消息摘要。 关于详细的介绍,请自行搜索。 此外,有时候我们获得到的md5是16位的,其实那16位是32位md5的长度,是从32位md5值来的。是将32位md5去掉前八位,去掉后八位得到的。 一般来说,我们可以通过函数的初始化来判断是不是MD5函数。一般来说,如果一个函数有如下四个初始化的变量,可以猜测该函数为MD5函数,因为这是MD5函数的初始化IV。 ``` 0x67452301,0xEFCDAB89,0x98BADCFE,0x10325476 ``` ## 破解 目前可以说md5已经基本被攻破了,一般的MD5的碰...
sec-knowleage
### 栈溢出基本示例 下面给出一个典型例子,在这个例子中由于变量声明的顺序和 buffer 声明的大小导致存在最后一字节的溢出。 ```c #include <stdio.h> #include <string.h> #define PASSWORD "666666" int verify_password(char *password) { int authenticated; char buffer[8]; authenticated = strcmp(password,PASSWORD); strcpy(buffer,password); return authenticated; } void main() ...
sec-knowleage
# Spring Framework RCE via Data Binding on JDK 9+ (CVE-2022-22965) A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spri...
sec-knowleage
# Bandit-WalkThrough --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- https://overthewire.org/wargames/bandit/ ## Level 0 访问 ssh 连接 主机:bandit.labs.overthewire.org 端口:2220 bandit0/bandit0 不知道为啥 xshell 直接连不上去,用 linux ssh 连接上去了 ```bash ssh -p 2220 bandit0@bandit.labs.overthewire.org ``` --- ## Level 0 ...
sec-knowleage
# 关于文档( •̀ ω •́ )y 你好呀,这是我学习安全运营的记录,很高兴认识你! 本文档使用GitHub Pages + Mkdocs + Travis进行构建、集成和部署 Have a good day! --Toky
sec-knowleage
.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" Portions extracted from /usr/include/sys/socket.h, which does not have .\" any authorship information in it. It is probably available under the GPL. .\" .\" Permission is granted to make and distribute verb...
sec-knowleage
.\" auto-generated by docbook2man-spec $Revision: 1.1 $ .TH "CREATE TYPE" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands" .SH NAME CREATE TYPE \- 定义一个新的数据类型 .SH SYNOPSIS .sp .nf CREATE TYPE \fIname\fR AS ( \fIattribute_name\fR \fIdata_type\fR [, ... ] ) CREATE TYPE \fIname\fR ( INPUT = \fIinput_func...
sec-knowleage
zcat === 显示压缩包中文件的内容 ## 补充说明 **zcat命令** 用于不真正解压缩文件,就能显示压缩包中文件的内容的场合。 ### 语法 ```shell zcat(选项)(参数) ``` ### 选项 ```shell -S:指定gzip格式的压缩包的后缀。当后缀不是标准压缩包后缀时使用此选项; -c:将文件内容写到标准输出; -d:执行解压缩操作; -l:显示压缩包中文件的列表; -L:显示软件许可信息; -q:禁用警告信息; -r:在目录上执行递归操作; -t:测试压缩文件的完整性; -V:显示指令的版本信息; -l:更快的压缩速度; -9:更高的压缩比。 ``` ### 参数 文件:指定要显示其中文件内容...
sec-knowleage
findfs === 标签或UUID查找文件系统 ## 补充说明 **findfs命令** 依据卷标(Label)和UUID查找文件系统所对应的设备文件。findfs命令会搜索整个磁盘,看是否有匹配的标签或者UUID没有,如果有则打印到标注输出上。findfs命令也是e2fsprogs项目的一部分。 ### 语法 ```shell findfs(参数) ``` ### 参数 `LABEL=<卷标>`或者`UUID=<UUID>`:按照卷标或者UUID查询文件系统。 ### 实例 通过卷标名查找对应的文件系统: ```shell findfs LABEL=/boot /dev/hda1 ```
sec-knowleage
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.Drawing.Imaging; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Wi...
sec-knowleage
#include <cstdio> #include <vector> #include <map> #include <set> #include <cassert> #include <algorithm> #define N 8 #define LEN 4 //#define X 0 //#define Y 20 int X, Y; enum type { ADD, ROL, XOR, }; struct operation { type t; unsigned char arg; }; struct four { operation ops[LEN]; }; std::vector<four> gener...
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. '\" '\" RCS: @(#) $Id: glob.n,v 1.2 2003/11/24 05:09:59 b...
sec-knowleage
# MSSQL Server ## Summary * [Tools](#tools) * [Identify Instances and Databases](#identifiy-instaces-and-databases) * [Discover Local SQL Server Instances](#discover-local-sql-server-instances) * [Discover Domain SQL Server Instances](#discover-domain-sql-server-instances) * [Discover Remote SQL Server Instances]...
sec-knowleage
## Dam (Crypto, 277p) ###ENG [PL](#pl-version) In the task we get access to a service providing some form of encryption. The server challenges us for a PoW before we can interact, so first we had to solve the PoW, but it was the same as for some others tasks (prefix for string giving some hash value). After beating the...
sec-knowleage
# S2-053 远程代码执行漏洞 影响版本: Struts 2.0.1 - Struts 2.3.33, Struts 2.5 - Struts 2.5.10 漏洞详情: - http://struts.apache.org/docs/s2-053.html - https://mp.weixin.qq.com/s?__biz=MzU0NTI4MDQwMQ==&mid=2247483663&idx=1&sn=6304e1469f23c33728ab5c73692b675e ## 测试环境搭建 ``` docker compose up -d ``` 环境运行后,访问`http://your-ip:8080/hell...
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 NPROC 1 2022年9月 "GNU coreutils 9....
sec-knowleage
# T1218-002-win-签名的二进制代理执行:控制面板 ## 来自ATT&CK的描述 攻击者可能滥用msiexec.exe来代理恶意有效负载的执行。Msiexec.exe是Windows安装程序的命令行实用程序,因此通常与执行安装包(.msi)相关联。Msiexec.exe由Microsoft进行数字签名。 攻击者可能滥用msiexec.exe来启动本地或网络可访问的MSI文件。Msiexec.exe还可以执行DLL。由于Msiexec.exe在Windows系统上是签名的,因此可以使用Msiexec.exe绕过不考虑其潜在滥用的应用程序控制解决方案。如果启用了AlwaysInstallElevated策略,Msiexec....
sec-knowleage
# ThinkPHP5 SQL Injection Vulnerability && Sensitive Information Disclosure Vulnerability [中文版本(Chinese version)](README.zh-cn.md) ## Rationale Details to read the references: - https://www.leavesongs.com/PENETRATION/thinkphp5-in-sqlinjection.html - https://xz.aliyun.com/t/125 ## Environment Setup Enter the follo...
sec-knowleage
#include <bits/stdc++.h> using namespace std; struct RNG { random_device dev; mt19937_64 rng; RNG() : dev(), rng(dev()) {} RNG(uint64_t seed) : rng(seed) {} bool next_bit() { return rng() & 1; } // For when we want to hide the RNG state uint64_t next_qword_safe() { uint64_t res = ...
sec-knowleage
# T1105-win-入口工具转移-desktopimgdownldr.exe(白名单) ## 来自ATT&CK的描述 攻击者可能会将工具或其他文件从外部系统转移到被攻击的环境中。可以通过命令和控制通道从外部攻击者控制的系统复制文件,用以将工具带入被攻击的网络中,或通过其他工具(如 FTP)的替代协议。 也可以使用 scp、rsync 和 sftp等本地工具在Mac和 Linux上复制文件。 ## 测试案例 desktopimgdownldr.exe位于Win10的system32文件夹中,原本用于设置锁定屏幕或桌面背景图像的。 **路径:** ```bash - c:\windows\system32\desktopimgdow...
sec-knowleage
sed === 功能强大的流式文本编辑器 ## 补充说明 **sed** 是一种流编辑器,它是文本处理中非常重要的工具,能够完美的配合正则表达式使用,功能不同凡响。处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(pattern space),接着用sed命令处理缓冲区中的内容,处理完成后,把缓冲区的内容送往屏幕。接着处理下一行,这样不断重复,直到文件末尾。文件内容并没有 改变,除非你使用重定向存储输出。Sed主要用来自动编辑一个或多个文件;简化对文件的反复操作;编写转换程序等。 ## sed的选项、命令、替换标记 **命令格式** ```shell sed [options] 'command' file(s) ...
sec-knowleage
lvdisplay === 显示逻辑卷属性 ## 补充说明 **lvdisplay命令** 用于显示LVM逻辑卷空间大小、读写状态和快照信息等属性。如果省略"逻辑卷"参数,则lvdisplay命令显示所有的逻辑卷属性。否则,仅显示指定的逻辑卷属性。 ### 语法 ```shell lvdisplay(参数) ``` ### 参数 逻辑卷:指定要显示属性的逻辑卷对应的设备文件。 ### 实例 使用lvdisplay命令显示指定逻辑卷的属性。在命令行中输入下面的命令: ```shell [root@localhost ~]# lvdisplay /dev/vg1000/lvol0 #显示逻辑卷属性 ``` 输出信息如下: ...
sec-knowleage
--- title: 本地部署 --- <center><h1>本地部署</h1></center> --- ### Docker 部署(推荐) ```bash docker pull teamssix/twiki:main docker run --name twiki -d -p 7777:80 teamssix/twiki:main ``` 然后直接访问本地 IP 的 7777 端口即可。 ### 手动部署 ::: warning 注意 需要本地先安装 node 且版本大于或等于 12,推荐使用 12.22.12 版本。 ::: ```bash git clone https://github.com/teamssix/TWi...
sec-knowleage
# 论文日读:Enabling Efficient Cyber Threat Hunting With Cyber Threat Intelligence ## 概要 论文:Gao, Peng, Fei Shao, Xiaoyuan Liu, Xusheng Xiao, Zheng Qin, Fengyuan Xu, Prateek Mittal, Sanjeev R. Kulkarni和Dawn Song. Enabling Efficient Cyber Threat Hunting With Cyber Threat Intelligence. *ArXiv:2010.13637 [Cs]*, 25/2/2021. http:...
sec-knowleage
### 单表代换加密通用特点 在单表替换加密中,所有的加密方式几乎都有一个共性,那就是明密文一一对应。所以说,一般有以下两种方式来进行破解 - 在密钥空间较小的情况下,采用暴力破解方式 - 在密文长度足够长的时候,使用词频分析,http://quipqiup.com/ 当密钥空间足够大,而密文长度足够短的情况下,破解较为困难。 ### 凯撒密码原理 凯撒密码(Caesar)加密时会将明文中的 **每个字母** 都按照其在字母表中的顺序向后(或向前)移动固定数目(**循环移动**)作为密文。例如,当偏移量是左移 3 的时候(解密时的密钥就是 3): ``` 明文字母表:ABCDEFGHIJKLMNOPQRSTUVWXYZ 密文字母表:...
sec-knowleage
# T1137-002-win-office应用启动程序-office test ## 来自ATT&CK的描述 攻击者可能会滥用微软Office的 "Office Test "注册表键,在被攻击的系统上获得持久性。存在一个Office测试注册表位置,允许用户指定一个任意的DLL,在每次启动Office应用程序时执行。这个注册表键被认为是微软在开发Office应用程序时用来加载DLLs以进行测试和调试的。在Office安装过程中,该注册表键并不是默认创建的。 存在用于Office测试功能的用户和全局注册表键。 ``` HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Pe...
sec-knowleage
# T1584-001-盗取基础设施-域名 ## 来自ATT&CK的描述 攻击者可能会劫持域名或子域名,以便在攻击目标过程中使用。域名注册劫持是指未经原注册人允许而改变域名注册的行为。攻击者可能获得被列为域名所有者的电子邮件账户。然后,攻击者可以声称他们忘记了自己的密码,以便对域名注册进行更改。其他的方法包括通过社会工程使域名注册服务台获得对账户的访问权,或者利用续费过程中的漏洞。 当组织的DNS设置指向不存在的或被取消的资源时,就会发生子域劫持。在这种情况下,攻击者可能会控制一个子域,利用与该域相关的信任来进行操作 。 ## 测试案例 子域名劫持漏洞详解、挖掘和防护 <https://blog.csdn.net/nini_boom...
sec-knowleage
sum === 计算文件的校验码和显示块数 ## 补充说明 **sum命令** 用于计算并显示指定文件的校验和与文件所占用的磁盘块数。 ### 语法 ```shell sum(选项)(参数) ``` ### 选项 ```shell -r:使用BSD的校验和算法,块大小为1k; -s:使用system V的校验和算法,块大小为512字节。 ``` ### 参数 文件列表:需要计算和与磁盘块数的文件列表。 ### 实例 计算文件校验码: ```shell [root@localhost ~]# sum insert.sql 00827 12 ```
sec-knowleage
--- title: 威胁情报与全流量异常检测案例分析 toc: true date: 2020-02-25 01:42:35 tags: [威胁情报, 流量检测] --- # 威胁情报与全流量异常检测案例分析 滴滴出行安全说第七期,威胁情报与全流量异常检测案例分析。学习笔记。 ## 分析APT事件所要具备的能力 ### 流量分析 - 使用协议分析工具,独立识别各种通讯协议,对异常流量尝试着手动重组还原。> Wireshark[源代码](https://github.com/wireshark/wireshark)分析 - 了解常用工具的通讯加密协议,具有解包还原的能力。 ### 远控软件和指纹 熟悉远控软件和各种攻击类软件的指纹。...
sec-knowleage
# 杂记 企业安全建设领域内,主要和管理、运营相关的一些杂记。 - 多刷存在感,有时甚至是一些宣传工作,例如做成日常安全教育的漫画,贴在公司的电梯间。因为做信息安全,经常遇到的一个问题就是,做得好没有存在感,出了事情就背锅。在这种大环境下,安全负责人和团队,其实要更多地在公司和全员面前“刷存在感”,让大家都知道我们在做事情,并且是在做有意义的事情,让大家明白我们在做什么事情,也会更加配合我们的工作。这样就慢慢会成为一个良心循环,当然其中会有各种细节需要考虑。
sec-knowleage
package org.vulhub.shirodemo; import org.apache.shiro.authc.*; import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; public class MainRealm extends AuthorizingRealm { @Override protected AuthorizationInfo doGetAut...
sec-knowleage
# Wpwn > https://download.vulnhub.com/wpwn/wpwnvm.zip 靶场IP:`192.168.32.135` 扫描对外端口服务 ``` ┌──(root💀kali)-[/tmp] └─# nmap -p1-65535 -sV 192.168.2.135 Starting Nmap 7.91 ( https://nmap.org ) at 2022-09-06 09:35 EDT Nmap scan report for 192.168.2.135 Host is up (0.00071s latency). Not shown: 65533 closed ports PORT STAT...
sec-knowleage
rpmverify === 验证已安装的RPM软件包的正确性 ## 补充说明 **rpmverify命令** 用来验证已安装的rpm软件包的正确性。 ### 语法 ```shell rpmverify(选项) ``` ### 选项 ```shell -Va:验证所有软件包; -V<软件包>f:验证指定软件包; --nomd5:不验证软件包的md5摘要。 ```
sec-knowleage
# Floppy 2 Misc. ## Description: > Looks like you found a way to open the file in the floppy! But that `www.com` file looks suspicious.. Dive in and take another look? ## Solution: Let's take a look at `www.com`, which we extracted during the [First Floppy](Floppy.md) challenge: ```console root@kali:/media/sf_CTFs/goog...
sec-knowleage
# level11 #### About The /home/flag11/flag11 binary processes standard input and executes a shell command. There are two ways of completing this level, you may wish to do both :-) To do this level, log in as the level11 account with the password level11. Files for this level can be found in /home/flag11. #### Source...
sec-knowleage
package com.example; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer; import org.springframework.security.oauth2.config.annotation.web.configu...
sec-knowleage
# Poor Guy (web, 150p) URL : http://ctf.sharif.edu:8086/index.php ![](./screenshot.png) SQL Injection with single quote replacing ' (single-quote) into \' , so by sending \' it gets replaced into \\' , which will treat backslash as non-special sign and quote as special. After making some enumeration we have found out s...
sec-knowleage
# Apache Druid 代码执行漏洞(CVE-2021-25646) Apache Druid是一个开源的分布式数据存储。 Apache Druid包括执行嵌入在各种类型请求中的用户提供的JavaScript代码的能力。这个功能是为了在可信环境下使用,并且默认是禁用的。然而,在Druid 0.20.0及以前的版本中,攻击者可以通过发送一个恶意请求使Druid用内置引擎执行任意JavaScript代码,而不管服务器配置如何,这将导致代码和命令执行漏洞。 参考链接: - <https://blogs.juniper.net/en-us/threat-research/cve-2021-25646-apache-druid-...
sec-knowleage
ack === 比grep好用的文本搜索工具 ## 安装 ```shell # ubuntu下要安装ack-grep,因为在debian系中,ack这个名字被其他的软件占用了。 sudo apt-get install ack-grep # alpine Linux-apk软件包管理器 安装 ack apk install ack ``` ## 参数 这些参数在linux上的适用频率是相当高的,尤其是你用vim做为IDE的话 ```shell -c(统计)/ -i(忽略大小)/ -h(不显示名称)/ -l(只显文件名)/ -n(加行号)/ -v(显示不匹配) ``` ## 特点 ack官网列出了这工具的5大卖点: 1. 速度非常快,...
sec-knowleage
# Python 3 from Crypto.Util.number import * from hashlib import sha1 bits = 1024 def LCM(x, y): return x * y // GCD(x, y) def L(x, n): return (x - 1) // n p = getStrongPrime(bits/2) q = getStrongPrime(bits/2) n = p*q n2 = n*n k = getRandomRange(0, n) g = (1 + k*n) % n2 sk1 = LCM(p - 1, q - 1) sk2 = invers...
sec-knowleage
.TH WISH 1 .SH NAME wish \- 简单的窗口式(windowing) shell .SH 总览 .B wish [filename] [arg] [arg ...] .SH 选项 .TP -colormap new 指定窗口使用一个新的私有的调色板(colormap)而不使用给屏幕的缺省的调色板。 .TP -display display 指定显示窗口的显示器(和屏幕)。 .TP -geometry geometry 初始化用于窗口的几何(位置、大小)。如果指定了这个选项,它的值存储在应用的 Tcl 解释器的 geometry 全局变量中。 .TP -name name 用 name 作为窗口中显示的标...
sec-knowleage
## smartcat3 (web) This task was another web ping utility, similar to one from the teaser. We were able to submit a text, which would then be passed to `ping` command, like so: `ping -c 1 OUR_TEXT`. This asks for shell command injection - it was not that easy though, since server filtered most metacharacters, such as ...
sec-knowleage
# LoadSomeBits Forensics, 500 points ## Description: > Can you find the flag encoded inside this image? ![logo](images/pico2018-special-logo.bmp) ## Solution: Couldn't find the flag by using any existing Steganography tool (e.g. zsteg, StegSolve). I ended up writing this script which skips the BMP header and then creat...
sec-knowleage
# DNS Rebinding > DNS rebinding changes the IP address of an attacker controlled machine name to the IP address of a target application, bypassing the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) and thus allowing the browser to make arbitrary requests to the target app...
sec-knowleage
#!/usr/bin/python """ Bulletproof Jpegs Generator Copyright (C) 2012 Damien "virtualabs" Cauquil 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 Software Foundation; either version 2 of the License,...
sec-knowleage
md5sum === 计算和校验文件报文摘要的工具程序 ## 补充说明 **md5sum命令** 采用MD5报文摘要算法(128位)计算和检查文件的校验和。一般来说,安装了Linux后,就会有md5sum这个工具,直接在命令行终端直接运行。 MD5算法常常被用来验证网络文件传输的完整性,防止文件被人篡改。MD5 全称是报文摘要算法(Message-Digest Algorithm 5),此算法对任意长度的信息逐位进行计算,产生一个二进制长度为128位(十六进制长度就是32位)的“指纹”(或称“报文摘要”),不同的文件产生相同的报文摘要的可能性是非常非常之小的。 ### 语法 ```shell md5sum(选项)(参数) ```...
sec-knowleage
# Wee R Leet Misc. ## Description: > Somebody forgot a useless assert function in the interpreter somewhere. In our agile development lifecycle somebody added the function early on to prove it's possible. Wev've only heared stories but apparently you can trigger it from Wee and it behaves differently for some "leet" in...
sec-knowleage
# Unknown - Outside Secret Base Category: Reversing ## Description > You’re still located behind the tree, but now you have a plan on how to get in. You have taken notice that the guards are changing every 45 minutes, and when they do that, you have a gap of about 30 seconds to sneak past and get into the main entrance...
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. '\" '\" RCS: @(#) $Id: cd.n,v 1.2 2003/11/24 05:09:59 bbb...
sec-knowleage
.TH "ping" "8" "2016年11月10日" "iputils-161105" "系统管理员手册:iptuils" .SH 名称 ping \- 向网络主机发送 ICMP 回显请求(ECHO_REQUEST)分组 .SH 概要 \fBping\fR [\fB-aAbBdDfhLnOqrRUvV46\fR] [\fB-c \fIcount\fB\fR] [\fB-F \fIflowlabel\fB\fR] [\fB-i \fIinterval\fB\fR] [\fB-I \fIinterface\fB\fR] [\fB-l \fIpreload\fB\fR] [\fB-m \fImark\fB\fR] [\fB-M \fI...
sec-knowleage
package com.vulhub.authzvuln; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication(scanBasePackages = { "com.vulhub" }) public class App { public static void main(String[] args) { SpringApplication.run(App.class, args); } }
sec-knowleage
rmmod === 从运行的内核中移除指定的内核模块 ## 补充说明 **rmmod命令** 用于从当前运行的内核中移除指定的内核模块。执行rmmod指令,可删除不需要的模块。Linux操作系统的核心具有模块化的特性,应此在编译核心时,务须把全部的功能都放如核心。你可以将这些功能编译成一个个单独的模块,待有需要时再分别载入它们。 ### 语法 ```shell rmmod(选项)(参数) ``` ### 选项 ```shell -v:显示指令执行的详细信息; -f:强制移除模块,使用此选项比较危险; -w:等待着,直到模块能够被除时在移除模块; -s:向系统日志(syslog)发送错误信息。 ``` ### 参数 模块名:要移除的模...
sec-knowleage
<?php //createPNGwithPLTE.php // bypass imageCreateFromPng and imagepng $_payload="<?php phpinfo()?> "; $_pay_len=strlen($_payload); if(strlen($_payload)%3!=0){ echo "payload%3==0 !"; exit(); } $width=$_pay_len/3; $height=20; //$im = imageCreateFromPng("existing.png"); $im = imagecreate($width, $height); $_hex=un...
sec-knowleage
# Device-Exploits --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- **硬件产品默认口令** - [硬件产品默认口令](http://www.r4v3zn.com/spear-framework/#/default-pwd/hardware-products) --- ## CPU **Meltdown/Spectre** - 相关文章 - [An Explanation of the Meltdown/Spectre Bugs for a Non-Technical Audience](https://blog.clo...
sec-knowleage
# Level03 #### About Check the home directory of flag03 and take note of the files there. There is a crontab that is called every couple of minutes. To do this level, log in as the level03 account with the password level03. Files for this level can be found in /home/flag03. #### Source code There is no source code ...
sec-knowleage
## 桥接(Bridge) ### Intent 将抽象与实现分离开来,使它们可以独立变化。 ### Class Diagram - Abstraction:定义抽象类的接口 - Implementor:定义实现类接口 <div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/2a1f8b0f-1dd7-4409-b177-a381c58066ad.png"/> </div><br> ### Implementation RemoteControl 表示遥控器,指代 Abstraction。 TV 表示电视,指代 ...
sec-knowleage
# Tricky Guess Category: Programming, 50 Points ## Description > All you need to know is: netcat tricky-guess.csa-challenge.com 2222 > > Good luck! A word list was attached. ## Solution We'll take a look at the word list first: ```console root@kali:/media/sf_CTFs/checkpoint/Tricky_Guess# head words.txt krzvctoxdnya mx...
sec-knowleage
# LemonSqueezy > https://download.vulnhub.com/lemonsqueezy/LemonSqueezy.7z 靶场IP:`192.168.32.218` 扫描对外端口服务 ``` ┌──(root💀kali)-[~] └─# nmap -p 1-65535 -sV 192.168.32.218 ...
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 TAIL 1 2022年9月 "GNU coreutils 9.1...
sec-knowleage
sync === 用于强制被改变的内容立刻写入磁盘 ## 补充说明 **sync命令** 用于强制被改变的内容立刻写入磁盘,更新超块信息。 在Linux/Unix系统中,在文件或数据处理过程中一般先放到内存缓冲区中,等到适当的时候再写入磁盘,以提高系统的运行效率。sync命令则可用来强制将内存缓冲区中的数据立即写入磁盘中。用户通常不需执行sync命令,系统会自动执行update或bdflush操作,将缓冲区的数据写 入磁盘。只有在update或bdflush无法执行或用户需要非正常关机时,才需手动执行sync命令。 ### 语法 ```shell sync(选项) ``` ### 选项 ```shell -d, --data ...
sec-knowleage
# GoAhead Web Server HTTPd 'LD_PRELOAD' Remote Code Execution (CVE-2017-17562) [中文版本(Chinese version)](README.zh-cn.md) Embedthis GoAhead is the world's most popular, tiny embedded web server, which is deployed in hundreds of millions of devices and is ideal for the smallest of embedded devices. GoAhead before 3.6.5...
sec-knowleage
# Curve12833227 (crypto, 150+37p, 12 solved) In the challenge we get [code](vuln.py) and the [result](flag.enc). What the code does is encrypt the flag using AES and the AES key is encrypted via a custom elliptic curve using generator point `(4,10)`. We don't get the curve equation, only the addition and multiplication...
sec-knowleage
# CyberTank Website Web A website link was attached. ## Modifications (50 points) > The CyberTank website is still heavily being updated as the company is still in its startup phase. There may be some leftovers from one of the recent modifications... > > Flag format: CTF{32-hex} Let's check the website source code: `...
sec-knowleage
import java.io.Serializable; import java.rmi.Naming; import sun.rmi.registry.RegistryImpl_Stub; import org.neo4j.shell.ShellServer; public class Neo4jAttacker { public static String TARGET_BINDING = "shell"; public static void main(String[] args) throws Exception { if (args.length != 2) { ...
sec-knowleage
package com.b1ngz.sec.model; /** * Created by b1ngz on 2018/9/8. */ public class Target { private Object param; public Object getParam() { return param; } public void setParam(Object param) { this.param = param; } }
sec-knowleage
# Writeup CSAW CTF 2015 Uczestniczyliśmy (msm, Rev, Shalom, other019 i nazywam) w CSAW CTF, i znowu spróbujemy opisać zadania z którymi walczyliśmy (a przynajmniej te, które pokonaliśmy). insert lanie_wody into writeup; Ogólne wrażnia: Konkurs miał kilka ciekawych zadań, ale jednak troche odbiegał od tego czego można o...
sec-knowleage
import binascii, hashlib, time, string, sys, zlib, qrcode from pwn import * context.log_level="debug" r=remote("ctf.sharif.edu", 12432) time.sleep(0.5) r.recvline() r.recvline() s=r.recvline() s=s[-24:-2] r.recvline() wanted=s i=0 while True: i+=1 s=hex(i)[2:] s=(8-len(s))*"0"+s dig=bin(int(hashlib.m...
sec-knowleage
# 题目 ## 2018 网鼎杯第一场 clip 通过010 editor 可以看到文件的头部包含有 cloop 字样,搜了搜发现这是一个古老的 linux 压缩后的设备,题目中又说这个设备损坏了,所以就想办法找一个正常的。于是搜索如何压缩得到一个 cloop 文件,如下 ```shell mkisofs -r test | create_compressed_fs - 65536 > test.cloop ``` 参考https://github.com/KlausKnopper/cloop,于是压缩一个文件,然后发现源文件文件头存在问题,于是进行修复,从而考虑如何从 cloop 文件中提取文件,即使用 ``` extract_c...
sec-knowleage
# T1087-001-linux-本地账户发现 ## 来自ATT&CK的描述 攻击者可能会尝试获取本地系统帐户的列表。此信息可以帮助攻击者确定系统上存在哪些本地帐户,以帮助后续行为。 在Linux上,可以通过使用/etc/passwd的文件来枚举本地用户。在mac中,除文件外,此相同文件仅用于单用户模式/etc/master.passwd。此外,可以通过groups和id命令枚举组。 ## 测试案例 枚举所有账户:`cat /etc/passwd` 查看sudoers文件:`cat /etc/sudoers` 查看UID为0的帐户:`username=$(echo $HOME | awk -F'/' '{print $3}') &...
sec-knowleage
### ESP 定律法要点 ESP定律的原理在于利用程序中堆栈平衡来快速找到OEP. 由于在程序自解密或者自解压过程中, 不少壳会先将当前寄存器状态压栈, 如使用`pushad`, 在解压结束后, 会将之前的寄存器值出栈, 如使用`popad`. 因此在寄存器出栈时, 往往程序代码被恢复, 此时硬件断点触发. 然后在程序当前位置, 只需要少许单步操作, 就很容易到达正确的OEP位置. 1. 程序刚载入开始pushad/pushfd 2. 将全部寄存器压栈后就设对ESP寄存器设硬件断点 3. 运行程序, 触发断点 4. 删除硬件断点开始分析
sec-knowleage
'\" t .ig troff.man Last update : 9 Jan 2002 This file is part of groff, the GNU roff type-setting system. Copyright (C) 1989, 2000, 2001, 2002 Free Software Foundation, Inc. written by James Clark modified by Werner Lemberg <wl@gnu.org> Bernd Warken <bwarken@mayn.de> Permission is granted to copy, distribu...
sec-knowleage
# Secret Service * Category: Cryptography * 1500 Points * Solved by the JCTF Team ## Description > Hello there, > > In order for us to trust you, you must prove the you either have access to our RSA keys or already have the encrypted command: "FLAGPLX" (flag please thanks, in short). > > Come back to us when you have...
sec-knowleage
from django.urls import include, path, re_path from . import views urlpatterns = [ path('', views.vul), ]
sec-knowleage
# ECShop 4.x `collection_list` SQL injection References: - https://mp.weixin.qq.com/s/xHioArEpoAqGlHJPfq3Jiw - http://foreversong.cn/archives/1556 ## Vulnerable environment Execute following command to start a ECShop 4.0.6: ``` docker compose up -d ``` After server is started, browse the `http://your-ip:8080` to ...
sec-knowleage
# condrv.sys 内存损坏漏洞 前面的没怎么看懂,尝试看后面的 condrv.sys 全局找 condrv.sys, 发现 C:\Windows\System32\drivers\condrv.sys, 复制一份, ida64 打开 选择从符号服务器下载 跟到 CdpDispatchCreate 查看反汇编 它会循环比较文件名是不是预定义的几个,如果是,则调用预定义的创建回调函数 跟到 CdpObjectCreationTable 目前网上的 poc 如下 ``` <script>document.location = '\\\\.\\globalroot\\device\\condrv\\kernelconnect';</...
sec-knowleage
hdparm === 显示与设定硬盘的参数 ## 补充说明 **hdparm命令** 提供了一个命令行的接口用于读取和设置IDE或SCSI硬盘参数。 ### 语法 ```shell hdparm(选项)(参数) ``` ### 选项 ```shell -a<快取分区>:设定读取文件时,预先存入块区的分区数,若不加上<快取分区>选项,则显示目前的设定; -A<0或1>:启动或关闭读取文件时的快取功能; -c<I/O模式>:设定IDE32位I/O模式; -C:检测IDE硬盘的电源管理模式; -d<0或1>:设定磁盘的DMA模式; -f:将内存缓冲区的数据写入硬盘,并清除缓冲区; -g:显示硬盘的磁轨,磁头,磁区等参数; -h:显示帮...
sec-knowleage
ldconfig === 动态链接库管理命令 ## 补充说明 **ldconfig命令** 的用途主要是在默认搜寻目录`/lib`和`/usr/lib`以及动态库配置文件`/etc/ld.so.conf`内所列的目录下,搜索出可共享的动态链接库(格式如lib*.so*),进而创建出动态装入程序(ld.so)所需的连接和缓存文件。缓存文件默认为`/etc/ld.so.cache`,此文件保存已排好序的动态链接库名字列表,为了让动态链接库为系统所共享,需运行动态链接库的管理命令ldconfig,此执行程序存放在`/sbin`目录下。 ldconfig通常在系统启动时运行,而当用户安装了一个新的动态链接库时,就需要手工运行这个命令。 ##...
sec-knowleage
# 日志 --- ## 系统日志类型 日志默认存放位置:`/var/log/` ```bash service auditd status # 查看日志服务是否开启 more /etc/rsyslog.conf # 查看日志配置情况 ``` ### /var/log 下的日志分类 以下是比较常用的几个日志文件: - `/var/log/message` : 核心系统日志文件,包含系统启动引导,系统运行状态和大部分错误信息等都会记录到这个文件,因此这个日志是故障诊断的首要查看对象. - `/var/log/dmesg` : 核心启动日志,系统启动时会在屏幕显示与硬件有关的信息,这些信息会保存在这个...
sec-knowleage
### Padding Oracle Attack介绍 Padding Oracle Attack 攻击一般需要满足以下几个条件 - 加密算法 - 采用 PKCS5 Padding 的加密算法。 当然,非对称加密中 OAEP 的填充方式也有可能会受到影响。 - 分组模式为 CBC 模式。 - 攻击者能力 - 攻击者可以拦截上述加密算法加密的消息。 - 攻击者可以和 padding oracle(即服务器) 进行交互:客户端向服务器端发送密文,服务器端会以某种返回信息告知客户端 padding 是否正常。 Padding Oracle Attack 攻击可以达到的效果如下 - 在不清楚 key 和 IV...
sec-knowleage
'\" t .TH "SYSTEMD\-ESCAPE" "1" "" "systemd 231" "systemd-escape" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http...
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 NOHUP 1 2022年9月 "GNU coreutils 9....
sec-knowleage
# Level14 #### About This program resides in /home/flag14/flag14. It encrypts input and writes it to standard output. An encrypted token file is also in that home directory, decrypt it :) To do this level, log in as the level14 account with the password level14. Files for this level can be found in /home/flag14. ####...
sec-knowleage
# Adobe ColdFusion 反序列化漏洞(CVE-2017-3066) Adobe ColdFusion是美国Adobe公司的一款动态Web服务器产品,其运行的CFML(ColdFusion Markup Language)是针对Web应用的一种程序设计语言。 Adobe ColdFusion中存在java反序列化漏洞。攻击者可利用该漏洞在受影响应用程序的上下文中执行任意代码或造成拒绝服务。以下版本受到影响:Adobe ColdFusion (2016 release) Update 3及之前的版本,ColdFusion 11 Update 11及之前的版本,ColdFusion 10 Update 22及之前的版本。...
sec-knowleage
# Vegeta1 > https://download.vulnhub.com/vegeta/Vegeta.ova 靶场IP:`192.168.32.24` 扫描对外端口服务 ``` ┌──(root㉿kali)-[/tmp] └─# nmap -sV -p1-65535 192.168.32.24 Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-14 05:27 EDT Nmap scan report for 192.168.32.24 Host is up (0.00013s latency). Not shown: 65533 closed tcp ports (res...
sec-knowleage
typedef unsigned char undefined; typedef unsigned int ImageBaseOffset32; typedef unsigned char bool; typedef unsigned char byte; typedef unsigned int dword; float10 typedef long long longlong; typedef unsigned char uchar; typedef unsigned int uint; typedef unsigned long ulong; typedef unsigne...
sec-knowleage
# Combo 300 We were given a link to the repository with potentially suspicious content: `https://github.com/HelmutVonSay/explorer`. Unfortunately, repository was removed and nowhere forked nor archived. We've noticed that related account has two another projects and one of them has 10 stargazers, regardless of the fact...
sec-knowleage
from queue import Queue import socket import threading import re def parse_seed(data): pattern = re.compile(".*(\d{2})\\.(\d{2})\\.(\d{4}).*(\d{2}):(\d{2}):(\d{2})", re.MULTILINE | re.DOTALL) seed = pattern.findall(data)[0] return int(str.format("{2}{1}{0}{3}{4}{5}", *seed)) max = 101 threads = Queue() ...
sec-knowleage
# c0rrupt Forensics, 250 points ## Description: > We found this file. Recover the flag. ## Solution: Let's see what we can tell about the file: ```console root@kali:/media/sf_CTFs/pico/c0rrupt# file mystery mystery: data root@kali:/media/sf_CTFs/pico/c0rrupt# xxd -g 1 mystery | head 00000000: 89 65 4e 34 0d 0a b0 aa 0...
sec-knowleage
# 57.1 和为 S 的两个数字 ## 题目链接 [牛客网](https://www.nowcoder.com/practice/390da4f7a00f44bea7c2f3d19491311b?tpId=13&tqId=11195&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github) ## 题目描述 在有序数组中找出两个数,使得和为给定的数 S。如果有多对数字的和等于 S,输出两个数的乘积最小的。 ## 解题思路 使用双指针,一个指针指向元素较小的值,一个指针指向元素较大的值。指向较小元素...
sec-knowleage
### netbios简介: IBM公司开发,主要用于数十台计算机的小型局域网。该协议是一种在局域网上的程序可以使用的应用程序编程接口(API),为程序提供了请求低级服务的同一的命令集,作用是为了给局域网提供网络以及其他特殊功能。 系统可以利用WINS服务、广播及Lmhost文件等多种模式将NetBIOS名-——特指基于NETBIOS协议获得计算机名称——解析为相应IP地址,实现信息通讯,所以在局域网内部使用NetBIOS协议可以方便地实现消息通信及资源的共享。 ### nmap扫描: ```bash root@John:~# nmap -sU --script nbstat.nse -p137 192.168.1.0/24 -...
sec-knowleage
# double Web, Easy ## Description > Get the /flag at http://108.61.211.185/ ## Solution When accessing the site we get the following output: ```python import string import urllib2 from bottle import route, run, post, get, request @get('/') def index(): with open(__file__) as f: return '<pre>' + "".join({'<'...
sec-knowleage
# Enter Space-Time Coordinates Category: Misc. ## Description > Ok well done. The console is on. It's asking for coordinates. Beating heavily on the console yields little results, but the only time anything changes on your display is when you put in numbers.. So what numbers are you going to go for? You see the starshi...
sec-knowleage
原文 by wooyun wiki ## 一、文件解析漏洞 使用了低版本的,存在漏洞的web服务器。解析漏洞有以下几种: ### IIS 5.x/6.0解析漏洞 目录解析:在网站下建立文件夹的名称中带有.asp、.asa等可执行脚本文件后缀为后缀的文件夹,其目录内的任何扩展名的文件都被IIS当作可执行文件来解析并执行。 `http://www.xxx.com/xx.asp/xx.jpg` 文件解析:在IIS6.0下,分号后面的不被解析,也就是说6.0下,分号后面的不被解析,也就是说`xx.asp;.jpg`将被当做`xx.asp`解析并执行。`http://www.xxx.com/xx.asp;.jpg` 在文件改名时也可以尝试 ...
sec-knowleage
import os,random,sys,string from hashlib import sha256 import SocketServer import CompactFIPS202 from flag import FLAG class Task(SocketServer.BaseRequestHandler): def proof_of_work(self): proof = ''.join([random.choice(string.ascii_letters+string.digits) for _ in xrange(20)]) digest = sha256(proo...
sec-knowleage
# IoC容器 --- ## 什么是容器 容器是一种为某种特定组件的运行提供必要支持的一个软件环境。例如,Tomcat 就是一个 Servlet 容器,它可以为 Servlet 的运行提供运行环境。类似 Docker 这样的软件也是一个容器,它提供了必要的 Linux 环境以便运行一个特定的 Linux 进程。 通常来说,使用容器运行组件,除了提供一个组件运行环境之外,容器还提供了许多底层服务。例如,Servlet 容器底层实现了 TCP 连接,解析 HTTP 协议等非常复杂的服务,如果没有容器来提供这些服务,我们就无法编写像 Servlet 这样代码简单,功能强大的组件。早期的 JavaEE 服务器提供的 EJB 容器最重要的功能...
sec-knowleage
test === 执行条件表达式。 ## 概要 ```shell test [expr] ``` ## 主要用途 - 执行条件表达式。 ## 参数 ### 文件操作符: ```shell -a FILE 如果文件存在,则为true。 -b FILE 如果文件是块特殊的,则为true。 -c FILE 如果文件是特殊字符,则为true。 -d FILE 如果文件是目录,则为true。 -e FILE 如果文件存在,则为true。 -f FILE 如果文件存在并且是常规文件,则为true。 -g FILE 如果文件是set-group-id,则为true。 -h FILE 如果文件是符号链...
sec-knowleage
### 通信领域电话拨号编码 1-9 分别使用 1-9 个脉冲,0 则表示使用 10 个脉冲。 ### 通信领域Morse 编码 参见 [摩尔斯编码 -维基百科](https://zh.wikipedia.org/wiki/%E6%91%A9%E5%B0%94%E6%96%AF%E7%94%B5%E7%A0%81) ### Morse 编码特点 - 只有 `.` 和 `-`; - 最多 6 位; - 也可以使用 `01` 串表示。 ### Morse 编码转换工具 - [摩尔斯编码在线转换](http://www.zhongguosou.com/zonghe/moErSiCodeConverter.aspx) ###...
sec-knowleage
# I am many (for, 100p, 65 solved) A rather trivial forensics/stegano challenge. We get a png file: ![](hackover_first.png) But if we run binwalk on this, we can see that there is another PNG file glued at the end: ![](hackover_second.png)
sec-knowleage
# Text rendering is hard * Category: Misc. * 200 Points * Solved by the JCTF Team ## Description > Looking for text in the PDF structure is much like looking for the Cheshire Cat. It's almost completely invisible, only leaving trace hints that the file even contains text to those unfamiliar with the structure. > > Try...
sec-knowleage