lab-hackthebox-Archetype-windowsRCE
首先用openvpn连接到vpn服务,然后进行常规扫描
12nmap -sC -sV ipnmap -sS -Pn -n -p- --open ip --min-rate=5000
综合两次扫描结果,我们会发现很多服务
可以看出又是smb服务,那么我们又要用smbclient来看共享文件夹。
123smbclient -N -L \\\\ip\\-N:no password login-L: probe for services in target ip
然后我们进入没有权限限制的backups目录。
1smbclient -N \\\\ip\backups
发现一个prod.dtsConfig文件,我们get下来并且查看。这个文件是我们登陆smb会话时,在目录中自动保存的。
1get prod.dtsConfig
拿到用户名密码
1用户名sql_svc密码Mag4c0rp123主机ARCHETYPE
我们需要连接到microsoft sql server简称mssql
这里采用通用连接工具Impacket tool可在github上下载,或者
1python -m pip ins ...
Linear Algebra with pytorch
2.3.1 Scalars12345import torchx = torch.tensor(3.0)y = torch.tensor(2.0)x + y, x * y, x / y, x ** y
(tensor(5.), tensor(6.), tensor(1.5000), tensor(9.))
2.3.2 Vectors123x = torch.arange(3)x#It will start from 0 to 2.
tensor([0, 1, 2])
1234x[2]len(x)x.shape#foundamental operations.
torch.Size([3])
2.3.3 Matrices12A = torch.arange(6).reshape(3, 2)A, A.T
(tensor([[0, 1],
[2, 3],
[4, 5]]),
tensor([[0, 2, 4],
[1, 3, 5]]))
123A = torch.tensor([[1, 2, 3], [2, 0, 4], [3, 4, 5 ...
homework1 preprocess dataset
123456import torchimport osimport pandas as pddata_file = os.path.join('.', 'data', 'abalone.csv')data = pd.read_csv(data_file)print(data)
M 0.455 0.365 0.095 0.514 0.2245 0.101 0.15 15
0 M 0.350 0.265 0.090 0.2255 0.0995 0.0485 0.0700 7
1 F 0.530 0.420 0.135 0.6770 0.2565 0.1415 0.2100 9
2 M 0.440 0.365 0.125 0.5160 0.2155 0.1140 0.1550 10
3 I 0.330 0.255 0.080 0.2050 0.0895 0.0395 0.0550 7
4 ...
deep learning pre knowledge
1import torch
12x = torch.arange(12)#row vectorx
tensor([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
1x.shape#size of tensor
torch.Size([12])
1x.numel()#number of elements, the product of the number of rows and columns, called size大小
12
12X1 = x.reshape(3, 4)X1#Changing the shape doesn't change the size12
tensor([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]])
12X2 = x.reshape(3, -1)X2#automatically adjust the shape using -1
tensor([[ 0, 1, 2, 3],
[ 4, ...
css开发练习
这里是一个示例
123456<style> body {background-color: yellow;} h1 {font-size: 36pt;} h2 {color: blue;} p {margin-left: 50px;}</style>
我们再来写一下,在每个大括号中,也就是对应其左边名称的性质,比如p就是普通行的性质,h1就是大标题的性质,h2就是次标题的性质。
我们还可以针对p写很多条性质,不仅仅是颜色,还有其他,例如
123456p{ color: red; text-align:center; font-family:arial;}
IPFS使用篇
安装和启动ipfs首先是安装ipfs,这里我选择在linux上安装,其他安装教程详见https://ipfs.tech
12345678正常安装使用wget https://dist.ipfs.tech/kubo/v0.20.0/kubo_v0.20.0_linux-amd64.tar.gz之后解压tar -zxvf kubo_v0.20.0_linux-amd64.tar.gzcd kubosudo bash install.sh输出Moved ./ipfs to /usr/local/bin即成功。ipfs --version查看版本
初始化
123如果在小机器上安装使用ipfs init --profile=lowpower或者ipfs init
启动进程
12ipfs daemon我们记下端口号
查看类似节点
1ipfs swarm peers
创建一个文件放到ipfs里面去
1234echo "meow" > meow.txtipfs add meow.txt我们会得到一个meow.txt的CID,关于CID详见我的ipfs上一篇文章curl &qu ...
搭建一个基于VMESS协议的cloudflare自选ip代理连接
这篇文章的前置内容为搭建基于VMESS协议的代理,连接服务器,前提是服务器ip没有被阻拦的情况下。
本片文章基于服务器ip被阻拦,无法直接ping通。
域名注册我们需要两个域名,可以到namesilo去注册海外域名。我们购买完域名之后会进入域名管理界面。
这是我完成修改的结果。
域名解析服务商修改我们需要修改NameServers,其中一个可以改为国内很方便的dnspod服解析务商,也就是使用
12side.dnspod.netharley.dnspod.net
作为域名解析服务器,当然可能不全是我上面所写,dnspod提供给某个人的可能不同
这里添加域名之后,它会提供我们域名解析服务商,然后添加到下图的框中。
之后注册cloudflare账号,并且添加另一个域名。这里按照它的步骤进行。其中,
在设置ssl时选择full但并不用scrict。注意一定要选择Full!!!
这一项可选可不选。
添加解析记录和回溯路我们给cloudflare解析的域名添加一条DNS记录,指向我们要绕过阻拦访问的服务器,所以直接将解析内容添加服务器ip即可,记录为A记录。
注意:要解析的域名必须写子 ...
ipfs and Merkle DAGs in web3
introduction to IPFS(Interplanetary File System)ipfs is intended to complement http.
Today’s networks are inefficient and expensive, and network resources are centrally deployed, limiting individual opportunities. In addition, Web pages have an average lifespan of 100 days, making it difficult to store data for long periods of time. IPFS makes it easy to set up an elastic network for mirrored data. The most important point is that ipfs is based on content addressing, similar to the information- ...
用openvpn配置一个vpn
安装openvpn客户端这里直接上官网安装对应主机型号的客户端。比如我是macos系统,则对应https://openvpn.net/client-connect-vpn-for-mac-os/
注意!在mac m1上连接到vpn时,要手动运行一个命令
1sudo /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent
如果能够连接就不用运行,不能连接运行一下即可!
安装openvpn服务器1sudo apt install openvpn easy-rsa
配置服务器端openvpn密钥文件openvpn服务器需要四个密钥文件ca.crt, server.crt, server.key,和dh1024.pem。幸好服务器端已经给出我们模板,但是不幸的是,这是密钥啊,肯定不能用模板啊,要自己生成。先创建一个文件夹
1sudo mkdir /etc/openvpn/keys
然后安装easy-rsa
1sudo apt-get install easy-rsa
我们可以搜索easy- ...
lab-hackthebox-Responder_NTLM
首先我们利用openvpn连接到靶场内网(openvpn构造vpn我们下节再来讲)。
然后我们开始扫描端口,以下应该是nmap中最快而且最全面的扫描没有之一
12345678910sudo nmap -sS -Pn -n --open -p- --min-rate 5000 10.129.241.68Some closed ports may be reported as filtered due to --defeat-rst-ratelimitPORT STATE SERVICE80/tcp open http5985/tcp open wsman7680/tcp open pando-pubNmap done: 1 IP address (1 host up) scanned in 33.98 seconds
扫描结果如上。
这里的5985是WinRM也就是windows远程管理协议的端口。
能够使得网络上连通的机器远程执行命令,并且能够在远程监控,管理和配置服务器操作系统和客户端等。



