smb

JCIFS - Transfer a file via SMB

╄→гoц情女王★ 提交于 2020-01-15 12:38:12
问题 I'm trying to move some files from a stored directory to a remote server "BOB" using jcifs SMB. I need to use jcifs because the move comes via and Android app, I.E. I'm moving photos from the app to the remote server. In order to authenticate as a user, my company uses Active Directory. For some time, the Active Directory was the same server as the server where the photos would go, all is good. Unfortunately, they had to change the server where Active Directory is stored to "RAINY", but not

How to avoid 12 seconds delay when disonnecting from share in Windows 7?

两盒软妹~` 提交于 2020-01-14 09:11:15
问题 I'm making some utils that uses NetUseAdd and NetUseDel functions to connect/disconnect to share. In Windows 7 I noticed that between calling NetUseDel and real disconnnection passes nearly 12 seconds. I made some investigations and found that net use \server /del also disonnects only after 12 seconds. Here's little script and Wireshark output, corresponding to run of script: net use \\server "" /user:"" net use \\server /delete http://i.stack.imgur.com/5CyCw.png Setting last tree connect smb

CTF-SMB渗透

做~自己de王妃 提交于 2020-01-13 06:11:50
环境 Kali ip 192.168.56.102 Smb 靶机 ip 192.168.56.103 靶场下载: 链接:https://pan.baidu.com/s/1OwNjBf7ZEGmFlRq79bkD_A 提取码:0eg6 信息探测 使用 netdiscover -r ip/mask 进行内网网段存活 ip 探测 靶机为103 进行 nmap 端口探测和服务信息探测 nmap -sV -T4 -A 192.168.56.103 可以看到smb 服务 针对 SMB 协议,使用空口令,若口令尝试登陆,并查看敏感文件,下载查看 0x01 针对于开放服务进行弱口令尝试 smbclient -L 192.168.56.103 连接成功 分别查看三个共享连接是否有 flag 等敏感文件 smbclient ‘ \\IP\$share ’ 查看文件 尝试到share$ 连接时 发现可以空口令连接 查看文件 Robots.txt 里的目录 每个查看后无果 查看 deets.txt 发现一个密码为 12345 然后继续查看敏感文件 Cd 到 wordpress 目录 发现敏感文件 wp-config.php 读取到数据密码 尝试用数据库密码和 12345 登录到 Mysql ssh 均失败 0x02 针对于开放服务器的版本 尝试溢出漏洞 尝试 searchsploit samba 版本号

How to create/edit .class file codes

允我心安 提交于 2020-01-07 04:10:41
问题 I would like to know if there is a way to edit the codes in a class file? Because I dont seem to be able to compile a java file into a class file with the use of cmd as it will always detect errors . The Jar file that I am using already have its own existing class files and I would like to update one of the the .class file with a few lines of codes. But when I copied the codes from the class file and put it into a java file together with my added lines of codes, and then try compiling it

EternalBlue永恒之蓝漏洞复现

房东的猫 提交于 2020-01-06 17:51:38
EternalBlue漏洞复现 1. 实训目的 永恒之蓝(EternalBlue)是由美国国家安全局开发的漏洞利用程序,对应微软漏洞编号ms17-010。该漏洞利用工具由一个名为”影子经济人”(Shadow Brokers)的神秘黑客组织于2017年4月14日公开的利用工具之一,该漏洞利用工具针对TCP 445端口(Server Message Block/SMB)的文件分享协议进行攻击,攻击成功后将被用来传播病毒木马。由于利用永恒之蓝漏洞利用工具进行传播病毒木马事件多,影响特大,因此很多时候默认将ms17-010漏洞称为“永恒之蓝”。学习漏洞原理掌握攻击方法。 2. 实训原理 永恒之蓝漏洞是方程式组织在其漏洞利用框架中一个针对SMB服务进行攻击的漏洞,该漏洞导致攻击者在目标系统上可以执行任意代码。 注:SMB服务的作用:该服务在Windows与UNIX系列OS之间搭起一座桥梁,让两者的资源可互通有无由于永恒之蓝利用工具会扫描开放445文件共享端口的Windows机器,所以如果用户开启445端口并且系统未打MS17-010补丁就会在无感状态下被不法分子向系统植入恶意代码 3. 实训环境 Kali系统 版本:2.0 IP:192.168.0.145 Win7系统 IP:192.168.0.130 开放端口:445 MSF框架版本:4.14.17版本以上 安装更新metasploit

Get SMB Shared Files Name and Permissions In Java

不打扰是莪最后的温柔 提交于 2020-01-05 05:37:10
问题 I want to connect to an SMB server and browse through its files, and for a given path, to be able to retrieve a list of files and folders, with the names and permissions. I need to support all SMB dialects, and to be able to do it from my code. The code would like roughly as follows: smbClient.connect(serverInfo); info = smbClient.getShare(shareName); for(File file : info.getFiles) { List<permission> permissions = file.getPermissions(); //do something } I've tried a few options such as smbj,

Ms17-010永恒之蓝漏洞复现

牧云@^-^@ 提交于 2020-01-04 17:20:22
Ms17-010永恒之蓝漏洞复现 0x00 漏洞介绍 永恒之蓝是指2017年4月14日晚, “永恒之蓝”利用Windows系统的SMB漏洞可以获取系统最高权限 2017年5月12日,不法分子通过改造“永恒之蓝”制作了wannacry勒索病毒,在多个高校校内网、大型企业内网和政府机构专网中招,被勒索支付高额赎金才能解密恢复文件。 0x01漏洞原理 永恒之蓝漏洞是方程式组织在其漏洞利用框架中一个针对SMB服务进行攻击的漏洞,该漏洞导致攻击者在目标系统上可以执行任意代码。 0x02影响版本 目前已知受影响的Windows 版本包括但不限于: WindowsNT, Windows2000、 Windows XP、 Windows 2003、 Windows Vista、 Windows 7、 Windows 8, Windows 2008、 Windows 2008 R2、 Windows Server 2012 SP0。 0x03 漏洞修护 微软已于2017 年 3 月 14 日发布MS17-010补丁,修复了“永恒之蓝”攻击的系统漏洞,一定要及时更新Windows系统补丁;务必不要轻易打开doc、rtf等后缀的附件;内网中存在使用相同账号、密码情况的机器请尽快修改密码,未开机的电脑请确认口令修改完毕、补丁安装完成后再进行联网操作,可以下载“永恒之蓝”漏洞修复工具进行漏洞修复 0x04

Azure file Storage SMB slow to list files in directory

邮差的信 提交于 2020-01-04 05:14:04
问题 We have an app that lists files in a folder through Azure Files. When we use the C# method: Directory.GetFiles(@"\\account.file.core.windows.net\xyz") It takes around a minute when there are 2000 files. If we use CloudStorageAccount to do the same: CloudFileClient fileClient = storageAccount.CreateCloudFileClient(); CloudFileDirectory directory = fileClient.GetShareReference("account").GetRootDirectoryReference().GetDirectoryReference("abc"); Int64 totalLength = 0; foreach (IListFileItem

Monitor remote shared-Folder (Windows/SMB) using WatchService

不羁岁月 提交于 2020-01-04 03:00:47
问题 I am trying to monitor a remote folder using WatchService (java.nio.file.*). Everything works fine for local folders. However I was unable to figure out how to monitor a remote share. Can I pass credentials along? (If the user executing the code has the rights to mount the share it works as well.) Here are parts of my code: public void lunch() throws IOException { boolean recursive = true; Path dir = Paths.get("C:\\test"); new Watch(dir, recursive).processEvents(); } public Watch(Path dir,

Monitor remote shared-Folder (Windows/SMB) using WatchService

*爱你&永不变心* 提交于 2020-01-04 03:00:09
问题 I am trying to monitor a remote folder using WatchService (java.nio.file.*). Everything works fine for local folders. However I was unable to figure out how to monitor a remote share. Can I pass credentials along? (If the user executing the code has the rights to mount the share it works as well.) Here are parts of my code: public void lunch() throws IOException { boolean recursive = true; Path dir = Paths.get("C:\\test"); new Watch(dir, recursive).processEvents(); } public Watch(Path dir,