-dh dd. :Mm MM. ,yNNNNNNNNo ,mMMMMMMMMd, dNNNNNNNNN, MM. yM :Mm MM. -Mm oMd `NM: NM: :My MM. yM :Mm MM. :Mm -++++mM oMN mM: MM: :MN MM. yM :Mm MM. .NMmmmmmmMM 'MMmmmmmNMN' MM: :MM mMNmmmmmMM :Mm MM. /o. hM: .h+ sh :hdddddddh/ dd` :ds oddddddddy. ,ddddddd-d ,yddddddddo dM/ ,ddddddddd` -Mm+++++++oMM mMs:::::oMm MM. /Mh MM::::::hMh Mm+````` yMh`````yMM mM/ Mh```````` /sssyMMssso- mM/ oMM MM. /Mh MM :+/ 'hhhhhhdM, yMh hhhhhh+ dMo MMNNNNNNNN. .MM NMdyyyyydMN MMdyyyyymMh MM ,,,,,,,,MM sMN,,,,,,,, mMo My```````` `o+ `+ooooooo+` .+oooooooo: oo .oooooooo+: `/ooooooooo /o- My ____ My {} _ \ +: |__ \ 0x01 Introduction /_____\ merry christmas! 0x02 Feedback + Edits \o o)\)_______ 0x03 duper's Code Corner duper (< ) /#######\ We wish you Ameritech 0x04 HP Hash Cracking with MapReduce elchupathingy __{'~` }#########| We wish you Ameritech 0x05 Numbers Stations FOIA teh crew / { _}_/########| We wish you Ameritech 0x06 Port Knocking Primer storm / { / _|#/ )####| And a happy NYNEX! 0x07 205-380 Deltacom Scan Shadytel, Inc / \_~/ /_ \ |####| Verizon to you 0x08 Abusing phpBB's Tell-A-Friend Luis Santana \______\/ \ | |####| Wherever you Qwest! 0x09 New Security Features in HTML5 duper \__________\|/#####| We wish you Ameritech 0x0a Decoding Trillian Password Files storm |__[X]_____/ \###/ And a happy NYNEX! 0x0b So You've Got a Dialtone... Shadytel, Inc /___________\ 0x0c Programming Challenge storm | |/ | 0x0d Et Cetera, Etc. teh crew |___/ |___/ _| /_| / (___,_(___,_) snd [==================================================================================================] [================================================] Go Null Yourself E-Zine Issue #3 - Winter 2010-2011 www.GoNullYourself.org [================================================] [==================================================================================================] -=[ 0x01 Introduction Jesus Christ, a third issue? We may be on to something here... Ho ho ho to all you little haxx0rz out there! We're back again with another action-packed episode of GNY Zine, conveniently timed for the holiday season! We're here to give you everything Santa didn't (you got a new shirt and an iPod, don't deny it), including high-performance hash cracking, sexy codez, and a plethora of phone numbers that go beep and chirp. We're also glad to report that issue #67 of Phrack has been released, so everyone should certainly go read that. After you finish reading this, of course. In case you didn't notice, we got a shiny new server in December and look forward to seeing how our new hosting in Sweden fairs. As a result, we're now serving our own IRC and would like to introduce the new channel: #gny on irc.gonullyourself.org, port 6667 (6697 ssl). We invite any community that would like to host their channel with us to join our IRC network. That seems to be about it with news updates, so bundle up, make some hot chocolate, enjoy the third third issue of the zine, and we'll see you in the spring. Scene Releases ============== November 2010 - Phrack #67 (http://www.phrack.org/issues.html?issue=67) December 2010 - Hack This Zine #11 (https://www.hackbloc.org/zine) December 2010 - owned and exp0sed #2 (http://gonullyourself.org/ezines/exp/exp02.txt) -=-=- Now, on to formalities... If you are interested in submitting content for future issues of GNY Zine, we would be happy to review it for publication. Content may take many forms, whether it be a paper, review, scan, or first-hand account of an event. Submissions of ASCII cover art that display the GNY logo in some way are also appreciated. Well-received topics include computer hacking and exploitation methods, programming, telephone phreaking (both analog and digital), system and network exploration, hardware hacking, reverse engineering, amateur radio, cryptography and steganography, and social engineering. We are also receptive to content relating to concrete subjects such as science and mathematics, along with more abstract subjects such as psychology and culture. Both technical and non-technical material is accepted. Submissions of content, suggestions for and criticisms of the zine, and death threats may be sent via: - IRC private message (storm or m0nkee @ irc.gonullyourself.org #gny) - Email (zine@gonullyourself.org) If there is enough feedback, we will publish some of the messages in future issues. Our PGP key is available for use below. We have devoted a lot of effort into this publication and hope that you learn something from reading it. Abiding by our beliefs, any information within this e-zine may be freely re-distributed, utilized, and referenced elsewhere, but we do ask that you keep the articles fully intact (unless citing certain passages) and give credit to the original authors when and where necessary. Go Null Yourself, its staff members, and the authors of GNY Zine are not responsible for any harm or damage that may result from the information presented within this publication. Although people will be people and act in idiotic fashions, we do not condone, promote, or participate in illegal behavior in any way. -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.11 (GNU/Linux) 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 8QJQ4gF00KrsCCSrPyg/cZ5G =g7oJ -----END PGP PUBLIC KEY BLOCK----- [==================================================================================================] -=[ 0x02 Feedback and Edits We always strive to publish accurate information in GNY Zine, but we the authors and editors are in fact human beings and are subject to making mistakes from time to time, despite our best efforts. The publication, compilation, and distribution of this e-zine is derived entirely from our passion for technology and curiosity of how things tick. GNY Zine has no commercial influences. If you find that there is an error in content that we have published, please do not hesitate to email us so that it may be announced and corrected in the next issue. Not acting like a stuck-up elitist about it will probably invoke a more positive response too. With that being said, we are also receptive to content or personal experiences relevant to information presented in past issues. If you've written some code, applied a concept in a new way, or just want to voice your opinion about a topic, send us an email! We may be contacted at: zine@gonullyourself.org (PGP key is available in the Introduction) Please note that emails we like will be published in future issues, so specify if you wish for your message to remain private or if you wish for us to redact certain personal information from it. ---------------------------------------------------------------------------------------------------- In response to the RTLO spoofing article from issue #1, LostBrilliance from InformationLeak.org shared a FireFox plugin he wrote to easily copy the RTLO character into the clipboard. rtolcopy.xpi can be downloaded from: http://www.wonbrilliance.com/rtolcopy/rtolcopy.xpi or simply Base64-decoded from right here: UEsDBBQAAAAIACCARD1IBSSpRAAAAG8AAAAPAAAAY2hyb21lLm1hbmlmZXN0S87PK0nNK1EoKsnPSc4vqFRIhgjo83Lll6UW5SQC RTKK8nNTrfT1k4ryy4tTi/RhSqB8vYrSHIQimEFwVVBjQKp4uQBQSwMEFAAAAAgA7YFEPQBQY/+IAQAAHQMAAAsAAABpbnN0YWxs LnJkZm2SXWvbMBSG7wv9D8K9KAxsKXZoa+O4Gy27KgzCtvtj5SQR6MNIypy07L9Pk5PYyXZnv+d5X58P1897JckvtE4YvUhmGUue m9ub25t6+fqVhJp2i2TrfVdR2vd91heZsRs6K8uSspzmeWpX69QdtId9qt1dMngqVBc2Zd6FlBC9OWNziuqv8S4J3yKkfkXHreh8 6IFAa3Z+keysro6uSmjnQcpUgRZrdH5wBR+qSqwa2X7ujW5tYAVojhk3qqZDbQT9ocMmj3p8HCsaFDbL79/eyIvpDpGI0kgc99Ow bBbLp/eRWI0TNCFFoCN+iySm8i1Y4B4t8SaqO4f23hEuRdcasKuYOU0Yc7lF8MaGGSN0eh2BrVHYwQZ/LN+a6Z2uF0KtN5KH+WgM mtomOwK7Qf+l66TgMOnk8kRn8XyBD+RPrGDrx5TnDNL5w3ydli3DdFZAASWWj8XT/PflTU52JfTP4zrzjEVmIl2xsD8Viuwh+zTQ o0jIuV/6b8PD7f874jVe0/D7N38AUEsDBAoAAAAAALyBRD0AAAAAAAAAAAAAAAAIAAAAY29udGVudC9QSwMEFAAAAAgApYFEPQ1E uOs0AQAA4QEAABMAAABjb250ZW50L292ZXJsYXkueHVsXZFBTwIxEIXvJv6HppeFSwschQWTvUiiwQg3NaaUYbeh7TRtl2X59XZZ Ncit/fJm3puZ2eJkNDmCDwptTsdsRBfz+7sZJqRFS9Qupz6ilujaVc8oSSU25LSK0T1w3jQNM3hWWguGvuQHaI0IETwvRYQDgEvP WIEHpgJDq1t2qjVNLoTMDNjaoavdxan7fW0QdXjtWK/5UakI5l+clwSXCVKixRZ0TosEydtm9UyKSnghUwRKlA3g4xb26CGnQVgV 1RnW4JIioqe9A0Er0RhhU/+j8KQstHJbFH73BDrlJzkp0Di0YGNgUosQILxnj9dzN2pXQuTyt7K6VE7H2SdLfA3+qCQMrtoomxLu hYTAbFjeOA6ntxlYN/Q6emXLQfZRT0YTyIZTSni/Sf63yu5+/OeA829QSwECFAAUAAAACAAggEQ9SAUkqUQAAABvAAAADwAAAAAA AAABACAAAAAAAAAAY2hyb21lLm1hbmlmZXN0UEsBAhQAFAAAAAgA7YFEPQBQY/+IAQAAHQMAAAsAAAAAAAAAAQAgAAAAcQAAAGlu c3RhbGwucmRmUEsBAhQACgAAAAAAvIFEPQAAAAAAAAAAAAAAAAgAAAAAAAAAAAAQAAAAIgIAAGNvbnRlbnQvUEsBAhQAFAAAAAgA pYFEPQ1EuOs0AQAA4QEAABMAAAAAAAAAAQAgAAAASAIAAGNvbnRlbnQvb3ZlcmxheS54dWxQSwUGAAAAAAQABADtAAAArQMAAAAA ---------------------------------------------------------------------------------------------------- Glad to see ya'll put out a new issue, thought I'd send some constructive criticism. 1. Leave the Drama In Your Inbox Nobody wants to learn about your beef with whoever as long as it's just some personal stuff. If somebody ratted on somebody or performed some other type of community transgression then let's hear it but if they're just an asshat or a troll, don't feed them by putting them in your zine. It's a waste of the reader's time. The hacker community already has enough problem with divisiveness. There's people who think they're leeter than everybody else and make the community unwelcoming to newcomers, there's people who give out bad advice, there's people who trojan their tools, and there's people who flame all day. There's also a bunch of inter-personal drama that doesn't need to play out in our forums and newsletters. Be bigger people by not participating in it, calling it out, and "taking the high road". There's also people who rat on their friends and get people locked up, fuck them as well. 2. Can we get a mailing list? A lot of people don't spend all day on forums (though props to those who have the time). If you could set up an email list (announcements only) or an RSS feed for those of us who want to keep up to date with the new issues, that would be awesome! I only happened to come across this issue by chance. 3. Formatting is cool... A text zine is cool but they can be kind of a pain in the ass to scroll through or hand out to people. You can do some easy formatting in your program of choice (indesign, office, etc). If this was something people could print and give people physical copies of, that would be sweet. Hell, you could even get a table at the next HOPE conference and do just that. I know this entails a little more work, but from my perspective it's much more accessible to people, especially those who are new to the hacking scene. 4. Keep the code short It's great that this zine is publishing so much original code, but it can be a pain in the ass to navigate. It would be nice if you could just link to the code and only actually include the parts that are relevant (this is what 2600 does). 5. PGP On the nit-pickey end of things, can you get a PGP key for your email address? The privacy-minded among us would appreciate it and this is a practice all hackers should be promoting. Hope some of this feedback proves useful to you. Keep up the great zine! Thanks, [redacted] >> Thanks for the feedback. We were actually seriously considering printing the zine and offering >> hard copies, but it was just too expensive to do it semi-professionally. We'll still looking for >> ways to do it, though. And you're right about the drama - we'll try to leave worthless squabble >> like that out of future issues. [==================================================================================================] -=[ 0x03 duper's Code Corner -=[ Author: duper -=[ Website: http://projects.ext.haxnet.org/~super/ _=[[ _ __ _ ( ) /_/ ( ) _| | _ _ ___ ___ __ __ __ ___ _| | ___ __ ___ __ ____ ___ __ / o )( U )( o \( o_)( _) (_' / /( o )/ o )( o_) / /( o )( _)( __ )( o_)( _) \___\/___\/ __/ \( /_\ /__) \_\ \_/ \___\ \( \_\ \_/ /_\ /_\/_\ \( /_\ |_| "It is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail." - Abraham Maslow, 1966 CE. (Law of the instrument) ]] -- -- ... o # # |"| !!! -- o,*,(o o) ` /_\ ' #=ooO=========Ooo=# _|_|_ ` _ _ ' -- 8(o o)(_)Ooo - (o o) - # \\ (o o) // # (o o) - (OXO) - -- ooO-(_)---Ooo----ooO--(_)--Ooo---------(_)--------ooO--(_)--Ooo-ooO--(_)--Ooo- -- -- generate a random amateur radio call sign which is formatted in the United -- States FCC's advanced class style, i.e. five characters: KA-KZ, NA-NZ, or -- WA-WZ plus two letters such as "NZ9WA." This is a Lua script tested on: -- Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio math.randomseed(os.time()) function range(from, to, step) step = step or 1 return function(_, lastvalue) local nextvalue = lastvalue + step if step > 0 and nextvalue <= to or step < 0 and nextvalue >= to or step == 0 then return nextvalue end end, nil, from - step end function f() return 3, 1, -1 end prefixTable = {'K', 'N', 'Z'} beginAlpha = 65 beginNumber = 48 charSeq = string.format("%s", prefixTable[math.random(3)]) indexVals = {2, 4, 5} function makesign() local ret = "" local rnd = math.random local fmt = string.format for x in range(f()) do local k = indexVals[x] ret = ret .. fmt("%c", beginAlpha + rnd(25)) if k == 2 then ret = ret .. fmt("%c", beginNumber + rnd(9)) end end ret = ret .. fmt("%c", beginAlpha + rnd(25)) return ret end callSign = makesign() print(callSign) -------------------------------------------------------------------------------- ### Windows Remote Management and PowerShell v2.0 Recipes # # Ever wonder why the new releases of the Windows Server operating systems tend # to expose several odd-ball web servers that claim "Microsoft-HTTPAPI?" If so, # keep reading! Recent enhancements in non-IIS HTTP services are leading to what # is likely one of the biggest out-of-the-box Internetworking changes in recent # years; at least in terms of what's beginning to frequently materialize in nmap # output. It may seem surprising but these additional TCP listeners are actually # closely intertwined with Microsoft's new command-line interface: PowerShell. # PowerShell is a command-line environment developed and supported by Microsoft # that's typically used by Windows Server administrators to structure custom # management tasks. The PowerShell ISE (Integrated Scripting Environment) is now # packaged with Windows Server 2008 R2 out of the box and can be installed # through the Add Features Wizard in Server Manager. Those that are using # Windows client operating systems may download the Windows Management Framework # Core package at Microsoft's web site; it's available in both x86 and x64 # varieties. # # PowerShell is being packaged with the Windows Management Framework because of # the ties it has to WinRM (Windows Remote Management) 2.0. WinRM is a form of # WS-Management for SOAP/XML Web Services. Although WinRM was created by # Microsoft, WS-Management is an open standard developed by DMTF, the Desktop # Management Task Force. Novell also invested in this technology for SuSE Linux; # as a result, an open-source Linux command-line client is available from # openwsman.org. Interestingly enough, there's another open source (MIT license) # management information framework called OpenPegasus that runs on the usual # server-side operating systems--OpenVMS included! Microsoft contributes code to # the project because it's listed at microsoft.com/opensource in addition to the # primary openpegasus.org distribution site. Despite all of this sort of # sideline activity going on, the Windows Server implementations and toolsets # for DMTF's specifications remain mature, rock solid, and lacking # comparison/competition. # # WS-Management and WinRM give PowerShell the capability to execute complex # shell script pipelines across numerous boxen with massive parallelism. The # Invoke-Command cmdlet and the PowerShell ISE "remote" button both utilize # WSMAN. Version 2 of PowerShell features quite a few WinRM-specific cmdlets # and help files out-of-the-box: Name Category ---- -------- Set-WSManQuickConfig Cmdlet Test-WSMan Cmdlet Connect-WSMan Cmdlet Disconnect-WSMan Cmdlet Get-WSManInstance Cmdlet Set-WSManInstance Cmdlet Remove-WSManInstance Cmdlet New-WSManInstance Cmdlet Unregister-PSSessionConfiguration Cmdlet Set-PSSessionConfiguration Cmdlet Enable-PSSessionConfiguration Cmdlet Disable-PSSessionConfiguration Cmdlet Enable-PSRemoting Cmdlet New-PSSession Cmdlet Start-Job Cmdlet Get-WmiObject Cmdlet Get-Service Cmdlet Set-Service Cmdlet about_parameters HelpFile about_preference_variables HelpFile about_remote_FAQ HelpFile about_remote_requirements HelpFile about_remote_troubleshooting HelpFile about_Windows_PowerShell_2.0 HelpFile about_WMI_Cmdlets HelpFile about_WS-Management_Cmdlets HelpFile # It's very typical for Microsoft to provide backwards compatibility in their # new technologies for almost all of their pre-existing or "old" technologies. # WoW64 and UAC File Virtualization are good examples of this concept in # practice. WinRM is no different. WS-Management continues to expose the # pre-existing WMI (Windows Management Instrumentation) namespaces. This is no # mistake--WMI was developed out of another DMTF standard, WBEM (Web-Based # Enterprise Management.) Even Windows client OSen include a Forms GUI for # testing WMI called wbemtest.exe which features WQL, a SQL-like query language # in addition to point-and-click navigation. Up until now, remote WMI access was # typically over DCOM (Distributed Component Object Model), an RPC (Remote # Procedure Call) protocol, e.g. to fetch the process table from a remote # machine one would execute "wmic.exe /user:domain\user /password:pass # /node:hostname process". WMI interaction in PowerShell can be blunt and # direct, as is the case with the Get-WmiObject cmdlet. However, it can also be # abstracted through WinRM. For instance, winrm.cmd is a utility implemented # with Windows Script Host (cscript.exe) that allows leisurely navigation of # WMI's Common Information Model (CIM) via the classic MS-DOS cmd.exe shell: c:\Windows\System32>winrm get wmicimv2/Win32_Service?Name=WinRM Win32_Service AcceptPause = false AcceptStop = true Caption = Windows Remote Management (WS-Management) CheckPoint = 0 CreationClassName = Win32_Service Description = Windows Remote Management (WinRM) service implements the WS-Management protocol for remote management. WS-Management is a standard web services protocol used for remote software and hardware management. The WinRM service listens on the network for WS-Management requests and processes them. The WinRM Service needs to be configured with a listener using winrm.cmd command line tool or through Group Policy in order for it to listen over the network. The WinRM service provides access to WMI data and enables event collection. Event collection and subscription to events require that the service is running. WinRM messages use HTTP and HTTPS as transports. The WinRM service does not depend on IIS but is preconfigured to share a port with IIS on the same machine. The WinRM service reserves the /wsman URL prefix. To prevent conflicts with IIS, administrators should ensure that any websites hosted on IIS do not use the /wsman URL prefix. DesktopInteract = false DisplayName = Windows Remote Management (WS-Management) ErrorControl = Normal ExitCode = 0 InstallDate = null Name = WinRM PathName = C:\Windows\System32\svchost.exe -k NetworkService ProcessId = 228 ServiceSpecificExitCode = 0 ServiceType = Share Process Started = true StartMode = Auto StartName = NT AUTHORITY\NetworkService State = Running Status = OK SystemCreationClassName = Win32_ComputerSystem SystemName = UFO TagId = 0 WaitHint = 0 # By now, I'm sure some are wondering what sort of access control WinRM # implements given the wide array of capabilities it enables. The options are as # follows: None, Basic, Digest, Negotiate, Kerberos, CredSSP. There's also an # option for plaintext SOAP versus HTTPS. Most users are likely to go with the # lame defaults that Set-WSManQuickConfig provides (a PowerShell cmdlet that # also creates an opening in the Windows Firewall ruleset in order to enable # WS-Management activity. If you'd like to fine tune the WinRM security settings # then have a look at "winrm.cmd help auth" in MS-DOS or better yet, comfortable # with the WSMan provider for PowerShell. A PowerShell Provider structures data # into a hierarchy of Windows-style directory pathnames. For example, it's easy # to navigate and edit a registry hive by simply changing to that particular # drive: PS C:\> cd HKLM: PS HKLM:\> dir Hive: HKEY_LOCAL_MACHINE SKC VC Name Property --- -- ---- -------- 2 0 BCD00000000 {} 4 0 HARDWARE {} 1 0 SAM {} Get-ChildItem : Requested registry access is not allowed. At line:1 char:4 + dir <<<< + CategoryInfo : PermissionDenied: (HKEY_LOCAL_MACHINE\SECURITY:String) [Get-ChildItem], SecurityException + FullyQualifiedErrorId : System.Security.SecurityException, Microsoft.PowerShell.Commands.GetChildItemCommand 16 0 SOFTWARE {} 8 0 SYSTEM {} # For those that are accustomed to Unix-like shells, PowerShell is packaged with # dozens of aliases to traditional UNIX commands; i.e. man is Get-Help, mv is # Item-Rename, cd is Set-Location, etc. Run the Get-Alias cmdlet for a full list. # Here's a glimpse of the WSMan provider: PS HKLM:\> cd WSMan:\localhost\Shell PS WSMan:\localhost\Shell> dir WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Shell Name Value ---- ----- AllowRemoteShellAccess true IdleTimeout 180000 MaxConcurrentUsers 5 MaxShellRunTime 2147483647 MaxProcessesPerShell 15 MaxMemoryPerShellMB 150 MaxShellsPerUser 5 # To get a list of available PowerShell providers, run the Get-PSProvider cmdlet. # The remainder of this article consists of demonstrations for various # PowerShell recipes I've found myself writing recently. If you're interested in # learning more about PowerShell or WSMan and the Get-Help system isn't # sufficient, then check with a book retailer. Several excellent pieces of # literature are already available, including some from Microsoft Press. # Get the first ten security event log entries that aren't group policy audit # successes and display them in red while widening the output columns since # event log entries are lengthy. PS C:\Users\Administrator> Write-Host -ForegroundColor Red >> $(Get-EventLog -LogName Where-Object {!($_.EntryType -eq "SuccessAudit")} | >> Select-Object -First 10 | Out-String -Width 192) >> Index Time EntryType Source InstanceID Message ----- ---- --------- ------ ---------- ------- 18116 Nov 25 04:04 FailureA... Microsoft-Windows... 4625 An account failed to log on.... 16855 Nov 11 17:58 FailureA... Microsoft-Windows... 4625 An account failed to log on.... 16854 Nov 11 17:58 FailureA... Microsoft-Windows... 4625 An account failed to log on.... 16592 Oct 17 21:59 FailureA... Microsoft-Windows... 4625 An account failed to log on.... 16420 Oct 07 04:07 FailureA... Microsoft-Windows... 5028 Windows Firewall was unable to parse the new security policy. Windows Firewall will continue to enforce the current poli... 16419 Oct 07 04:07 FailureA... Microsoft-Windows... 5027 The Windows Firewall service was unable to retrieve the security policy from the local storage. Windows Firewall will co... 16411 Oct 07 03:53 FailureA... Microsoft-Windows... 4625 An account failed to log on.... 15703 Sep 09 12:12 FailureA... Microsoft-Windows... 4625 An account failed to log on.... 15702 Sep 09 12:09 FailureA... Microsoft-Windows... 4625 An account failed to log on.... 15633 Sep 09 00:57 FailureA... Microsoft-Windows... 4625 An account failed to log on.... # Show the discretionary access control list for the Background Intelligent # Transfer Service registry keys in the HKEY_LOCAL_MACHINE hive. PS C:\> Get-Acl HKLM:\SYSTEM\CurrentControlSet\services\BITS | Format-List Path : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BITS Owner : BUILTIN\Administrators Group : BUILTIN\Administrators Access : BUILTIN\Users Allow ReadKey BUILTIN\Users Allow -2147483648 BUILTIN\Administrators Allow FullControl BUILTIN\Administrators Allow 268435456 NT AUTHORITY\SYSTEM Allow FullControl NT AUTHORITY\SYSTEM Allow 268435456 CREATOR OWNER Allow 268435456 Audit : Sddl : O:BAG:BAD:AI(A;ID;KR;;;BU)(A;CIIOID;GR;;;BU)(A;ID;KA;;;BA)(A;CIIOID;GA;;;BA)(A;ID;KA;;;SY)(A;CIIOID;GA;;;SY)(A;CIIOID; GA;;;CO) # View all installed Hot Fix ID's on a single line. PS C:\> ((Get-HotFix | %{$_.HotFixId}) -split " ") -join " " KB981391 KB981392 KB977236 KB981111 KB977238 982861 KB977239 KB981390 KB2028551 KB2028560 KB2032276 KB2079403 KB2120976 KB2124261 KB2158563 KB2160329 KB2183461 KB2207566 KB2249857 KB2259539 KB2264080 KB2271195 KB2272691 KB2286198 KB2296011 KB2296199 KB2305420 KB2345316 KB2345886 KB2347290 KB2378111 KB2385678 KB2386667 KB2387149 KB2388210 KB2398632 KB2416471 KB2423089 KB2436673 KB2442962 KB2443685 KB2448827 KB2467659 KB958488 KB971468 KB972270 KB974431 KB974571 KB975467 KB975560 KB976264 KB976902 KB977074 KB977380 KB977894 KB978262 KB978542 KB978601 KB978637 KB978886 KB979099 KB979306 KB979309 KB979482 KB979538 KB979559 KB979683 KB979687 KB979688 KB979900 KB979916 KB980182 KB980195 KB980218 KB980232 KB980408 KB980436 KB980846 KB981332 KB981793 KB981852 KB981957 KB982110 KB982132 KB982214 KB982381 KB982519 KB982799 KB983590 # Display static member methods for the .NET Framework DateTime type in a # self-adjusting tabular output format. PS C:\> [System.DateTime] | Get-Member -Static -MemberType Method | Format-Table -AutoSize TypeName: System.DateTime Name MemberType Definition ---- ---------- ---------- Compare Method static int Compare(System.DateTime t1, System.DateTime t2) DaysInMonth Method static int DaysInMonth(int year, int month) Equals Method static bool Equals(System.DateTime t1, System.DateTime t2), static bool Equals(System.Object objA... FromBinary Method static System.DateTime FromBinary(long dateData) FromFileTime Method static System.DateTime FromFileTime(long fileTime) FromFileTimeUtc Method static System.DateTime FromFileTimeUtc(long fileTime) FromOADate Method static System.DateTime FromOADate(double d) IsLeapYear Method static bool IsLeapYear(int year) Parse Method static System.DateTime Parse(string s), static System.DateTime Parse(string s, System.IFormatProv... ParseExact Method static System.DateTime ParseExact(string s, string format, System.IFormatProvider provider), stat... ReferenceEquals Method static bool ReferenceEquals(System.Object objA, System.Object objB) SpecifyKind Method static System.DateTime SpecifyKind(System.DateTime value, System.DateTimeKind kind) TryParse Method static bool TryParse(string s, System.DateTime&, mscorlib, Version=2.0.0.0, Culture=neutral, Publ... TryParseExact Method static bool TryParseExact(string s, string format, System.IFormatProvider provider, System.Global... # Convert file version information for code modules present in the winlogon.exe process to HTML, # store it in a file, then display the last two modules with CGI escapes but no HTML tags. PS C:\> Get-Process -Module winlogon | ForEach-Object {$_.FileVersionInfo} | ConvertTo-Html | >> Out-File winlogon; Get-Content winlogon.html | Select-String -CaseSensitive >> "
The first decade of the new millennium witnessed an exponential increase
in session management attacks against web applications. The introduction
of the original reflexive cross-site scripting vulnerability type gave
way to an entirely new attack taxonomy that metastasized throughout
the security research community in the following decade. Persistent
cross-site scripting (XSS), cross-site request forgery (CSRF, also known
as "sea surfing") and cross-site tracing are just a few of the attack
classifications that eventually followed from reflexive XSS. Some more
obscure variations include the injection of Javascript into DNS resource
records and session fixation through cross-site cooking (and also
cross-subdomain cooking.)
The universal need for more concise session management solutions coupled
with the nearly ubiquitous presence of vulnerabilities in current
implementations has prompted the W3C to provide an alternative. The
traditional approach to managing web sessions has been via cookies in
the HTTP protocol. Obviously, cookies will still be available going
forward given the necessity of backwards compatibility. However, HTML5
adds the sessionStorage attribute to ECMAScript (a.k.a. Javascript),
thus giving web developers a standard way to store session variables
without cookies. The following example demonstrates this concept:
if (!(sessionStorage.username))
sessionStorage.username = "luser";
else
document.writeln('Welcome back ' + sessionStorage.username);
Essentially, this code assigns a username the first time the browser
renders the page, and shows a message containing that username whenever
the browser renders the page again. So, will this technique prevent the
exploitation of WWW sessions forevermore? Absolutely not, but it most
definitely changes the playing field. For more information, refer to:
http://dev.w3.org/html5/webstorage/
Programatically speaking, HTML5 local storage isn't all that different
from session storage. This is because they both use the ECMAScript
Storage interface definition. The difference is that local storage
persists regardless of session. If a user logs out of a web application
and closes their web browser as well, then variables in local storage
will still be accessible the next time the browser is opened; unlike
session storage. The primary syntactical difference is that the
localStorage
identifier is used as opposed to the
sessionStorage
identifier.
HTML5 provides a JavaScript API for determining the latitude and longitude coordinates of the web browser. At the time of writing, not all browsers fully supported this feature. Opera and Mozilla FireFox implement GeoLocation by negotiating an HTTPS session with Google Apps as opposed to maintaining a client-side copy of GeoIP data. If other browser vendors follow suit, this approach could lead to Denial of Service, location spoofing, client-side attacks and similar issues if the web service referral technique is not developed carefully. Disabling Opera's GeoLocation functionality is as simple as adding an entry to /etc/hosts for the address to the Google Apps server (api.google.com.) Performing such an attack remotely could involve techniques as conventional as DNS cache poisoning and ARP redirection. At the time of writing, IE9 beta still did not support the new GeoLocation API. What follows is a code snippet demonstrating JavaScript syntax that utilizes the HTML5 GeoLocation API. For more information, refer to: http://dev.w3.org/geo/api/
HTML5 adds browser-side public key infrastructure (PKI) functionality to HTML forms via a key-pair generator/input control, i.e. the <keygen> tag. The Opera browser is a bit ahead of Mozilla FireFox and Microsoft Internet Explorer in terms of HTML5 development; even the IE9 beta. At the time of writing, I was able to create forms supporting various PKI algorithms in Opera 10.63 Build 5136 with key sizes ranging from 1024 bits to 4096 bits. Opera owns and operates a root store for SSL certificates as well. As a result, they've effectively monopolized the supply of root certificate authorities permitted to validate digital signatures in leaf and intermediate chain verification positions. Visit my.opera.com/rootstore for more information. The following is a list of currently supported algorithms:
The popularity and prevalence of the drive-by download technique in
malware distribution circles is largely due to its efficiency as one
of the most potent executable code delivery and bootstrapping options
available. Undoubtedly, this is the sort of situation that begs for
improvement and web standards have naturally been forced into flux as a
result. Originally, the idea was that all web browsers were responsible
for enforcing data integrity as it relates to where the data originated
from. The same-origin policy was an imaginary rule of thumb for web
developers, but it rarely crossed over into the arena of solid
practicality. It wasn't so much of a protective feature as it was a
principle or a natural side effect of electronic data transfer that gave
rise to a natural progression of developer reactions that were
appropriate in the context of growing e-commerce transactions and other
information parsing and exchange processes that were beginning to take
place online.
The HTML5 version of IFRAME now has two new attributes: seamless and
sandboxed. Enabling the seamless attribute causes the IFRAME to become
one with the parent document (e.g. frameborder, marginwidth, etc. are
no longer specified.) Seamless IFRAME's make injection that much more
dangerous, although sandboxing makes it that much more difficult because
by default it disables scripts, forms, foreign origins (CSRF'ing), and
top-level context navigation (DOM traversal). Since IFRAME sandboxing
is essentially a client-side WAF (Web Application Firewall) in default
deny mode, each one of the four settings must be enabled explicitly
like so:
The first IFRAME above is the empty attribute syntax version which
creates a frame that's, as they say, "secure by default." The second
IFRAME tag explicitly disables all the sandboxing features; in other
words, such a tag offers no protection at all. Furthermore, a sandbox
attribute with both the allow-same-origin and allow-scripts keywords
can be compromised if the site hosting the source HTML for the frame
decides to include some JavaScript that removes the sandboxed
attribute from the DOM. IFRAME sandboxing should not be relied on to
protect end users from malicious sites as it becomes a matter of the
attacker conning them into a direct site visit. Nevertheless,
"collateral" damage can be minimized by setting the frame's
MIME Content-Type to "text/html-sandboxed" which is similar to
Microsoft Internet Explorer's support for the "X-Content-Type-Options:
nosniff" HTTP response header. "html-sandboxed" is standard but
"nosniff" could be easier to setup in some environments. These
settings stop the browser from determining document format based on
predictable magic bytes in the file header (which goes a long way
in the prevention of drive-by downloads and DOM-based attacks.)
Of course the sandbox settings are only applicable within the context of
the newly rendered IFRAME (as opposed to the entire page) -- which
allows for some granularity in page control. Also keep in mind that
IFRAME sandboxen will not affect browser plug-ins such as Java applets,
Flash, Adobe Reader, SilverLight, etc. Therefore, if a plug-in happens
to get compromised while executing within the browser, then the attacker
gains access to at least the current browser session--thus, sandbox
subversion becomes rather trivial.
X-Content-Type-Options is just one of an extremely long list of custom
workarounds for what is now becoming standard in HTML5. Loads of HTML5
shim projects have already materialized on the Net's open source
repositories, e.g. GitHub, Google Code, SourceForge, etc. There is some
good work being done to protect web clients' information assets; the
problem is that so many new features are being standardized and released
so quickly that there can't possibly have been enough security testing
performed.
In purely hypothetical terms, the notion of same-origin sounds like
some sort of fundamental axiom that's in possession of structural
fortitude in spite of adversity. Realistically, generation Web 2.0
proved it nothing more than clear-cut snake oil. It doesn't take long to
find a web log comment form with IFRAME injections advertising black
market pharmaceuticals. Moreover, it's quite typical for web
applications to embed functionality from a sister site that sports a
different domain name, thereby dismissing any semblance of identical
origination. There's far too many code injection attacks that all lead
to rewriting document location--certainly something that's unacceptable
when in combination with the multitude of legitimate site design
possibilities causing the same issue. The W3C (World Wide Web
Consortium) community is providing some reactionary solutions for all
the shenanigans that transpired as misuse and abuse of the same-origin
policy. The name of the mechanism tasked with handling this can of
worms is "Cross-Origin Resource Sharing", or CORS for short. Perhaps the
characters supporting the W3C pronounce the acronym in a manner that is
akin to the name of a certain brewing company in Colorado.
CORS regulates the authorization of untrusted web server actions
according to the type of foreign data access operation being performed.
Any sufficiently archetypal state transition on the Web can be labeled
as descending from at least one of four essential classification types:
cross-host, cross-subdomain, cross-port, and/or cross-protocol. Note
that cross-protocol includes going from plaintext HTTP to encrypted
HTTPS and vice versa, so it could also be termed cross-method as it
includes any hyperlink which is prepended with a new or different URI
scheme. Of course there are other more fine-grained categorizations in
the HTML5 security taxonomy, such as cross-service and cross-path (i.e.
modifying the SOAPAction HTTP request header field and the
pseudo-virtual filesystem directory pathnames exposed by RESTful URL
query strings.) However, sharing space with an attacker on a web hosting
service is out of the question for sites being deployed in
mission-critical production environments.
Various RIA (Rich Internet Application) suites including Flash and
SilverLight have been using XML to define cross-origin policies that
are localized to the browser plug-in. The XML Schema Definition (XSD)
for Adobe's Cross Domain Policy Specification sprung forth with a need
for the four principal origin crossings types which were just described.
This technique of storing a tiny XML document under the web server root
directory has been so effective that plug-ins maintained by other vendors
now support Adobe's crossdomain.xml format. With that being said, it also
has a cousin format; clientaccesspolicy.xml was developed by Microsoft
to define network security policies for SilverLight instances running in
tandem with web browsers that have their own set of policies to enforce.
SilverLight well attempt to use crossdomain.xml after it first
determines clientaccesspolicy.xml does not exist. Adobe's Cross Domain
Policy format enjoys wider use and is better known. In the examples
shown below, the top instance is the least permissive and the bottom is
the least restrictive--in terms of the permissions that are being
granted relative to cross-origin policies and such.
W3C is really going overboard this time. Another new HTML5 feature is
the ability to enable the hidden attribute for any element
tag. As a result, the element wouldn't be rendered by the web browser.
I suppose this enables more dynamic page control by allowing hidden
elements to be un-hidden
by rewriting the DOM with JavaScript.
In the past, I haven't been too concerned about my relative anonymity
while surfing the net over Tor with Vidalia. If I'm forwarding DNS
requests to resolvers in onion routes and there's no Java Runtime
Environment in my browser to instantiate TCP sockets, then there's a
fairly high probability that my identity is unknown to my traffic's
destinations. All of these new features in HTML5 have undeniably shaken
my perception of personal safety, at least in the realm of web browsers
with graphical user interfaces. I suppose I could torify lynx, but that
wouldn't be much fun at all.
The Selectors API (Application Programming Interface) is much like an
abstraction or ORM (Object Relational Model) for the DOM. Accessing
elements using Selectors allows one to access the desired elements
with very little syntactical baggage compared to performing an
identical operation on the DOM in the past with JavaScript. Despite
the improvement, I believe it's just another potential code injection
vulnerability. Here's a code snippet I found on the Web for visual
demonstration:
document.querySelectorAll('section:nth-of-type(6) li:nth-child(odd)')
Looks pretty injectable, right? If you thought that was bad, then
brace yourself, cause JavaScript will soon be featuring a Web SQL
interface to boot. Another specification that's destined to
immediately become classic is the Web Sockets API. Perhaps it's not as
lunatic as it sounds since it "does not allow for raw access to the
underlying network." It only "maintains bidirectional communications
with server-side processes." The issue that's overshadowing each and
every one of these little standards in this onslaught is that the
sum total of them all is just one massive piece of shit rapidly
approaching an industrial strength cooling fan (and eventually coming
out at the other end of the Intertubes.)
http://www.w3.org/TR/webdatabase/
http://www.w3.org/TR/websockets/