text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
# 启动过程
---
## 开机前
### Wake-on-LAN
OFF 状态表示系统没有上电,没错吧?表面简单,其实不然。例如,如果系统启用了局域网唤醒机制(WOL),以太网指示灯将亮起。通过以下命令来检查是否是这种情况:
```bash
ethtool <interface name>
```
其中 `<interface name>` 是网络接口的名字,比如 eth0。(ethtool 可以在同名的 Linux 软件包中找到。)如果输出中的 Wake-on 显示 g,则远程主机可以通过发送 `魔法数据包` 来启动系统。如果无意远程唤醒系统,也不希望其他人这样做,请在系统 BIOS 菜单中将 WOL 关闭,或者用以下方式:
`... | sec-knowleage |
# VeggieTales
Pwn, 489 points
## Description:
> It's my favorite show to watch while practicing my python skills! I've seen episode 5 at least 13 times.
## Solution:
Let's connect to the service and check it out:
```console
root@kali:/media/sf_CTFs/tamu/VeggieTales# nc pwn.tamuctf.com 8448
Do you like VeggieTales??
1. ... | sec-knowleage |
# Data and Mining (Forensics, 137p)
In the task we get a rather large pcapng file (230 MB!), but the task was actually rather trivial because the flag was written in plaintext.
Since we didn't expect it to be so, we first did load the file into Network Miner and Wireshark to see what exactly we have there.
Most of is w... | sec-knowleage |
import argparse
import re
from Crypto.Util.number import long_to_bytes
from crypto_commons.generic import chunk
def reverse_dict_with_iterable(dictionary):
rev = {}
for key, value in dictionary.items():
for item in value:
rev[item] = key
return rev
TYPES_TO_INSTRUCTION = {
'U_T... | sec-knowleage |
# KipodStab
Web, 5 points
## Description
> The one who stabbed me will never be exposed.
## Solution
Entering the provided link, we are presented with the Apache2 Debian Default Page ("It works!").
After basic enumeration did not lead anywhere, the next step was calling `dirseach` - a lightweight `dirbuster` clone whic... | sec-knowleage |
---
title: Swift
date: 2023-02-28 14:50:01
background: bg-[#eb4e38]
tags:
- Apple
- iOS
- iPadOS
categories:
- Programming
intro: |
This cheat sheet provides examples of using Swift that cover basic Swift knowledge, control flow etc.
plugins:
- copyCode
---
Getting Started
---
### Variable {.row... | sec-knowleage |
## Content Provider文件目录遍历漏洞
> 阿里无线安全团队发表于2015年03月11日
### 漏洞描述
Android Content Provider存在文件目录遍历安全漏洞,该漏洞源于对外暴露Content Provider组件的应用,没有对Content Provider组件的访问进行权限控制和对访问的目标文件的Content Query Uri进行有效判断,攻击者利用该应用暴露的Content Provider的openFile()接口进行文件目录遍历以达到访问任意可读文件的目的。
#### google 官方描述
在导出的 ContentProviders 中实现 openFile 时,如果不能正确验证... | sec-knowleage |
.\" This man page is Copyright (C) 1999 Andi Kleen .
.\" Permission is granted to distribute possibly modified copies
.\" of this page provided the header is included verbatim,
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.TH TCP 7 "25 Apr 1999" "Linux Man P... | sec-knowleage |
losetup
===
设定与控制循环(loop)设备
## 补充说明
**losetup命令** 用来设置循环设备。循环设备可把文件虚拟成块设备,籍此来模拟整个文件系统,让用户得以将其视为硬盘驱动器,光驱或软驱等设备,并挂入当作目录来使用。
### 语法
```shell
losetup [ -e encryption ] [ -o offset ] loop_device file
losetup [ -d ] loop_device
```
### 选项
```shell
-a 显示所有循环设备的状态。
-d 卸除设备。
-e <加密选项> 启动加密编码 。
-f 寻找第一个未使用的循环设备。
-o <偏移量>设置数据偏移... | sec-knowleage |
If you have upload access to a non /cgi-bin folder - upload a httpd.conf and configure your own interpreter.
Details from Busybox httpd.c
https://github.com/brgl/busybox/blob/abbf17abccbf832365d9acf1c280369ba7d5f8b2/networking/httpd.c#L60
> *.php:/path/php # run xxx.php through an interpreter`
> If a sub directory c... | sec-knowleage |
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.util.List;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
import com.sun.net... | sec-knowleage |
# Captcha Revenge (Web)
In the task we get a website which displays some brainfuck code and an audio captcha challenge.
If we have 0 captchas solved, it actually tells us the solution for the first one.
The goal is to get a certain number of correct, consecutive solutions.
Brainfuck part is rather trivial, we have chal... | sec-knowleage |
# TAMU CTF 2019
Writeups for various challenges from the 2019 [TAMU CTF competition](https://tamuctf.com/). | sec-knowleage |
### House Of Force介绍
House Of Force 属于 House Of XXX 系列的利用方法,House Of XXX 是 2004 年《The Malloc Maleficarum-Glibc Malloc Exploitation Techniques》中提出的一系列针对 glibc 堆分配器的利用方法。
但是,由于年代久远《The Malloc Maleficarum》中提出的大多数方法今天都不能奏效,我们现在所指的 House Of XXX 利用相比 2004 年文章中写的已有较大的不同。但是《The Malloc Maleficarum》依然是一篇推荐阅读的文章,你可以在这里读到它的原文:
htt... | sec-knowleage |
# nps
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**简介**
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。
**项目地址**
- https://github.com/ehang-io/nps
---
## 安装
linux 配置方式见如下链接🔗
- [nps安装配置](../../Integrated/Linux/Power-L... | sec-knowleage |
## 密码破解工具
|Password Attacks||||||
|:-:|:-:|:-:|:-:|:-:|:-:|
|[acccheck](acccheck.md)|Burp Suite|CeWL|chntpw|cisco-auditing-tool|CmosPwd|
|creddump|[crunch](crunch.md)|DBPwAudit|findmyhash|gpp-decrypt|hash-identifier|
|HexorBase|THC-Hydra|[John the Ripper](John%20the%20Ripper.md)|[Johnny](Johnny.md)|keimpx|Maltego Teeth... | sec-knowleage |
seq
===
以指定增量从首数开始打印数字到尾数
## 补充说明
**seq命令** 用于产生从某个数到另外一个数之间的所有整数。
### 语法
```shell
seq [选项]... 尾数
seq [选项]... 首数 尾数
seq [选项]... 首数 增量 尾数
```
### 选项
```shell
-f, --format=格式 使用printf 样式的浮点格式
-s, --separator=字符串 使用指定字符串分隔数字(默认使用:\n)
-w, --equal-width 在列前添加0 使得宽度相同
```
### 实例
**-f选项:指定格式**
```shell
#s... | sec-knowleage |
# T1190-CVE-2019-19781远程代码执行
## 来自ATT&CK的描述
使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。
如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。
对于网站和数据库,OWASP排名前10位... | 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 SLEEP 1 2022年9月 "GNU coreutils 9.... | sec-knowleage |
# librsvg XInclude 文件包含漏洞(CVE-2023-38633)
librsvg是一个用于处理SVG图片的开源依赖库。
librsvg支持XML中的XInclude规范,可以用于加载外部内容。在librsvg 2.56.3版本以前,由于处理路径存在逻辑错误,导致攻击者可以传入一个恶意构造的SVG图片,进而读取到任意文件。
参考链接:
- <https://www.canva.dev/blog/engineering/when-url-parsers-disagree-cve-2023-38633/>
- <https://gitlab.gnome.org/GNOME/librsvg/-/issues/996... | sec-knowleage |
## Ant Design
### 简介
Ant Design 是蚂蚁金服开发和正在使用的一套企业级的前端设计语言和基于 React 的前端框架实现。
### 安装
使用`npm-package`安装`ant-design`
```
npm install antd --save
```
### 引用
>使用`create-react-app`进行开发时,一般在`index.js`中引入`antd`的CSS
```
import 'antd/dist/antd.min.css'
```
>修改`import [需要的组件] from antd/lib/[需要的组件]`,引入需要的按钮组件
```
import Button from... | sec-knowleage |
# Nexus Repository Manager 3 远程命令执行漏洞(CVE-2020-10199)
Nexus Repository Manager 3 是一款软件仓库,可以用来存储和分发Maven、NuGET等软件源仓库。其3.21.1及之前版本中,存在一处任意EL表达式注入漏洞。
参考链接:
- https://support.sonatype.com/hc/en-us/articles/360044882533-CVE-2020-10199-Nexus-Repository-Manager-3-Remote-Code-Execution-2020-03-31
- https://github.com/threed... | sec-knowleage |
# Java 虚拟机
<!-- GFM-TOC -->
* [Java 虚拟机](#java-虚拟机)
* [一、运行时数据区域](#一运行时数据区域)
* [程序计数器](#程序计数器)
* [Java 虚拟机栈](#java-虚拟机栈)
* [本地方法栈](#本地方法栈)
* [堆](#堆)
* [方法区](#方法区)
* [运行时常量池](#运行时常量池)
* [直接内存](#直接内存)
* [二、垃圾收集](#二垃圾收集)
* [判断一个对象是否可被回收](#判断一个对象是否可被回收... | sec-knowleage |
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
This is a demo for CVE-2018-1000006</br>
Electron version:<script>document.write(process.versions['electron'])</script>.
</body>
</html> | sec-knowleage |
.\" grep man page
.if !\n(.g \{\
. if !\w|\*(lq| \{\
. ds lq ``
. if \w'\(lq' .ds lq "\(lq
. \}
. if !\w|\*(rq| \{\
. ds rq ''
. if \w'\(rq' .ds rq "\(rq
. \}
.\}
.de Id
.ds Dt \\$4
..
.TH GREP 1 "GNU Project"
.SH NAME
grep, egrep, fgrep \- 打印匹配给定模式的行
.SH 总览 SYNOPSIS
.B grep
.RI [ options ]
.I PATTERN
.RI [ FILE .... | sec-knowleage |
# Apache Airflow Command Injection in Example Dag (CVE-2020-11978)
[中文版本(Chinese version)](README.zh-cn.md)
Apache Airflow is an open source, distributed task scheduling framework. In the version prior to 1.10.10, there is a command injection vulnerability in the example DAG `example_trigger_target_dag`, which caused... | sec-knowleage |
# Counting (re, 246p)
> This strange program was found, which apparently specialises in counting. In order to find the flag, you need to output find what the output of ./counter 9009131337 is.
> code
> counter
In this challenge we were given two files: an ELF binary, and a small unknown file.
Running the binary with so... | sec-knowleage |
# Server Side Request Forgery (SSRF)
## Introduction
Server Side Request Forgery is a web application vulnerability that allows attackers to make outgoing requests originating from the vulnerable server
## Where to find
Usually it can be found in the request that contain request to another url, for example like this
``... | sec-knowleage |
# Truncated form (PPC, 208p, 19 solved)
In the task we connect to the server and we have to transform given prime to a very particular format.
For example for prime `p = 868687909307764501147060349605653041999229151489950514965301649295439020807494131325814865675340673135715073631764902639875388586413387565682677871906... | sec-knowleage |
# Powershell
## Summary
- [Powershell](#powershell)
- [Summary](#summary)
- [Execution Policy](#execution-policy)
- [Encoded Commands](#encoded-commands)
- [Constrained Mode](#constrained-mode)
- [Encoded Commands](#encoded-commands)
- [Download file](#download-file)
- [Load Powershell scripts](#load-powe... | sec-knowleage |
---
title: WordPress
date: 2022-11-23 16:23:31.697854
background: bg-[#434140]
label:
tags:
-
-
categories:
- Keyboard Shortcuts
intro: |
A visual cheat-sheet for the 34 keyboard shortcuts found in the WordPress visual editor
---
Keyboard Shortcuts {.cols-2}
------------------
### Editor I
Shortcut... | sec-knowleage |
## localStorage
### H5 Web存储(在客户端存储数据)
HTML5 提供了两种在客户端存储数据的新方法:
- `localStorage` - 没有时间限制的数据存储
- `sessionStorage` - 针对一个`session`的数据存储
之前,这些都是由`cookie`完成的。但是`cookie`不适合大量数据的存储,因为它们由每个对服务器的请求来传递,这使得`cookie`速度很慢而且效率也不高。
在 HTML5 中,数据不是由每个服务器请求传递的,而是只有在请求时使用数据。它使在不影响网站性能的情况下存储大量数据成为可能。
对于不同的网站,数据存储于不同的区域,并且一个网站只能访问其自身的数据... | sec-knowleage |
whatis
===
查询一个命令执行什么功能
## 补充说明
**whatis命令** 是用于查询一个命令执行什么功能,并将查询结果打印到终端上。
whatis命令在用`catman -w`命令创建的数据库中查找command参数指定的命令、系统调用、库函数或特殊文件名。whatis命令显示手册部分的页眉行。然后可以发出man命令以获取附加的信息。whatis命令等同于使用`man -f`命令。
### 语法
```shell
whatis
```
### 实例
```shell
[root@localhost ~]# whatis ls
ls (1) - list directory c... | sec-knowleage |
# It’s_October1-WalkThrough
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**靶机地址**
- https://www.vulnhub.com/entry/its-october-1,460/
**Description**
Welcome to "It’s October"
This boot to root VM is designed for testing your pentesting skills and concepts. It consists of some well known things b... | sec-knowleage |
# Ruby on Rails 路径穿越与任意文件读取漏洞(CVE-2019-5418)
在控制器中通过`render file`形式来渲染应用之外的视图,且会根据用户传入的Accept头来确定文件具体位置。我们通过传入`Accept: ../../../../../../../../etc/passwd{{`头来构成构造路径穿越漏洞,读取任意文件。
参考链接:
- https://groups.google.com/forum/#!topic/rubyonrails-security/pFRKI96Sm8Q
- https://xz.aliyun.com/t/4448
## 环境搭建
执行如下命令编译及启动Rail On... | sec-knowleage |
# Bad OTPxploited (RevCrypt 100)
> Security buzzwords are used by companies and individuals everywhere althought not all of them even follow good practices, some even provide closed source implementations. Someone published his own OTP library on a subreddit and claims it's unbeatable. Is it? 10.13.37.41
> https://dc... | sec-knowleage |
# ELK高级使用
## ElasticSearch
### ES插件
* **Head**
[官网地址](http://mobz.github.io/elasticsearch-head/)
[Chrome插件:ElasticSearch Head](https://chrome.google.com/webstore/search/elasticsearch)
* **ElasticHD**
### ElasticSearch创建template
```
curl -XPUT 'http://host/_template/primeledger' \
-H "Content-Type: application/json... | sec-knowleage |
# Bypass Captcha (Google reCAPTCHA)
1. Try changing the request method, for example POST to GET
```
POST / HTTP 1.1
Host: target.com
...
_RequestVerificationToken=xxxxxxxxxxxxxx&_Username=daffa&_Password=test123
```
Change the method to GET
```
GET /?_RequestVerificationToken=xxxxxxxxxxxxxx&_Username=daffa&_Password=te... | sec-knowleage |
import codecs
import os
from Crypto.Util.number import long_to_bytes
def asm(code):
code = code.replace("end", "")
payload = """(module
(func $dupa (result i32)
%s
)
(export "dupa" (func $dupa)))
""" % code
with codecs.open("code.wat", "w") as out_file:
out_file.write(payload)
os.system... | sec-knowleage |
version: '2'
services:
kibana:
image: vulhub/kibana:6.5.4
depends_on:
- elasticsearch
ports:
- "5601:5601"
elasticsearch:
image: vulhub/elasticsearch:6.8.6 | sec-knowleage |
.\" @(#)rpc.5 2.2 88/08/03 4.0 RPCSRC; from 1.4 87/11/27 SMI;
.TH RPC 5 "26 September 1985"
.SH NAME
rpc \- rpc 程序号数据库
.SH SYNOPSIS
.B /etc/rpc
.SH DESCRIPTION
.I rpc
文件列出了rpc 程序的可读名, 可以此代替rpc 程序号.
每行包含如下信息:
.HP 10
运行rpc 程序的服务名
.br
.ns
.HP 10
rpc 程序号
.br
.ns
.HP 10
别名
.LP
各条目之间以任意数目的空格和(或)tab 字符分隔. '#' 符号表明
后面是注释, 直到行... | sec-knowleage |
import os
import urllib
import urllib2
from PIL import Image
import io
def fix_colors(im):
colors_distribution = im.getcolors(1000)
ordered = sorted(colors_distribution, key=lambda x: x[0], reverse=True)
best_colors = [color[1] for color in ordered]
if (255, 255, 255) in best_colors:
best_colo... | sec-knowleage |
# 静态分析原生层程序
## 基本方法
静态分析原生层程序基本的过程如下
1. 提取 so 文件
2. ida 反编译 so 文件阅读 so 代码
3. 根据 java 层的代码来分析 so 代码。
4. 根据 so 代码的逻辑辅助整个程序的分析。
## 原生层静态分析例子
### 2015-海峡两岸-一个APK,逆向试试吧
#### 反编译
利用jadx反编译apk,确定应用的主活动
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app=... | sec-knowleage |
# Wireshark
<p align="center">
<img src="../../../assets/img/logo/wireshark.png" width="22%">
</p>
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**官网**
- https://www.wireshark.org/
**流量包资源**
- [Web 2.0 for packets | pcapr](https://www.pcapr.net/home) - 提供大量样本的社区
- [automayt/ICS-pcap](https://... | sec-knowleage |
# vault-door-3
Reverse Engineering, 200 points
## Description:
> This vault uses for-loops and byte arrays.
```java
import java.util.*;
class VaultDoor3 {
public static void main(String args[]) {
VaultDoor3 vaultDoor = new VaultDoor3();
Scanner scanner = new Scanner(System.in);
System.out.pr... | sec-knowleage |
**注:**请多喝点热水或者凉白开,可预防**肾结石,通风**等。
痛风可伴发肥胖症、高血压病、糖尿病、脂代谢紊乱等多种代谢性疾病。
### zipfldr.dll简介:
zipfldr.dll自Windows xp开始自带的zip文件压缩/解压工具组件。
**说明:**zipfldr.dll所在路径已被系统添加PATH环境变量中,因此,zipfldr.dll命令可识别,但由于为dll文件,需调用rundll32.exe来执行。
Windows 2003 默认位置:
```bash
C:\Windows\System32\zipfldr.dll
C:\Windows\SysWOW64\zipfldr.dll
```
Windows ... | sec-knowleage |
# GIT-SHELL 沙盒绕过(CVE-2017-8386)
GIT-SHELL 沙盒绕过(CVE-2017-8386)导致任意文件读取、可能的任意命令执行漏洞。
参考链接:
- https://insinuator.net/2017/05/git-shell-bypass-by-abusing-less-cve-2017-8386/
- https://www.leavesongs.com/PENETRATION/git-shell-cve-2017-8386.html
## 测试环境
编译及运行测试环境:
```
docker compose up -d
```
为了不和docker母机的ssh端口冲突,我将... | sec-knowleage |
# OTP Implementation
Category: Reverse Engineering
## Description
> Yay reversing!
A binary file and the following text file were attached:
```
1fcb81cd1f6f1e12b429092e3647153b6c212772554ca004145b82367e1e6b7870827dc249a319601776f727434e6b6227d1
```
## Solution
Let's run the attached binary:
```console
root@kali:/media/... | sec-knowleage |
from Crypto.Cipher import DES
ct=open("ciphertext","rb").read()
pt=[]
for i in range(16):
counts=[0]*256
for c in ct[i::16]:
counts[ord(c)]+=1
mx=0
best=0
for k, val in enumerate(counts):
if val>mx:
mx=val
best=k
if i==6:
best=0x53
if i==13:
... | sec-knowleage |
def circuit(inp):
out=inp[:]
out[0]=1-out[0]
out[1]=1
out[2]=1-out[2]
out[3]=0
out[4]=1
out[5]=out[5]
out[6]=0
out[7]=1
return out
code=open("Prototype.ino").readlines()[106:]
it=0
res=""
for _ in range(11):
inp=[0]*8
for i in range(8):
line=code[it+i]
i... | sec-knowleage |
# Windows 安全
> 注 : 笔记中拓扑图 drawio 源文件在其图片目录下
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
## 大纲
* **[漏洞利用](#漏洞利用)**
* **[LOL](#LOL)**
* **[RDP](#rdp)**
* [命令行开启RDP](#命令行开启rdp)
* [多开](#多开)
* [连接记录](#连接记录)
* [凭据窃取](#凭据窃取)
* [绕过组策略限制](#绕过组策略限制)
* [绕过本地安全策略限制限制](#绕过本地安全策略限制限制)... | sec-knowleage |
# T1591-003-收集受害者组织信息-确定业务节奏
## 来自ATT&CK的描述
攻击者可能会收集与目标组织的业务有关的信息,这些信息可以在定位过程中使用。有关组织业务信息可能包括各种详细信息,包括每周的工作时间/天。此信息还可能显示受害者的硬件和软件资源的购买和运输时间/日期。
攻击者可以通过多种方式收集此信息,例如通过“网络钓鱼诱骗”直接诱捕。有关业务节奏的信息也可能会通过在线或其他可访问的数据集(例如,社交媒体或受害人拥有的网站)暴露给攻击者。
## 测试案例
个人理解:此技术可能在社工前期使用,观察受害者上下班时间、车辆进入情况,为后续物理入侵提供一些帮助。
## 检测日志
无
## 测试复现
无
## 测试留痕
无
... | sec-knowleage |
# 数据驱动的威胁检测和攻击溯源—学习笔记
本篇主要是对[1]的学习笔记。
## 攻击意图
- 个人恩怨
- 利益驱动
- 诈骗
- 勒索
- 引流
- 挂暗链
- 个人爱好
- 政治目的
- 竞争对手
## 攻击面
- 外网打点
- 权限提升
- DDOS
- 内网渗透
## Web攻击路径
- 信息搜集
- 攻击尝试
- 打点成功
- 权限提升
- 完全控制
- 内网探测
- 横向扩展
- 维持权限
## 常见的检测及方法
### 被动检测
- IDS
- IPS
- WAF
- ...
### 主动检测
- 主机日志分析
- Linux日志
- Win... | sec-knowleage |
wget
===
Linux系统下载文件工具
## 补充说明
**wget命令** 用来从指定的URL下载文件。wget非常稳定,它在带宽很窄的情况下和不稳定网络中有很强的适应性,如果是由于网络的原因下载失败,wget会不断的尝试,直到整个文件下载完毕。如果是服务器打断下载过程,它会再次联到服务器上从停止的地方继续下载。这对从那些限定了链接时间的服务器上下载大文件非常有用。
wget支持HTTP,HTTPS和FTP协议,可以使用HTTP代理。所谓的自动下载是指,wget可以在用户退出系统的之后在后台执行。这意味这你可以登录系统,启动一个wget下载任务,然后退出系统,wget将在后台执行直到任务完成,相对于其它大部分浏览器在下载大量... | sec-knowleage |
**注:**请多喝点热水或者凉白开,身体特别重要。
### Regsvr32简介:
Regsvr32命令用于注册COM组件,是 Windows 系统提供的用来向系统注册控件或者卸载控件的命令,以命令行方式运行。WinXP及以上系统的regsvr32.exe在windows\system32文件夹下;2000系统的regsvr32.exe在winnt\system32文件夹下。但搭配regsvr32.exe使用的 DLL,需要提供 DllRegisterServer 和 DllUnregisterServer两个输出函式,或者提供DllInstall输出函数。
**说明:**Regsvr32.exe所在路径已被系统添加PATH环境变量... | sec-knowleage |
'\"
'\" 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: popup.n,v 1.2 2003/11/24 05:09:59 bbbush Exp $
'\"
'\" The definitions below are for supplemental mac... | sec-knowleage |
# Index
Tips:**切忌泛而不精!**
这是我学习安全运营的旅途记录,很开心与你分享~
目前主要在看的方向:
- 威胁情报
- 威胁狩猎
- 安全数据分析
- 应急响应
- 安全开发
- 系统安全
- 云安全
---
这是我的邮箱📮:`contact@y1ng.org` 欢迎交流! | sec-knowleage |
# 翻译
目前,多语言的支持主要借鉴了 fastapi 的处理方式。需要注意的是,在翻译的过程中我们只需要确保不同语言在文件级别上保持一致。对于文件中具体的内容,不必过于拘谨,只需意思表达一致即可。
## 完善已有语言
这里我们以英语为例进行介绍。
首先,我们需要确定英语对应的 2 个字母的代码,通过查询https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes,我们可以知道对应的代码为 `en`。
在确定了代码后,我们就可以知道该语言的文档所在的目录,即 `docs/en`。
假设我们想要翻译的文档为 `docs/zh/docs/contribute/translation.md`。... | sec-knowleage |
# TOMMY BOY: 1
> https://download.vulnhub.com/tommyboy/TommyBoy1dot0.ova
靶场IP:`192.168.32.216`
扫描对外端口服务
```
┌──(root💀kali)-[/tmp]
└─# nmap -p 1-65535 -sV 192.168.32.216 ... | sec-knowleage |
---
title: Smali
categories: Hardware Hacking
tags: [Smali,Hardware Hacking,kali linux]
date: 2019-06-25 11:23:00
---
0x00 Smali介绍
-------------
smali/baksmali是针对Android的Java虚拟机环境dalvik使用的dex格式的编译/反汇编工具。它的语法大体上基于Jasmin/dedexer 的语法,并支持dex格式的全部功能(注释,调试信息,行信息等等)
源地址: https://github.com/JesusFreke/smali
[smali主页](http://b... | sec-knowleage |
# Lobotomized LSB Oracle (crypto 400)
###ENG
[PL](#pl-version)
This was a follow up for `LSB Oracle` task.
Again we get a [binary](lobotomized_lsb_oracle.vmp.exe.zip) which gives RSA public key and LSB of plaintext.
We also get an encrypted flag.
The difference here is that apparently the binary can make mistakes this ... | sec-knowleage |
# Reading Between the Eyes
Forensics, 150 points
## Description:
> Stego-Saurus hid a message for you in this image, can you retreive it?

## Solution:
We can use [zsteg](https://github.com/zed-0xff/zsteg) in order to recover the flag.
`zsteg` is a tool to detect stegano-hidden data in PNGs &... | sec-knowleage |
Trivia 1 (trivia, 10p, 729 solves)
> This family of malware has gained notoriety after anti-virus and threat intelligence companies claimed that it was being used by several Chinese military groups.
PlugX | sec-knowleage |
ag
===
ack 的升级版,C语言编写,更快更人性化
## 补充说明
> 摘自 <https://github.com/ggreer/the_silver_searcher> 项目的 Readme.md
- 它比ack快一个数量级。
- 它忽略了你的 `.gitignore` 和 `.hgignore` 中的文件模式。
- 如果你的源码库里有你不想搜索的文件,只要把它们的模式添加到一个.ignore文件里。(*cough* *.min.js*cough*)
- 这个命令的名字比ack短33%,而且所有的键都在主行上!
### 语法
```shell
ag [options] pattern [path ...]
ag [可选项]... | sec-knowleage |
version: '2'
services:
curl:
image: vulhub/openssl:1.1.1m-with-curl
command: sleep infinity | sec-knowleage |
.TH ftpaccess 5
.SH NAME
ftpaccess \- ftpd的配置档
.SH "描述 DESCRIPTION"
这个ftpaccess档案是用来配置下述功能的运作
.PP
存取功能(AccessCapabilities)
.TP
autogroup<群组名称><类别>[<类别>...]
如果一个匿名的(ANONYMOUS)使用者是任何<类别>的成员,那麽ftp伺服器将会实行一次setegid()到该<群组名称>。这允许特殊类别的匿名使用者存取group-and-owner-read-only的档案以及目录。<群组名称>是/etc/group里的一个有效群组(或是你的getgrent()呼叫所查阅的地方)。
... | sec-knowleage |
# Writeup HITCON CTF 2016 Finals
Team: msm, akrasuski1, rev, shalom
### Remarks
HITCON Finals are Attack-Defense, so there are no tasks suitable for a writeup.
Nevertheless, when preparing for this event we were looking for some information about what to expect, and sadly there was little to be found.
So for some futur... | sec-knowleage |
# Pay2Win (web 200)
###ENG
[PL](#pl-version)
In the task we have a webpage where we can purchase some cheap object and a flag.
Flag is much more expensive.
Once we click on the item to purchase we can see a page with details and we have to put credit card number to confirm the purchase.
We notice instantly that the web... | 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 LS 1 2022年9月 "GNU coreutils 9.1" ... | sec-knowleage |
# It is my Birthday
Category: Web, 100 points
## Description
> I sent out 2 invitations to all of my friends for my birthday!
>
> I'll know if they get stolen because the two invites look similar, and they even have the same md5 hash, but they are slightly different!
>
> You wouldn't believe how long it took me to ... | sec-knowleage |
# T1071-004-win-内主机向公网DNS发起可疑请求行为
## 来自ATT&CK的描述
攻击者可以使用域名系统(DNS)应用层协议进行通信,以免通过与现有流量混合来进行检测/网络过滤。远程系统的命令(通常是这些命令的结果)将嵌入在客户端和服务器之间的协议流量中。
DNS协议在计算机网络中起管理功能,因此在环境中可能非常常见。即使在完成网络身份验证之前,也可能允许DNS通信。DNS数据包包含许多字段和标头,可以在其中隐藏数据。攻击者通常被称为DNS隧道,可以滥用DNS与受害网络内受其控制的系统进行通信,同时还模仿正常的预期流量。
## 测试案例
检测内部网络客户端何时将DNS流量直接发送到公网上。对于托管网络来说,这是非典型... | sec-knowleage |
# shell 获取小结
## overview
我们获取到的 shell 一般有两种形式
- 直接可交互的 shell
- 将 shell 绑定到指定 ip 的指定端口
下面总结几种常见的获取 shell 的方式。
## shellcode
在利用 shellcode 获取 shell 时,基本要求就是我们能够将 shellcode 布置在**可写可执行的内存区域**中。因此,在没有可写可执行的内存区域的时候,我们需要利用`mprotect` 等函数设置相关内存的权限。
此外,有时候可能 shellcode 中的字符必须满足某些要求,比如可打印字符,字母,数字等等。
## system
我们这里一般是执行 system("/bin... | sec-knowleage |
return
===
从函数中退出并返回数值。
## 概要
```shell
return [n]
```
## 主要用途
- 使得shell函数退出并返回数值,如果没有指定n的值,则默认为函数最后一条命令执行的返回状态。
## 参数
n(可选):整数。
## 返回值
返回值为你指定的参数n的值,如果你指定的参数大于255或小于0,那么会通过加或减256的方式使得返回值总是处于0到255之间。
在函数外执行return语句会返回失败。
## 例子
```shell
#!/usr/bin/env bash
# 定义一个返回值大于255的函数
example() {
return 259
}
# 执行函数
example
# 显示3... | sec-knowleage |
# Writeup Boston Key Party CTF 2016
Team: akrasuski1, cr019283, c7f.m0d3, other019, rev, msm, shalom, nazywam, ppr
### Table of contents
* Cookbook (pwn_6)
* Simple Calc (pwn_5)
* hmac_crc (crypto_5)
* [Frog Fractions 2 (reversing_5)](re_5_Frog_Fractions_2)
* segsh (pwn_6)
* Found it? (misc_1)
* [Good Morning (web_3)]... | 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: chooseColor.n,v 1.2 2003/11/24 05:09:59 bbbush Exp $
'\"
'\" The definitions below are for supplemental ma... | sec-knowleage |
##############################################################
# This is a utility file to help with laboratory exercises in
# the "Understanding Cryptology: Cryptanalysis" course offered
# by Dr. Kerry McKay
# Hosted at OpenSecurityTraining.info under a CC BY-SA license
# http://creativecommons.org/licenses/by-sa/3.0/... | sec-knowleage |
[算法](https://github.com/CyC2018/CS-Notes/blob/master/notes/%E7%AE%97%E6%B3%95%20-%20%E7%9B%AE%E5%BD%95.md) | sec-knowleage |
site_name: Payloads All The Things
site_description: 'Payloads All The Things, a list of useful payloads and bypasses for Web Application Security'
# copyright: © 2016 PATT
# logo: 'images/site_logo.png'
# favicon: 'images/favicon.png'
theme:
name: material
icon:
repo: fontawesome/brands/github
palette:
... | sec-knowleage |
# KPTI - Kernel Page Table Isolation
## 介绍
KPTI 机制最初的主要目的是为了缓解 KASLR 的绕过以及 CPU 侧信道攻击。
在 KPTI 机制中,内核态空间的内存和用户态空间的内存的隔离进一步得到了增强。
- 内核态中的页表包括用户空间内存的页表和内核空间内存的页表。
- 用户态的页表只包括用户空间内存的页表以及必要的内核空间内存的页表,如用于处理系统调用、中断等信息的内存。
在 x86_64 的 PTI 机制中,内核态的用户空间内存映射部分被全部标记为不可执行。也就是说,之前不具有 SMEP 特性的硬件,如果开启了 KPTI 保护,也具有了类似于 SMEP 的特性。此外,SMAP 模... | sec-knowleage |
package org.vulhub.fastjsondemo;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure... | 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 COMM 1 2022年9月 "GNU coreutils 9.1... | sec-knowleage |
type
===
显示指定命令的类型。
## 概要
```shell
type [-afptP] name [name ...]
```
## 主要用途
- 显示要查找的命令的信息。
- 控制查找范围和行为。
- 显示要查找的命令优先级最高的类型。
## 选项
```shell
-a:在环境变量PATH中查找并显示所有包含name的可执行文件路径;当'-p'选项没有同时给出时,如果在别名、关键字,函数,内建的信息中存在name,则一并显示。
-f:排除对shell函数的查找。
-p:如果name在执行'type -t name'返回的不是'file',那么什么也不返回;否则会在环境变量PATH中查找并返回可执行文件路径。
-P:... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "ANALYZE" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
ANALYZE \- 收集与数据库有关的统计
.SH SYNOPSIS
.sp
.nf
ANALYZE [ VERBOSE ] [ \fItable\fR [ (\fIcolumn\fR [, ...] ) ] ]
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
\fBANALYZE\fR 收集有关 PostgreSQL 表的内容的统计,然... | sec-knowleage |
# 终端数据挖掘与威胁狩猎
本文资料整理自[《Provenance Mining:终端溯源数据挖掘与威胁狩猎》](https://mp.weixin.qq.com/s/Te7c3HvCcxX3ci9HTn8lEQ)一文,仅作学习与分享,如有侵权请告知,谢谢!
## 回顾
### 什么是威胁狩猎?
威胁狩猎(Threat Hunting, TH),通俗地讲,就是以系统会被攻破为假设,进行的一系列数据调查,进而能够识别隐蔽的未知威胁,从而对事件进行溯源和场景重建。最终强化规则、全面地提高安全防护knowledge的过程。
(参数)
```
### 选项
```shell
-a:进入交互模式;
-c:指定“php.ini”的搜索路径。
```
### 参数
文件:要执行的php脚本。 | 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 WHOAMI 1 2022年9月 "GNU coreutils 9... | sec-knowleage |
# Django GIS SQL注入漏洞(CVE-2020-9402)
Django在2020年3月4日发布了一个安全更新,修复了在GIS 查询功能中存在的SQL注入漏洞。
参考链接:
- https://www.djangoproject.com/weblog/2020/mar/04/security-releases/
该漏洞需要开发者使用了GIS中聚合查询的功能,用户在oracle的数据库且可控tolerance查询时的键名,在其位置注入SQL语句。
## 漏洞环境
执行如下命令编译及启动一个存在漏洞的Django 3.0.3:
```
docker compose build
docker compose up... | sec-knowleage |
whoami
===
打印当前有效的用户ID对应的名称
## 概要
```shell
whoami [OPTION]...
```
## 主要用途
- 打印当前有效的用户ID对应的名称。
## 选项
```shell
--help 显示帮助信息并退出。
--version 显示版本信息并退出。
```
## 返回值
返回0表示成功,返回非0值表示失败。
## 例子
```shell
[root@localhost ~]# whoami
root
```
### 注意
1. 该命令等价于 `id -un`。
2. 注意区分 `whoami` 和 `logname` 这两个命令;比如我们以用户 `root` 打开的终端... | sec-knowleage |
# TokyoWesterns - `easy_hash` (75pt / 226 solves)
We are provided with the source code:
```python
import struct
import os
MSG = b'twctf: please give me the flag of 2020'
assert os.environ['FLAG']
def easy_hash(x):
m = 0
for i in range(len(x) - 3):
m += struct.unpack('<I', x[i:i + 4])[0]
m = m & ... | sec-knowleage |
tar
===
将许多文件一起保存至一个单独的磁带或磁盘归档,并能从归档中单独还原所需文件。
## 补充说明
**tar命令** 可以为linux的文件和目录创建档案。利用tar,可以为某一特定文件创建档案(备份文件),也可以在档案中改变文件,或者向档案中加入新的文件。tar最初被用来在磁带上创建档案,现在,用户可以在任何设备上创建档案。利用tar命令,可以把一大堆的文件和目录全部打包成一个文件,这对于备份文件或将几个文件组合成为一个文件以便于网络传输是非常有用的。
首先要弄清两个概念:打包和压缩。打包是指将一大堆文件或目录变成一个总的文件;压缩则是将一个大的文件通过一些压缩算法变成一个小文件。
为什么要区分这两个概念呢?这源于Li... | sec-knowleage |
arpd
===
收集免费ARP信息
## 补充说明
**arpd命令** 是用来收集免费arp信息的一个守护进程,它将收集到的信息保存在磁盘上或者在需要时,提供给内核用户用于避免多余广播。
### 语法
```shell
arpd(选项)(参数)
```
### 选项
```shell
-l:将arp数据库输出到标准输出设备显示并退出;
-f:指定读取和加载arpd数据库的文本文件,文件的格式与“-l”输出信息类似;
-b:指定arpd数据库文件,默认的位置为“/var/lib/arpd.db”;
-a:指定目标被认为死掉前查询的次数;
-k:禁止通过内核发送广播查询;
-n:设定缓冲失效时间。
```
### 参数
网络接... | sec-knowleage |
# SCA在得物DevSecOps平台上应用
> SCA(Software Composition Analysis)软件成分分析,通俗的理解就是通过分析软件包含的一些信息和特征来实现对该软件的识别、管理、追踪的技术。
## **一、前言**
现代开发项目中,应用程序中使用的大部分代码都是由开源代码构成的,其余的代码主要是作为"胶水"来组装和调用各种函数。据中国信息通信研究院统计的数据,2020年中国已经使用开源技术的企业占比为88.2%,比2018年增长6.8%;有计划使用的占9.5%;暂未计划使用开源技术的企业占比为2.1%可以看出,中国开源软件应用比例逐年提升。
开源让这些软件更安全吗?根据通信研究院数据显示,2020年热门开... | sec-knowleage |
.\" Copyright (c) 1995,1997 Paul Gortmaker and Andries Brouwer
.\" 中文版 Copyright (c) 2000 Bill Pan, Laser 和 www.linuxforum.net
.\"
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either v... | sec-knowleage |
# S2-013/S2-014 Remote Code Execution Vulnerablity
[中文版本(Chinese version)](README.zh-cn.md)
Affected Version: 2.0.0 - 2.3.14.1
Details:
- http://struts.apache.org/docs/s2-013.html
- http://struts.apache.org/docs/s2-014.html
## Setup
```
docker compose build
docker compose up -d
```
## Reference
The Struts2's ... | sec-knowleage |
#!/usr/bin/env python3
import socketserver
class MyTCPHandler(socketserver.BaseRequestHandler):
def handle(self):
# self.request is the TCP socket connected to the client
self.request.send(b'220 xxe-ftp-server\r\n')
self.communicating = True
while self.communicating:
c... | sec-knowleage |
# SETI
Category: Reversing, 120 Points
## Description
> Two men in black suits and sunglasses were seen visiting a famous radio-astronomer, who recently published some work on a weird and very noisy signal coming from the area of the red dwarf Gliese 388.
>
> Shorty after that, she mysteriously disappeared. The activi... | sec-knowleage |
上一季下载sys.hiv,sam.hiv,security.hiv文件后,以Linux下为背景来离线提取hash,本季补充以windows为背景离线提取hash。
mimikatz 2.0 二进制文件下载地址:
https://github.com/gentilkiwi/mimikatz/releases/latest
切到当下目录(注意X86,X64位)
mimikatz离线导hash命令:
```bash
mimikatz.exe "lsadump::sam /system:sys.hiv /sam:sam.hiv" exit
```

首先在本地的 Terraform 场景目录下运行以下两条命令:
```bash
$ terraform plan -out=plan.out
$ terraform show -json plan.out... | sec-knowleage |
# Databases
Category: Cryptography
## Description
> I took Database Systems last semester and found this message on the back of the exam, I don't think it has something to do with the course
A text file was attached.
## Solution
Let's check the attached file:
```console
root@kali:/media/sf_CTFs/technion/Databases# cat ... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.