kerberos

5.内网渗透之PTH&PTT&PTK

烈酒焚心 提交于 2020-01-08 12:05:11
---------------------------------------------- 本文参考自三好学生-域渗透系列文章 内网渗透之PTH&PTT&PTK PTH(pass-the-hash) pass-the-hash在内网渗透中是一种很经典的攻击方式,原理就是攻击者可以直接通过LM Hash和NTLM Hash访问远程主机或服务,而不用提供明文密码。 pass the hash原理: 在Windows系统中,通常会使用NTLM身份认证 NTLM认证不使用明文口令,而是使用口令加密后的hash值,hash值由系统API生成(例如LsaLogonUser) hash分为LM hash和NT hash,如果密码长度大于15,那么无法生成LM hash。从Windows Vista和Windows Server 2008开始,微软默认禁用LM hash 如果攻击者获得了hash,就能够在身份验证的时候模拟该用户(即跳过调用API生成hash的过程) 这类攻击适用于: 域/工作组环境 可以获得hash,但是条件不允许对hash爆破 内网中存在和当前机器相同的密码 微软也对pth打过补丁,然而在测试中发现,在打了补丁后,常规的Pass The Hash已经无法成功,唯独默认的Administrator(SID 500)账号例外,利用这个账号仍可以进行Pass The

DBeaver链接kerberos安全认证的Phoenix集群

吃可爱长大的小学妹 提交于 2020-01-07 04:47:18
DBeaver链接kerberos安全认证的Phoenix集群 最近公司的CDH集群,启动了kerberos安全认证,所有的用户验证全部需要依赖kerberos来进行。之前的裸奔集群,总算有了一些安全认证的功能,虽然网上很多人都说不推荐使用kerberos进行集群的安全认证,但是也没有说明使用哪种安全认证的方式会更好,目前比较现成的安全认证方式也只知道kerberos。 使用kerberos认证之后,原本的Phoenix sqlline可以在存有kerberos缓存票据的机器上直接运行,链接方式,启动命令等,都和没有启动kerberos之前一样。只需要执行klist命令,能够显示kerberos主体信息即可。但是使用Windows进行远程链接Phoenix时出现了问题。首先Windows上没有kerberos客户端,不能直接缓存票据。其次,如果使用kinit命令进行链接的话,必须知道kerberos中的主体密码,而CDH的kerberos主体是CM自主生成的,我们也不知道密码。所以我们只能使用kertab的形式进行链接。 明确了使用keytab的形式进行链接,我们首先尝试了Linux sqlline的形式链接,测试完全没有问题,使用一切正常。但是使用Windows的DBeaver远程链接时要怎么做呢? 百度搜索了一下

HBase+Kerberos: UserGroupInformation logging in from keytab expires?

谁说胖子不能爱 提交于 2020-01-07 00:58:15
问题 We are using the method UserGroupInformation.loginUserFromKeytabAndReturnUGI(user, keytab) to authenticate a Java program to write to a remote HBase cluster. When the application first starts up we are all good and it's talking to HBase happily. The krb5.conf ticket_lifetime is set to 24 hours, and what seems to happen after 24 hours is that the "TGT expires" and we start seeing exceptions like this: Exception encountered while connecting to the server : javax.security.sasl.SaslException: GSS

Equivalent of 'gss_import_name' and 'gss_init_sec_context' methods in java?

孤街醉人 提交于 2020-01-06 11:36:28
问题 I'm creating a small application(for now) that needs to generate a Token with Kerberos library. The two methods equivalent I'm searching for are the gss_import_name and gss_init_sec_context methods. I have found several examples in other languages: C,C++ and C#, but none in Java. I'm not even sure of which library to import in my application. If someone has an answer to my question it would be very helpful to me. Cordially, Ephismen. 回答1: The package you want to use is sun.security.jgss. In

Connect to Kerborised Hbase tables from Java

可紊 提交于 2020-01-06 05:02:58
问题 I am using below configuration to connect from java code to kerborised hbase tables. config.set("hbase.zookeeper.quorum", zookeeperHosts); config.set("hbase.zookeeper.property.clientPort", zookeeperPort); config.set("hadoop.security.authentication", "kerberos"); config.set("hbase.security.authentication", "kerberos"); UserGroupInformation.setConfiguration(config); UserGroupInformation.loginUserFromKeytab(ZOOKEEPER_PRINCIPAL,ZOOKEEPER_KEYTAB) I am trying to Get data from Hbase . On running

DBeaver链接kerberos安全认证的Phoenix集群

寵の児 提交于 2020-01-05 13:48:44
DBeaver链接kerberos安全认证的Phoenix集群 最近公司的CDH集群,启动了kerberos安全认证,所有的用户验证全部需要依赖kerberos来进行。之前的裸奔集群,总算有了一些安全认证的功能,虽然网上很多人都说不推荐使用kerberos进行集群的安全认证,但是也没有说明使用哪种安全认证的方式会更好,目前比较现成的安全认证方式也只知道kerberos。 使用kerberos认证之后,原本的Phoenix sqlline可以在存有kerberos缓存票据的机器上直接运行,链接方式,启动命令等,都和没有启动kerberos之前一样。只需要执行klist命令,能够显示kerberos主体信息即可。但是使用Windows进行远程链接Phoenix时出现了问题。首先Windows上没有kerberos客户端,不能直接缓存票据。其次,如果使用kinit命令进行链接的话,必须知道kerberos中的主体密码,而CDH的kerberos主体是CM自主生成的,我们也不知道密码。所以我们只能使用kertab的形式进行链接。 明确了使用keytab的形式进行链接,我们首先尝试了Linux sqlline的形式链接,测试完全没有问题,使用一切正常。但是使用Windows的DBeaver远程链接时要怎么做呢? 百度搜索了一下

Why does the Authorization line change for every firefox request?

断了今生、忘了曾经 提交于 2020-01-05 12:00:21
问题 When running with Kerberos tickets, I have noticed that every firefox request has a different Authorization line in the HTTP header. I loaded a simple page, then hit the reload button several times and it was never the same. What causes this behavior? I would have thought that the Authorization line would stay constant for the duration of the Kerberos credentials. (Note that I got the credentials via the kinit command before firing up firefox.) When the authentication method is Basic, then

Java 8 update 161 breaks HTTPClient Kerberos authentication

心已入冬 提交于 2020-01-05 08:09:50
问题 My HTTPClient Kerberos authentication set up is similar to this one. My login.conf looks like this: com.sun.security.jgss.login { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<keytab> principal=<principal>; }; com.sun.security.jgss.initiate { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<principal> principal=<keytab>; }; com.sun.security.jgss.accept { com.sun

Java 8 update 161 breaks HTTPClient Kerberos authentication

穿精又带淫゛_ 提交于 2020-01-05 08:09:13
问题 My HTTPClient Kerberos authentication set up is similar to this one. My login.conf looks like this: com.sun.security.jgss.login { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<keytab> principal=<principal>; }; com.sun.security.jgss.initiate { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true useKeyTab=true storeKey=true keyTab=<principal> principal=<keytab>; }; com.sun.security.jgss.accept { com.sun

How to write a KSP to hook up into KERB_CERTIFICATE_LOGON

一个人想着一个人 提交于 2020-01-05 08:03:47
问题 Hi all I've written a custom credentialprovider that works fine when using username/password as credential, the password is transferred via bluetooth. After all it was not that difficult as the documentation tells you what interfaces to implement. Now I want to change the credentials to use certificates instead. I see that I should use the KERB_CERTIFICATE_LOGON structure for this. Diving deeper into the topic I found that I should implement a custom key storage provider as described in this