AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-482335

Karn Kumar's questions

Martin Hope
Karn Kumar
Asked: 2021-08-06 08:48:56 +0800 CST

如何使用 samba 克服较弱的 MD4 哈希问题

  • 0

我们在 RedHat(RHEL7.9) 系统上使用 samba 配置,其中 SMB 身份验证基于 NTLM 密码哈希,该密码基本上是质询-响应身份验证的明文凭据,存储在单独的属性中,sambaNTPassword 在 LDAP (Oracle 统一目录)目录数据库。

因此,我们的安全团队进行了一些渗透测试,发现我们的 samba 使用的 MD4 可以被拦截,因为它携带的哈希值较弱。

除了身份验证之外,确保传输中的数据完整性和加密是 SMB 安全的重要组成部分,它再次依赖于 MD4 哈希。

以下是我的 samba 配置示例:

 cat /etc/samba/smb.conf

[global]
  log file                       = /var/log/samba/%m.log
  log level                      = 2
  max log size                   = 50
  netbios name                   = FDI0816
  server string                  = FDI0816.myorg.com
  workgroup                      = FDI

; ldap configuration
  invalid users                  = root +wheel
  encrypt passwords              = Yes
  guest account                  = nobody
  ldap admin dn                  = cn=sambaAdmin,ou=users,o=services
  ldap group suffix              = ou=Group
  ldap passwd sync               = only
  ldap ssl                       = no
  ldap suffix                    = ou=FDI,o=myorg
  ldap timeout                   = 4
  ldap user suffix               = ou=People
  map to guest                   = Bad User
  security                       = user
  passdb backend = ldapsam:"ldaps://ldap.FDI.myorg.com ldaps://ldap.rnd.myorg.com"

; client connection settings
  deadtime                       = 15
  dns proxy                      = No
  lm announce                    = No
  server min protocol            = SMB2

; shares default settings
  create mask                    = 0750
  directory mask                 = 2750
  posix locking                  = No
  strict allocate                = Yes
  unix extensions                = No
  wide links                     = Yes

; printers are disabled
  disable spoolss                = Yes
  load printers                  = No
  printcap name                  = /dev/null
  printing                       = bsd
  show add printer wizard        = No

[homes]
  browseable                     = No
  comment                        = Your Home
  create mode                    = 0640
  csc policy                     = disable
  directory mask                 = 0750
  public                         = No
  writeable                      = Yes

[proj]
  browseable                     = Yes
  comment                        = Project directories
  csc policy                     = disable
  path                           = /proj
  public                         = No
  writeable                      = Yes

[home]
  browseable                     = Yes
  comment                        = Project directories
  csc policy                     = disable
  path                           = /home
  public                         = No
  writeable                      = Yes

具有属性的 LDAP 端用户详细信息:

例子:

Attribute Description       value
sambaNTPassword             0735509A0ED9A577BD7D8GG7BC1T
uidNumber                   32222
userPassword                {RBKBD4-HMAC-SHA512)...

其他详情:

Samba Version: 4.10
Client side smb version: 2
Samba Server : RHEL7.9

如果有人遇到这个并有解决方案,那么我想寻求指导或建议来缓解这个问题。

更新后接收安全评估文件:

在阅读并通过渗透测试结果后,我了解到 pentester 为基于 LDAP 的用户提供了内部用户帐户,并发现了 LDAP(Oracle 统一目录)的弱点,他们发现“LDAP 匿名Null Bind”,因此他们发现可以通过 LDAP 服务检索关键信息,而无需提供任何身份验证凭据,因为它还支持具有 NULL 和空的基本对象的搜索请求,因此未经身份验证的攻击者甚至可以利用并获取任何先前的信息LDAP知识。

因此,获得了对 LDAP 服务器的访问权限,因为它允许 NULL/空基本连接到 LDAP 服务器,并转储了所有 LDAP 数据,很容易获得userPassword&的所有密码信息sambaNTPassword。

为了执行“pass-the-hash”攻击,使用了“Mimikatz”工具和浏览器“Internet Explorer”。

然而,有趣的是这里要强调的是,为了访问该组织,他们需要从外部访问 VPN,因此他们使用meterpreter工具绕过reverse https connectionPaylod。

linux hash ldap samba4
  • 1 个回答
  • 421 Views
Martin Hope
Karn Kumar
Asked: 2018-08-14 03:03:59 +0800 CST

从最后一列linux中删除一些字符集

  • 0

我想删除最后一列输出中连字符“e-”之后的所有内容..

下面是我的输出的样子..

# awk '/out: OpenSSL/ { gsub( /[][]|out:/ , "" ) ;  print $1,$2,$3 }' sslcheck.log | column -t

myserver1                         OpenSSL  1.0.1e-fips
myserver2                         OpenSSL  0.9.8e-fips-rhel5

我希望在 char+hyphen(e-).. 之后的最后一列中删除所有内容。

想要的输出..

myserver1                         OpenSSL  1.0.1
myserver2                         OpenSSL  0.9.8
sed
  • 1 个回答
  • 42 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve