
Dailydave mailing list archives
RE: Anatomy of a slightly better hack
From: "Matt Fisher" <mfisher () spidynamics com>
Date: Wed, 6 Jul 2005 22:36:07 -0400
I believe a lot of that stuff you can do right in the sqli if you're already SA anyhow ... And seeing how every login form should POST, and how POSTs aren't logged by the web server, and how SA can probably destroy the db logging, and this would all be over ssl ... whoami: exec sp_who and just for the sake of doing it, exec sp_sysxlogins to enum all the native/mixed mode accts, Could also use xp_isNTAdmin to check their status ;) Portscan: forgot the commands, it's in a paper som hostname: select @@servername portscan: select * from OPENROWSET( 'SQLoledb''server=172.17.0.3;uid=solong;pwd=nthx4alldaphishes',... list services: mmm dunno, maybe brute xp_servicecontrol ? getsysteminfo: does xp_regread work on a remote machine ?
-----Original Message----- From: Dave Aitel [mailto:dave () immunitysec com] Sent: Wednesday, July 06, 2005 9:03 PM To: Matt Fisher Subject: Re: [Dailydave] Anatomy of a slightly better hack Matt Fisher wrote:You can do most of that shizzle with the sqli anyhow, andwith unloggedPOSTs too boot.You should post to the list. :> -dave-----Original Message----- From: dailydave-bounces () lists immunitysec com [mailto:dailydave-bounces () lists immunitysec com] On Behalf Of Dave Aitel Sent: Wednesday, July 06, 2005 10:48 AM To: dailydave Subject: [Dailydave] Anatomy of a slightly better hack This article, generically titled "Anatomy of a Hack" has been wandering around the net lately. I thought it'd be fun, as a group exersize, to improve on the material. Admittedly, thearticle is forbeginners, but maybe we can change that? http://www.microsoft.com/technet/technetmag/issues/2005/01/Ana tomyofaHack/default.aspx On thing I notice right away is that the article uses a lotof toolsyou pretty much have to guess at. What exactly does "DiscoverHosts" do? The figures show you the output - I assume you candownload thesetools on some MSDN CD or something. I notice he's using Windows to hack with - which is funny, because very few hackers actually use Windows as their desktop - there's no GRSecurity for Windows. :> In any case, it probably would be better if he had used theindustrystandard nmap to do his scanning, like every other article.NMap hasthat neat "resolve all the domain names asyncronously" thing. The bit about XSS (just below the SQL Injection bit) isoddly placed,considering there's no guarantee this is actually cross site scripting. It might or might not be, but we have no reason to thinkeither way atthis point. After that he uses xp_cmdshell('TFTP') to download netcat to his target, although it would have been a lot cooler if he'dused debug towrite a little .com to do that for him. And netcat is so...1980's. These days you can get Hydrogen for free and have some real encryption, file uploading/downloading, for roughly thesame size. Youcould probably upload it via a debug script without havingto write astage0 downloader. Hacking without crypto is lame. I noticehe createsa directory c:\warez, which is probably not optimal. One thing I notice about his dumpinfo tool is that it tells you all the wrong things. Your first job when on a new box is notto find outthe users on the box - it's to find out if you were caughtand cleanup any logs. He needs to first look at the processes andsee if anyoneis logged on locally - a screen shot is useful for this. (Iknow, andyou thought CANVAS's screenshot module was just for kicksand grins,didn't you?) "Are people sitting here editing word documents orwhat?" I'mabout to generate a lot of disk activity, and I don't wantpeople tobe like "wtf?" He does do a pretty good job with the shared serviceaccounts gimmick,but he misses that domain tokens can be in all sorts of random processes - the web server is a good one. It's likely the domainadmin has beenadmining his web server lately, and you can hop into thatprocess tocheck to see if a token is sitting around for the taking. It's interesting how lucky he gets with LSADump. I never get lucky enough to see anything interesting. Is this true for everyone else too? Then he...mounts a drive. This is very non-covert. Mountingdrives isvery suspicious activity, even by windows admin standards. :> He decides to get logged and go through terminal servicesso he can dosome "GUI hacking". I have no idea why he thinks this is agood idea,but I guess it makes for flashier screenshots. Having Hydrogen instead of netcat would make using socketpipe unnecessary. I notice he's careful to avoid saying which passwordcracker he uses -I assume john the ripper or l0phtcrack. Anyways, just some thoughts. Back to haxing. -dave _______________________________________________ Dailydave mailing list Dailydave () lists immunitysec com https://lists.immunitysec.com/mailman/listinfo/dailydave
_______________________________________________ Dailydave mailing list Dailydave () lists immunitysec com https://lists.immunitysec.com/mailman/listinfo/dailydave
Current thread:
- Anatomy of a slightly better hack Dave Aitel (Jul 06)
- Re: Anatomy of a slightly better hack byte_jump (Jul 06)
- <Possible follow-ups>
- RE: Anatomy of a slightly better hack Matt Fisher (Jul 06)
- RE: Anatomy of a slightly better hack Kyle Quest (Jul 07)