text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
# DC2-WalkThrough
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶机地址**
- https://www.vulnhub.com/entry/dc-2,311/
**Description**
Much like DC-1, DC-2 is another purposely built vulnerable lab for the purpose of gaining experience in the world of penetration testing.
As with the original DC-1, i... | sec-knowleage |
version: '2'
services:
spring:
image: vulhub/spring-security-oauth2:2.0.8
ports:
- "8080:8080" | sec-knowleage |
'\" t
.TH "HWDB" "7" "" "systemd 231" "hwdb"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/50... | sec-knowleage |
inp0 = "People don't understand computers. Computers are magical boxes that do things. People believe what computers tell them."
inp1 = "There are two types of encryption: one that will prevent your sister from reading your diary and one that will prevent your government."
inp2 = "There's an entire flight simulator hid... | sec-knowleage |
batch
===
在系统不繁忙的时候执行定时任务
## 补充说明
**batch命令** 用于在指定时间,当系统不繁忙时执行任务,用法与at相似。
### 语法
```shell
batch(选项)(参数)
```
### 选项
```shell
-f:指定包含具体指令的任务文件;
-q:指定新任务的队列名称;
-m:任务执行完后向用户发送E-mail。
```
### 参数
日期时间:指定任务执行的日期时间。
### 实例
```shell
batch
at> echo 1234
at> <EOT>
job 5 at Sun Apr 28 08:49:00 2013
``` | sec-knowleage |
sha256sum
===
用于计算文件的 SHA-256 哈希值
## 补充说明
**sha256sum命令** 是打印或检查 SHA256(256位)校验
### 语法
```shell
sha256sum [OPTION]... [FILE]...
```
### 选项
```shell
-b, --binary # 以二进制模式读取
-c, --check # 从文件中读取 SHA256 校验和并进行检查
--tag # 创建 BSD 风格的校验和
-t, --text # 以文本模式读取(默认)
-z, --zero # 每行输出以 NUL 结尾,而不是换行符,并禁用文件名转义
-... | sec-knowleage |
import requests
import logging
import sys
import random
import string
import argparse
from urllib.parse import urljoin
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
string_punctuation = '!#$%&()*+,-.:;<=>?@[]^_~'
def random_string(length: int, lower=Tr... | sec-knowleage |
import re
data = open('MrFusion.gpjb', 'rb').read()
def findndx(str, data):
return [m.start() for m in re.finditer(str, data)]
ext = {
'.gif': 'GIF89a',
'.png': '\x89PNG',
'.bmp': 'BM',
'.jpg': '\xFF\xD8\xFF\xE0'
}
for ext, pat in ext.iteritems():
for n in findndx(pat, data):
open('o... | sec-knowleage |
# SpamAndFlags Teaser 2020
### Table of contents
* [Hashing@Home (pwn)](hashing_at_home)
* [Nativity Scene (pwn)](nativity_scene)
* [The 3D Printer Task (misc)](3d_printer)
* [Environmental Issues (pwn or misc, depends on who you ask)](environmental_issues)
(also covers Regulated Environmental Issues)
* [Journey: Cha... | sec-knowleage |
# BFS (ppc 400)
###ENG
[PL](#pl-version)
In the task we get a database [file](maze.db) with maze definition.
We dumped the data to [txt](data.txt) to simplify usage.
Each node stores a single byte of data.
We guess that the point is to find the path through the maze.
We used simple BFS search for that:
```python
import... | sec-knowleage |
nmcli
===
地址配置工具
## 补充说明
**nmcli命令** 是 NetworkManager client 网络管理客户端。
### 语法
```shell
nmcli [OPTIONS] OBJECT { COMMAND | help }
```
### 选项
```shell
OPTIONS
-t[erse] # terse output 简洁的输出
-p[retty] # pretty output 漂亮的输出
-m[ode] tabular|multiline ... | sec-knowleage |
# Cloud - AWS
> Amazon Web Services offers reliable, scalable, and inexpensive cloud computing services.
## Summary
- [AWS](#aws)
- [Summary](#summary)
- [Training](#training)
- [Tools](#tools)
- [AWS Patterns](#aws-patterns)
- [AWS - Metadata SSRF](#aws---metadata-ssrf)
- [Method for Elastic Cloud Compu... | sec-knowleage |
---
title: PM2
date: 2022-11-25 18:10:00
background: bg-[#230769]
tags:
- process
categories:
- Linux Command
intro: |
[PM2] is a daemon process manager that will help you manage and keep your application online. Getting started with PM2 is straightforward, it is offered as a simple and intuitive CLI.
plugi... | sec-knowleage |
# Ruby On Rails Path Traversal Vulnerability(CVE-2018-3760)
[中文版本(Chinese version)](README.zh-cn.md)
Ruby On Rails is a well-known Ruby Web development framework, which uses Sprockets as a static file server in development environment. Sprockets is a Ruby library that compiles and distributes static resource files.
... | sec-knowleage |
# ClamAV 部署
> 笔记内容由 [Lorna Dane](https://github.com/tonyscy) 提供,仅做部分内容排版修改
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
## ubuntu
**安装**
```bash
apt-get install clamav
apt-get install clamtk # 图形化界面,可以不装
```
*安装完成之后查看版本信息*
*尝试运行*
接下来就是下载最新的病毒库。
可以使用 `freshclam -v` 来直接下载,但是通常情况下网络都非常不稳定,很可能导致多次下... | sec-knowleage |
# White Box Unboxing
> Here is a binary implementing a cryptographic algorithm. You provide an input and it
> produces the corresponding output. Can you extract the key?
We were given binary implementing, as it turns out, whitebox implementation of AES. For a while I tried
standard methods of breaking it, but in the ... | sec-knowleage |
# T1127-win-受信任的开发者实用程序代理执行-Jsc.exe(白名单)
## 来自ATT&CK的描述
攻击者可能会利用受信任的开发人员使用的程序来代理执行恶意载荷。有许多用于软件开发相关任务的实用程序可用于执行各种形式的代码,以协助开发、调试和逆向工程。这些实用程序通常可能使用合法证书进行签名,允许它们在系统上执行并通过有效绕过应用程序控制解决方案的受信任进程代理执行恶意代码。
## 测试案例
jsc.exe是Microsoft Corporation开发的Microsoft®JScript .NET的一部分,用来将javascript代码编译为.exe或.dll格式的二进制文件。
路径:
```
- C:\Windows... | 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: tk_dialog.n,v 1.2 2003/11/24 05:10... | sec-knowleage |
# 4_messages (crypto 100)
## ENG
[PL](#pl-version)
In the task we get [4 Playfair ciphertexts](captured.log) and we know that the plaintext starts with `Good evening hackit two thousand seventeen`.
We actually approached this in a bit unconventional way, since the first attack we found was a heuristic to recover messag... | sec-knowleage |
package org.vulhub.xstreamsample;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class XstreamSampleApplication {
public static void main(String[] args) {
SpringApplication.run(XstreamSampleApplication.... | sec-knowleage |
# HTTPS
`HTTPs = HTTP + SSL / TLS`.服务端和客户端的信息传输都会通过TLS进行加密,所以传输的数据都是加密后的数据
- [wireshark分析HTTPs](http://www.freebuf.com/articles/system/37900.html)
## 例题
> 题目:hack-dat-kiwi-ctf-2015:ssl-sniff-2
打开流量包发现是 `SSL` 加密过的数据,导入题目提供的`server.key.insecure`,即可解密
```xml
GET /key.html HTTP/1.1
Host: localhost
HTTP/1.1 200 OK
Date: Fri... | sec-knowleage |
# Bypass 403 (Forbidden)
1. Using "X-Original-URL" header
```
GET /admin HTTP/1.1
Host: target.com
```
Try this to bypass
```
GET /anything HTTP/1.1
Host: target.com
X-Original-URL: /admin
```
2. Appending **%2e** after the first slash
```
http://target.com/admin => 403
```
Try this to bypass
```
http://target.com/%2e/... | sec-knowleage |
# T1608-002-阶段性能力-上传工具
## 来自ATT&CK的描述
攻击者可能会将工具上传到第三方或攻击者控制的基础设施上,使其在目标攻击期间可以使用。工具可以是开放或闭源的,免费或商业的。工具可被攻击者用于恶意目的,但这些工具的设计初衷(与恶意软件不同)并不打算用于这些目的(例如:PsExec)。攻击者可能会上传工具以支持他们的行动,例如将工具放在互联网可访问的网络服务器上,让受害者网络可以使用,以实现入侵工具传输。
工具可能被放置在攻击者之前购买或租用的基础设施上(购买基础设施),或者被他们以其他方式破坏(盗取基础设施)。工具也可以被放置在网络服务上,例如攻击者控制的GitHub repo。
攻击者可以通过让被攻击的受害... | sec-knowleage |
# Cross Site Request Forgery (CSRF)
## Introduction
Cross-Site Request Forgery (CSRF/XSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated
## Where to find
Usually found in forms. Try submit the form and check the HTTP request. If the HTTP r... | sec-knowleage |
# MSSQL 搭建
---
先通过 ps 脚本安装 chrome
```
set-ExecutionPolicy Unrestricted
curl -o f8x.ps1 https://f8x.io/ps1
Unblock-File .\f8x.ps1
.\f8x.ps1
```
在看到 Successfully installed chrome 的时候就可以 ctrl+c 退出 ps 脚本了
访问 https://www.microsoft.com/zh-CN/download/details.aspx?id=42299 ,下载 SQLEXPRADV_x64_CHS.exe
通过服务器管理器,添加功能,安装 .NET Fram... | sec-knowleage |
.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\" and 1999 by Bruno Haible (haible@clisp.cons.org)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to... | sec-knowleage |
# Nginx 文件名逻辑漏洞(CVE-2013-4547)
影响版本:Nginx 0.8.41 ~ 1.4.3 / 1.5.0 ~ 1.5.7
参考链接:
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4547
- https://blog.werner.wiki/file-resolution-vulnerability-nginx/
- http://www.91ri.org/9064.html
## 漏洞原理
这个漏洞其实和代码执行没有太大关系,其主要原因是错误地解析了请求的URI,错误地获取到用户请求的文件名,导致出现权限绕过、代码执行的连... | sec-knowleage |
# T1190-联软任意文件上传
## 来自ATT&CK的描述
使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。
如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。
对于网站和数据库,OWASP排名前10位和CWE排名前25位突出... | sec-knowleage |
# DERPNSTINK: 1
> https://download.vulnhub.com/derpnstink/VulnHub2018_DeRPnStiNK.ova
靶场IP:`192.168.32.215`
扫描对外端口服务
```
┌──(root💀kali)-[/tmp]
└─# nmap -p 1-65535 -sV 192.168.32.215
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-08 04:05 EDT
Nmap scan report for 192.168.32.215
Host is up (0.00051s latency).
Not sh... | sec-knowleage |
'\"
'\" Copyright (c) 1993-1997 Bell Labs Innovations for Lucent Technologies
'\" Copyright (c) 1997 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: namespace.n,v 1.2 2003/11/24 05:0... | sec-knowleage |
# T1057-win-进程发现
## 来自ATT&CK的描述
攻击者可能试图获取有关在系统上运行进程的信息。获得的信息可用于了解网络内系统上运行的通用软件。攻击者可以在自动发现过程中使用来自过程发现的信息来塑造后续行为,包括攻击者是否完全感染目标和/或尝试特定操作。
windows
使用tasklist实用程序获得进程详细信息的示例命令是“tasklist”。
Mac和Linux
在Mac和Linux中,这是通过ps命令完成的。
类似于T1603-win-安全软件发现,具体测试案例及详细信息可参考T1063。
## 测试案例
windows本地执行Tasklist
## 检测日志
windows 安全日志
linux日志
## 测... | sec-knowleage |
# Boxes of ballots (crypto 200)
###ENG
[PL](#pl-version)
In the task we get access to some AES-CBC encryption service.
There was some debug mode avaialble which apparently could be used to extract some of the server code, but this was totally unnecessary.
If we send some payload we get encrypted results.
It's quite eas... | sec-knowleage |
rpmdb
===
初始化和重建RPM数据库
## 补充说明
**rpmdb命令** 用于初始化和重建rpm数据库。
### 语法
```shell
rpmdb(选项)
```
### 选项
```shell
--initdb:初始化RPM数据库;
--rebuilddb:从已安装的包头文件,反向重建RPM数据库。
``` | sec-knowleage |
# Episode 3: Challenge 1
## Description
> Can you hunt down the secret corporate documents? socat FILE:`tty`,raw,echo=0 TCP:multivision.h4ck.ctfcompetition.com:1337
>
> Hint: Find the key, and put RFC 6749 to use
## Solution
Let's connect to the server:
```console
┌──(user@kali)-[/media/sf_CTFs/h4ck1ng.google/EP003/C... | sec-knowleage |
# Cookie World Order
Category: Web
## Description
> Good job! You found a further credential that looks like a VPN referred to as the cWo. The organization appears very clandestine and mysterious and reminds you of the secret ruling class of hard shelled turtle-like creatures of Xenon. Funny they trust their security t... | sec-knowleage |
# Shodan Dorks
## Basic
### City:
Find devices in a particular city.
```
city:"Bangalore"
```
### Country:
Find devices in a particular country.
```
country:"IN"
```
### Geo:
Find devices by giving geographical coordinates.
```
geo:"56.913055,118.250862"
```
### Location
```
country:us
country:ru
city:chicago
country:r... | sec-knowleage |
# Gibson9000 - Pwn (100 + 0), 15 solves
> Can you program our new line of Gibson 9000 Calcumatron CPUs?
In this task we were given a short `README` file describing a custom computer architecture, and a `host:port`
running an emulator for the arch. The description hinted at possibility of the bug in the emulator
("emul... | sec-knowleage |
# PHPUnit Remote Code Execution (CVE-2017-9841)
[中文版本(Chinese version)](README.zh-cn.md)
PHPUnit is a programmer-oriented testing framework for PHP.
`Util/PHP/eval-stdin.php` in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a `<?php... | sec-knowleage |
.\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
.\" Fri Apr 2 11:32:09 MET DST 1993
.\"
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" 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; ei... | sec-knowleage |
---
title: C++
date: 2021-06-01 11:51:44
background: bg-[#6d94c7]
tags:
categories:
- Programming
intro: |
C++ quick reference cheat sheet that provides basic syntax and methods.
plugins:
- copyCode
---
Getting Started
--------
### hello.cpp
```cpp
#include <iostream>
int main() {
std::cout << "Hello Quic... | 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: flush.n,v 1.2 2003/11/24 05:09:59 ... | sec-knowleage |
# T1583-006-购买基础设施-web服务
## 来自ATT&CK的描述
攻击者可以注册可在攻击目标期间使用的网络服务。有各种流行的网站供攻击者注册基于网络的服务,这些服务可以在攻击生命周期的后期阶段被滥用,例如在指挥和控制(网络服务)或通过网络服务渗透期间。使用常见的服务,如谷歌或Twitter提供的服务,使攻击者更容易隐藏在预期的噪音中。通过利用网络服务,攻击者可以使其难以在物理上(威胁追溯上)将行动与之联系起来。
## 测试案例
利用github web服务构建恶意下载链接等。
## 检测日志
无法有效监测
## 测试复现
无
## 测试留痕
无
## 检测规则/思路
无
## 建议
### 缓解措施
这种技术不容易用预... | sec-knowleage |
# Vaccine Distribution Center
Let's take a look at the source code. The task consists of 3 part:
Backend, Frontend and VIP.
`Backend` is a simple php-nginx container with the actual challenge code.
`Frontend` is HAProxy container. This is the user-facing service that redirects HTTP requests to `Backend`
`VIP` is the bo... | sec-knowleage |
## 外观(Facade)
### Intent
提供了一个统一的接口,用来访问子系统中的一群接口,从而让子系统更容易使用。
### Class Diagram
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/f9978fa6-9f49-4a0f-8540-02d269ac448f.png"/> </div><br>
### Implementation
观看电影需要操作很多电器,使用外观模式实现一键看电影功能。
```java
public class SubSystem {
public vo... | sec-knowleage |
'\" t
.TH "BOOTUP" "7" "" "systemd 231" "bootup"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.or... | sec-knowleage |
---
title: S3 介绍
---
<center><h1>S3 介绍</h1></center>
---
对象存储(Object-Based Storage),也可以叫做面向对象的存储,现在也有不少厂商直接把它叫做云存储。
说到对象存储就不得不提 Amazon,Amazon S3 (Simple Storage Service) 简单存储服务,是 Amazon 的公开云存储服务,与之对应的协议被称为 S3 协议,目前 S3 协议已经被视为公认的行业标准协议,因此目前国内主流的对象存储厂商基本上都会支持 S3 协议。
在 Amazon S3 标准下中,对象存储中可以有多个桶(Bucket),然后把对象(Object)放在桶里,... | sec-knowleage |
# Cacti 前台命令注入漏洞(CVE-2022-46169)
Cacti是一个服务器监控与管理平台。在其1.2.17-1.2.22版本中存在一处命令注入漏洞,攻击者可以通过X-Forwarded-For请求头绕过服务端校验并在其中执行任意命令。
参考链接:
- <https://github.com/Cacti/cacti/security/advisories/GHSA-6p93-p743-35gf>
- <https://mp.weixin.qq.com/s/6crwl8ggMkiHdeTtTApv3A>
## 漏洞环境
执行如下命令启动一个Cacti 1.2.22版本服务器:
```
docker compos... | sec-knowleage |
## Try harder! (misc/stego, 200p)
### PL Version
[ENG](#eng-version)
W zadaniu dostajemy dwa archiwa:
* gzip o nazwie part0
* zip o nazwie part3, wymagające hasła do dekodowania
Rozpoczęliśmy od analizy archiwum part0 i pierwsze co rzuciło sie w oczy to fakt, że 4MB archiwum dekompresowało sie do 4GB pliku jpg. Analiz... | sec-knowleage |
# stringzz
Binary Exploitation, 300 points
## Description:
> Use a format string to pwn this program and get a flag.
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define FLAG_BUFFER 128
#define LINE_BUFFER_SIZE 2000
void printMessage3(char *in)
{
puts("will be printed:\n");
printf(in);
}
void pri... | sec-knowleage |
## AES (crypto, 200p)
### PL Version
`for ENG version scroll down`
Zadanie polegało na odzyskaniu wektora inicjalizacyjnego IV dla szyfru AES na podstawie znajomości wiadomości, części klucza oraz części zaszyfrowanego tekstu. Dane były przekazane za pomocą pomazanego zdjęcia kodu:

Wynika z nich że dysponu... | sec-knowleage |
# Rot (Crypto)
The only thing we have in this challenge is the base64-encoded ciphertext:
```
JwxTBxELMFxDRUoaFU8BBwkAZz0tNjciQkZFMhEzQlpeEgMSBlQjFEoQXQAGEBYGDytLEFxdGhJf
UxYSRSg6YzQ8KkNGUDQKdl8fRQNMAxhVcRNdRBgLEx8MHRI2XFcRTBMEClIWAhA1PTcucyNWVUEy
DCURDlkVV1E+SSMDTRddGwIXQxAPLFFfR10JBE4PUzMKJTExI3MTUkNUMBZ2fBVDBkoC
```... | sec-knowleage |
# T1110-003-linux-ssh爆破
## 来自ATT&CK的描述
当密码未知时,攻击者可以使用暴力破解尝试获取访问帐户密码。攻击者在操作期间尝试暴力破解登录,这是一个风险较高的选项,因为它可能导致大量身份验证失败记录以及帐户锁定,账户锁定具体取决于所设置的登录失败策略。
通常,可以对使用常用端口上的服务进行密码喷射攻击。常见linux服务包括以下内容:
- SSH(22/TCP)
- Telnet(23/TCP)
- FTP(21/ TCP)
## 测试案例
以下经典工具可用于端口爆破:
- Hydra
- Medusa
- Patator
- Brutepray
- ……
## 检测日志
linux 系统日志(auth... | sec-knowleage |
stat
===
用于显示文件的状态信息
## 补充说明
**stat命令** 用于显示文件的状态信息。stat命令的输出信息比ls命令的输出信息要更详细。
### 语法
```shell
stat(选项)(参数)
```
### 选项
```shell
-L:支持符号连接;
-f:显示文件系统状态而非文件状态;
-t:以简洁方式输出信息;
--help:显示指令的帮助信息;
--version:显示指令的版本信息。
```
### 参数
文件:指定要显示信息的普通文件或者文件系统对应的设备文件名。
### 实例
```shell
[root@localhost ~]# ls -l myfile
-rw-r--r-- 1 root ... | sec-knowleage |
### Android 逆向基本介绍
首先,我们需要明确一下 Android 逆向的目的: **希望分析出程序的功能** 。那么我们自然也就有两个方面(方法与对象)可以考虑
- 分析方法,可以采用以下方式
- 静态分析,对源代码进行逆向,然后阅读分析
- 动态分析,对代码进行动态调试,一般来说动态分析离不开静态分析。
- 分析对象,一般有以下两类对象
- java,层代码
- 原生层代码
不难看出,要想分析 Android 应用,基本的 java 层的知识与原生层的知识还是有必要掌握的。
目前来说,Android 逆向主要应用于以下几个方向
1. app 安全审查
2. 系统漏洞挖掘
3. 恶意代码杀... | sec-knowleage |
---
title: JSON
date: 2021-09-14 18:26:55
background: bg-[#646464]
tags:
- config
- format
categories:
- Programming
intro: |
This is a quick reference cheat sheet for understanding and writing JSON format configuration files.
plugins:
- copyCode
---
Getting Started
---------------
### Introduction
[JS... | sec-knowleage |
### Delegatecall三种调用函数
在 Solidity 中,call 函数簇可以实现跨合约的函数调用功能,其中包括 call、delegatecall 和 callcode 三种方式。
#### 调用模型
```
<address>.call(...) returns (bool)
<address>.callcode(...) returns (bool)
<address>.delegatecall(...) returns (bool)
```
这些函数提供了灵活的方式与合约进行交互,并且可以接受任何长度、任何类型的参数,其传入的参数会被填充至 32 字节最后拼接为一个字符串序列,由 EVM 解析执行。
在函数调用... | sec-knowleage |
.\" -*- nroff -*-
.\" Copyright (c) 1999, 2000 SuSE GambH Nuernberg, Germany
.\" Author: Thorsten Kukuk <kukuk@suse.de>
.\"
.\" 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... | sec-knowleage |
# Joomla HTTP Header Unauthenticated Remote Code Execution (CVE-2015-8562)
[中文版本(Chinese version)](README.zh-cn.md)
Joomla is a free and open-source content management system (CMS) that allows users to build websites and online applications. It was first released in 2005 and has since become one of the most popular C... | sec-knowleage |
##Cook (Recon, 300p)
Still Hungry and unsutisfied, you are looking for more.
Some more, unique un heard dishes.
Then you can find one to make it your self.
Its his Dish.
He has his own website which is he describes as " a social home for each of our passions".
The link to his website is on his google+ page.... | sec-knowleage |
pigz
===
可以用来解压缩文件,gzip的并行实现升级版
## 补充说明
**pigz命令**可以用来解压缩文件,最重要的是支持多线程并行处理,解压缩比gzip快。主页: [http://zlib.net/pigz/](http://zlib.net/pigz/)
### 语法
```shell
pigz [ -cdfhikKlLmMnNqrRtz0..9,11 ] [ -b blocksize ] [ -p threads ] [ -S suffix ] [ name ... ]
unpigz [ -cfhikKlLmMnNqrRtz ] [ -b blocksize ] [ -p threads ] [ -S suffi... | sec-knowleage |
# Mr.Voorhees
* Category: Web
* 200 Points
* Solved by the JCTF Team
## Description
> In reality, there's no such thing as bad luck.
>
> Friday is just a day like any other day.
>
> Also, there's no such thing as bad algorithm.
>
> The one I used should be secure enough.
>
> Right?
## Solution
We enter the attac... | sec-knowleage |
rpm
===
RPM软件包的管理工具
## 补充说明
**rpm命令** 是RPM软件包的管理工具。rpm原本是Red Hat Linux发行版专门用来管理Linux各项套件的程序,由于它遵循GPL规则且功能强大方便,因而广受欢迎。逐渐受到其他发行版的采用。RPM套件管理方式的出现,让Linux易于安装,升级,间接提升了Linux的适用度。
### 语法
```shell
rpm(选项)(参数)
```
### 选项
```shell
-a:查询所有套件;
-b<完成阶段><套件档>+或-t <完成阶段><套件档>+:设置包装套件的完成阶段,并指定套件档的文件名称;
-c:只列出组态配置文件,本参数需配合"-l"参数使用;
-d:... | sec-knowleage |
# 错误处理与异常
---
- https://www.kancloud.cn/imxieke/ruby-base/107297
---
# 关于错误处理
在程序执行的过程中,通常会有以下错误发生:
- 数据错误
在计算家庭收支的时候,若在应该写金额的一栏上填上了商品名,那么就无法计算。此外,HTML 这种格式的数据的情况下,如果存在没有关闭标签等语法错误,也会导致无法处理数据。
- 系统错误
硬盘故障等明显的故障,或者没把 CD 插入到驱动器等程序无法恢复的问题。
- 程序错误
因调用了不存在的方法、弄错参数值或算法错误而导致错误结果等,像这样,程序本身的缺陷也可能会导致错误。
程序在运行时可能会遇... | sec-knowleage |
---
title: HTML
date: 2021-07-20 19:16:42
background: bg-[#cc5534]
tags:
- web
categories:
- Programming
intro: |
This HTML quick reference cheat sheet lists the common HTML and HTML5 tags in readable layout.
plugins:
- copyCode
---
Getting Started
------------
### hello.html {.col-span-2 .row-span-2}
`... | sec-knowleage |
**Authors**: < [nixawk](https://github.com/nixawk) >
----
#Mongodb Hacking#
```
1. Introduction and Lab Setup.
1.1 What is MongoDB ?
1.2 How about Security ?
1.3 Installing MongoDB in Kali
1.4 Playing with Mongo Shell
1.4.1 Creating a database
1.4.2 Checking current database
1.4.3 Check... | sec-knowleage |
# cisco-global-exploiter介绍
Cisco Global Exploiter (CGE), 一个高级、简单和快速的安全测试工具。
[cisco-global-exploiter主页](http://www.blackangels.it/) | [Kali cisco-global-exploiter地址](http://git.kali.org/gitweb/?p=packages/cisco-global-exploiter.git;a=summary)
作者: Nemesis, E4m
协议: GPLv2
# cisco-global-exploiter拥有的工具
cge.pl – Simple and f... | sec-knowleage |
perl
===
perl语言解释器
## 补充说明
**perl命令** 是perl语言解释器,负责解释执行perl语言程序。
### 语法
```shell
perl(选项)(参数)
```
### 选项
```shell
-w:输出有用的警告信息;
-U:允许不安全的操作;
-c:仅检查文件的语法;
-d:在调试下运行脚本程序。
```
### 参数
文件:要运行的perl脚本程序。 | sec-knowleage |
---
title: Taskset
date: 2023-04-07 14:25:44
background: bg-[#8bbb55]
tags:
- process
- process manager
categories:
- Linux Command
intro:
The taskset command is used to set or retrieve the CPU affinity
of a running process given its pid, or to launch a new command
with a given CPU affinity.
plu... | sec-knowleage |
# Bypass 429 (Too Many Requests)
1. Try add some custom header
```
X-Forwarded-For : 127.0.0.1
X-Forwarded-Host : 127.0.0.1
X-Client-IP : 127.0.0.1
X-Remote-IP : 127.0.0.1
X-Remote-Addr : 127.0.0.1
X-Host : 127.0.0.1
```
For example:
```
POST /ForgotPass.php HTTP/1.1
Host: target.com
X-Forwarded-For : 127.0.0.1
...
ema... | sec-knowleage |
'\" t
.TH "SYSTEMD\-DELTA" "1" "" "systemd 231" "systemd-delta"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http:/... | sec-knowleage |
# Matrix CTF 2020 - אתגר מטריקס 2020
Writeups for the 2020 Matrix CTF.
Solved with YaakovC.
Additional resources (including other writeups) can be found [here](https://github.com/Dvd848/CTFs/discussions/12). | sec-knowleage |
# Encrypted Pastebin - FLAG0
## 0x00 Home

## 0x01 Try Post
[http://127.0.0.1/xxxxxxxxxx/?post=6ybKGEfF47eN1k5eyj!lsraaVXFME-xBz51ocCeiAZPULUMIemubmPanqBO04ixb-01L-Qek7nUeXitmNAEMNrJ5BbfeP5GWD1hYEuHciAk81fRa4IyuvmcIG3sE1K11mM7s7hA1P1mChArqJR4i5wSrOF7O561nOHu!lGQcA1iFos-jU6x7iy-TJ4iI4yZjnHkcdXT2F9y6f... | sec-knowleage |
# 线下攻防经验小结
首先,正常比赛会提供提交 flag 的接口,接口地址类似 `http://172.16.4.1/Common/submitAnswer`。一般我们需要根据主办方给出的文档要求通过接口提交 flag。在比赛中要求接口地址使用 Post 方式提交,提交时带两个参数,一个是 `Answer`,其值为获取到的 flag 字符串,而另一个则是 `token` ,其值为各个队伍的队伍 Token。
然后比赛时主办方也会给每个参赛队伍提供一台用于 **分析网络流量的虚拟机** ,选手需要访问地址下载流量文件进行分析。
## 关注 Gamebox 状态
比赛中可以查看己方和敌方 GameBox 状态。时刻关注可以尽早获取比赛... | sec-knowleage |
.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993
.\"
.\" 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... | sec-knowleage |
# RSA 数字签名
## 原理
原理类似于 RSA 加密,只是这里使用私钥进行加密,将加密后的结果作为签名。
## 2018 Backdoor Awesome mix1
首先,可以简单分析源码,这里程序使用 PKCS1_V1.5 进行了 RSA 签名,这会对明文消息进行扩展,具体扩展规则请参考 https://www.emc.com/collateral/white-papers/h11300-pkcs-1v2-2-rsa-cryptography-standard-wp.pdf 。这里给出对应扩展脚本,对应于题目中的 `from Util import PKCS1_pad as pad`
```python
def PKCS1... | sec-knowleage |
# Airdrop Hunting
## 原理
薅羊毛攻击指使用多个不同的新账户来调用空投函数获得空投币并转账至攻击者账户以达到财富累计的一种攻击方式。这类攻击方式较为普通且常见,只要是有空投函数的合约都能够进行薅羊毛。其中首个自动化薅羊毛攻击出现在 [Simoleon](https://paper.seebug.org/646/) 上。
## 例子
以数字经济大赛 2019 的 jojo 一题为例,讲解一下如何进行薅羊毛攻击。题目合约的源码如下:
```solidity
pragma solidity ^0.4.24;
contract jojo {
mapping(address => uint) public bala... | sec-knowleage |
#!/usr/bin/env python3
from builtins import bytes
from builtins import map
from builtins import zip
from builtins import range
import struct
import argparse
import random
import string
AVI_HEADER = b"RIFF\x00\x00\x00\x00AVI LIST\x14\x01\x00\x00hdrlavih8\x00\x00\x00@\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\... | sec-knowleage |
# 十一、SQL 注入
> 作者:Peter Yaworski
> 译者:[飞龙](https://github.com/)
> 协议:[CC BY-NC-SA 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/)
## 描述
SQL 注入,或者 SQLi 允许黑客将 SQL 语句注入到目标中并访问它们的数据库。它的潜力是无穷的,通常使其成为高回报的漏洞,例如,攻击者能够执行所有或一些 CURD 操作(创建、读取、更新、删除)来获取数据库信息。攻击者甚至能够完成远程命令执行。
SQLi 攻击通常是未转义输入的结果,输入被传给站点,并用作数据库查询的一部分。它的一个例子是:
`... | sec-knowleage |
version: '3'
services:
web:
image: vulhub/tikiwiki:21.1
entrypoint:
- bash
- /docker-entrypoint.sh
depends_on:
- db
ports:
- "8080:80"
environment:
- TIKI_DB_DRIVER=pdo
- TIKI_DB_HOST=db
- TIKI_DB_USER=root
- TIKI_DB_PASS=root
- TIKI_DB_NAME=tikiwiki
volumes:
... | sec-knowleage |
# Express
> Express 基于 Node.js 平台,快速、开放、极简的 web开发框架(后端)
官网首页上,我们一眼就能看到 API 这个关键字,那么 API 是用来做什么的呢?
### 什么是API
API ( Application Program Interface )是应用开发接口,简称接口,
而 Express 就是用来制作后台 API 的。
### Express使用的语法
前端代码,因为有 Babel 的支持,可以全部采用 ES6来写。
后台代码,我们会让它直接运行在 Nodejs上 (eg. java运行在jvm上)
我们在 [Node.green](http://node.green/) 网站上,可... | sec-knowleage |
**注:**请多喝点热水或者凉白开,身体特别重要。
本季补充本地DLL加载
**Msiexec简介:**
Msiexec是Windows Installer的一部分。用于安装Windows Installer安装包(MSI),一般在运行Microsoft Update安装更新或安装部分软件的时候出现,占用内存比较大。并且集成于Windows 2003,Windows 7等。
**说明:**Msiexec.exe所在路径已被系统添加PATH环境变量中,因此,Msiexec命令可识别。
### 基于白名单Msiexec.exe配置payload:
**注:x64 payload**
```bash
msfvenom ‐p windo... | sec-knowleage |
---
title: Bucket Object 遍历
---
<center><h1>Bucket Object 遍历</h1></center>
---
在 s3 中如果在 Bucket 策略处,设置了 s3:ListBucket 的策略,就会导致 Bucket Object 遍历
</br>
<img width="1000" src="/img/1652254813.png"></br>
将 Key 里的值拼接到目标站点后,就能访问该 Bucket 里相应的对象了
<Vssue />
<script>
export default {
mounted () {
this.$page.lastUpdated... | sec-knowleage |
---
title: k8s 下挂载 /var/log 逃逸
---
<center><h1>k8s 下挂载 /var/log 逃逸</h1></center>
---
## 0x00 前言
这里用单纯的挂载/var/log 来形容这个逃逸的触发条件其实不太严谨,需要满足如下条件。
- 挂载了/var/log
- 容器是在一个 k8s 的环境中
- 当前 pod 的 serviceaccount 拥有 get|list|watch log 的权限
## 0x01 环境搭建
```bash
git clone https://github.com/Metarget/metarget.git
cd metarget/
pip3 inst... | sec-knowleage |
.TH LOADKEYS 1 "09 Oct 1997" "Console tools" "Linux User's Manual"
.SH NAME
loadkeys \- 调入键盘翻译表
.SH "总览 (SYNOPSIS)"
.B loadkeys [
.I \-d \-\-default
.B ] [
.I \-h \-\-help
.B ] [
.I \-q \-\-quiet
.B ] [
.I \-v \-\-verbose
.B [
.I \-v \-\-verbose
.B ]...] [
.I \-m \-\-mktable
.B ] [
.I \-c \-\-clearcompose
.B ] [
.I \-s... | sec-knowleage |
# XSS
<p align="center">
<img src="../../../../../assets/img/banner/xss.jpg" width="65%">
</p>
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**相关文章**
- [XSS 插入绕过一些方式总结](https://blog.csdn.net/qq_29277155/article/details/51320064)
- [XSS 总结](https://xz.aliyun.com/t/4067)
- [WAF的 XSS 绕过姿势](https... | sec-knowleage |
# Hello World!
## [Flag0](./flag0) -- Found
- What does the application do?
- Where does your input go?
- Look for interesting functions | sec-knowleage |
**Authors**: < [nixawk](https://github.com/nixawk) >
----
# Post Exploitation - Windows
Post exploitation is a critical component in any penetration test. This is where you differentiate yourself from the average, run-of-the-mill hacker and actually provide valuable information and intelligence from your penetration te... | sec-knowleage |
### ICS_CTF 竞赛国内工控比赛考察点
采用CTF分类模型,总结分析当前工控ICS比赛中的关键点
|比赛类型|考察点|与CTF异同|
|-------|------|-------|
|内网渗透|Web 端渗透测试、CMS 系统、工控发布展示系统、数据库系统|与 Web 渗透相关
|逆向分析|固件分析、工控软件逆向|实际场景逆向|
|工控协议|工控流量分析、Misc 类|Misc 流量分析,工控场景流量特征|
|工控编程|PLC 编程、HMI 组态、RTU 编程等|工控实际组态软件使用,梯形图识别与分析|
根据漏洞类型其实还可以区分细化题目类型,包括常见的 Web 注入类、固件弱口令、后门程序、协议重放与逻辑问题、组态部署问... | sec-knowleage |
---
title: 在实例上执行命令
---
## 在阿里云上执行命令
### 执行单行命令
在执行命令前,如果未指定具体的实例,则 CF 会提醒是否是选择全部实例还是某个实例。
使用 `-c` 参数执行单个命令
```bash
cf alibaba ecs exec -c whoami
```
指定某个实例执行命令
```bash
cf alibaba ecs exec -c whoami -i i-abcdefghijklmn
```
::: warning 注意
在 CF 中 Windows 系统默认会以 bat 脚本执行命令,如果想执行 PowerShell 下的命令,可以使用 `-s ps` 或者 `--scriptTy... | sec-knowleage |
# Faculta Necshevet Identifier
Category: Reversing & Binary Exploitation
## Description
> DuckyDebugDuck decided to continue development on his "Faculta Necshevet Identifier" from the initial challenge and finally finished the first version, he told us that if you're from a "Faculta Necshevet" then you'll get a flag!
... | sec-knowleage |
---
title: PHP
date: 2021-01-04 15:23:28
background: bg-[#7477a9]
tags:
- web
categories:
- Programming
intro: |
This [PHP](https://www.php.net/manual/en/) cheat sheet provides a reference for quickly looking up the correct syntax for the code you use most frequently.
plugins:
- copyCode
---
Getting St... | sec-knowleage |
---
title: Origami Studio
date: 2022-11-23 16:23:31.695481
background: bg-[#4a8eee]
label: Mac
tags:
-
- mac
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 71 keyboard shortcuts found in Origami Studio. This application is MacOS-only.
---
Keyboard Shortcuts
------------------
#... | sec-knowleage |
# Unbreakable (crypto 200)
###ENG
[PL](#pl-version)
In the task we get a list of ciphertexts:
```
4afa32e89fce5fb84c1307e727f117cc999bc443cb646149aecc45df146f50803ca153e101d9b31eee0ac0c3c017b963ef3b74abc528422d08149e2c61a2c83573989368467b3c0696a63686cf4dfd0e8fb7ca943769554f6ddeed6be47a3dbc8695a26f148641619ceac19cd1e62b... | sec-knowleage |
#Flick: 1#
----
**Author**: Leonjza
**Links**: https://leonjza.github.io/blog/2014/08/07/flick-can-you-find-the-flag/
----
##Description##
```
.o88o. oooo o8o oooo
888 `" `888 `"' `888
o888oo 888 oooo .ooooo. 888 oooo
888 888 `888 d88' `"Y8 888 .8P'
888 888 888 88... | sec-knowleage |
# 无字母数字Webshell
---
**相关文章 & Source & Reference**
- [记一次拿webshell踩过的坑(如何用PHP编写一个不包含数字和字母的后门)](https://www.cnblogs.com/ECJTUACM-873284962/p/9433641.html)
- [一些不包含数字和字母的webshell](https://www.leavesongs.com/PENETRATION/webshell-without-alphanum.html)
- [无字母数字Webshell之提高篇](https://www.freebuf.com/articles/web/186298.html)
... | sec-knowleage |
# WebProxy Nightmare
* Category: Web
* 400 Points
* Solved by the JCTF Team
## Description
> I have implemented WAF! but again all my data is leaking! HELP ME
>
> URL: http://webproxy2.ctf.bsidestlv.com:8002/?csurl=https://gdpr-info.eu/
>
> Note: please include the BSidesTLV cookie
## Solution
This is the follow-up c... | sec-knowleage |
# Vision
Category: AI Research, 250 points
## Description
> During your research on image similarity methods, you discover a corpus made of images, only to find out that the original images were deleted by their creator and only their 512D feature vector was saved. You are now provided with a single such binary vector ... | sec-knowleage |
# Tokyo Westerns CTF 2018
Team: robert, shalom, nazywam, pwn.m0d3, des, akrasuski1, msm, sasza
### Table of contents
* [Matrix Led (re)](matrix_led)
* [SCS7 (crypto)](crypto_scs7)
* [Revolutional Secure Angou (crypto)](crypto_rsa)
* [Mixed cipher(crypto)](crypto_mixed)
* [PySandbox 1&2 (misc)](misc_pysandbox)
* [Shrine... | sec-knowleage |
# 填充方式
正如我们之前所说,在分组加密中,明文的长度往往并不满足要求,需要进行 padding,而如何 padding 目前也已经有了不少的规定。
常见的 [填充规则]( https://www.di-mgt.com.au/cryptopad.html) 如下。**需要注意的是,即使消息的长度是块大小的整数倍,仍然需要填充。**
一般来说,如果在解密之后发现 Padding 不正确,则往往会抛出异常。我们也因此可以知道 Paddig 是否正确。
## Pad with bytes all of the same value as the number of padding bytes (PKCS5 padding)
举例子如下
... | sec-knowleage |
---
title: ES6
---
### 什么是ES6?
2015年6月17日,ECMA国际组织发布了 ECMAScript 的第六版,该版本正式名称为ECMAScript 2015(ES2015),但通常被称为 ECMAScript 6 或者ES6。
### ECMAScript 和 JavaScript 的关系?
ECMAScript 和 JavaScript 的关系是,前者是后者的规格,后者是前者的一种实现(另外的 ECMAScript 方言还有 Jscript 和 ActionScript)。日常场合,这两个词是可以互换的。
### Babel 转码器
Babel是一个广泛使用的ES6转码器,可以将 ES6 代码转为 E... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.