DontGetCaughtBoyz*HS*


SUBMITTED BY: ProffesorFaux

DATE: March 25, 2020, 4:35 a.m.

FORMAT: Text only

SIZE: 38.2 kB

HITS: 512

  1. I.INTRODUCTION
  2. II.MENTAL
  3. III.BASICS
  4. IV.ADVANCED
  5. V.UNDER SUSPECT
  6. VI.CAUGHT
  7. VII.PROGRAMS
  8. VIII.LAST WORDS
  9. I. INTRODUCTION
  10. Please excuse my poor english - I'm german so it's not my mother language
  11. I'm writing in. Anyway if your english is far better than mine, then don't
  12. think this text hasn't got anything to offer you. In contrast. Ignore the
  13. spelling errors & syntax - the contents of this document is important ...
  14. NOTE : This text is splitted into TWO parts.
  15. The first one, this, teaches about the background and theory.
  16. The second just shows the basics by an easy step-by-step
  17. procedure what to type and what to avoid.
  18. If you are too lazy to read this whole stuff here (sucker!)
  19. then read that one. It's main targets are novice unix hackers.
  20. If you think, getting the newest exploits fast is the most important thing
  21. you must think about and keep your eyes on - you are wrong. How does the
  22. best exploit helps you once the police has seized your computer, all your
  23. accounts closed and everything monitored? Not to mention the warrants etc.
  24. No, the most important thing is not to get caught. It is the FIRST thing
  25. every hacker should learn, because on many occasions, especially if you
  26. make your first hacks at a site which is security conscious because of
  27. many break-ins, your first hack can be your last one (even if all that
  28. lays back a year ago "they" may come up with that!), or you are too lazy
  29. to change your habits later in your career. So read through these sections
  30. carefully! Even a very skilled hacker can learn a bit or byte here.
  31. So this is what you find here:
  32. Section I - you are reading me, the introduction
  33. Section II - the mental things and how to become paranoid
  34. 1. Motivation
  35. 2. Why you must become paranoid
  36. 3. How to become paranoid
  37. 4. Stay paranoid
  38. Section III - the basics you should know BEFORE begin hacking
  39. 1. Preface
  40. 2. Secure Yourself
  41. 3. Your own account
  42. 4. The logs
  43. 5. Don't leave a trace
  44. 6. Things you should avoid
  45. Section IV - the advanced techniques you should take a notice of
  46. 1. Preface
  47. 2. Prevent Tracing of any kind
  48. 3. Find and manipulate any log files
  49. 4. Check the syslog configuration and logfile
  50. 5. Check for installed security programs
  51. 6. Check the admins
  52. 7. How to "correct" checksum checking software
  53. 8. User Security Tricks
  54. 9. Miscellaneous
  55. Section V - what to do once you are under suspect
  56. Section VI - the does and dont's when you got caught
  57. Section VII - a short listing of the best programs for hiding
  58. Section VIII - last words, the common bullshit writers wanna say
  59. Read carefully and enlighten yourself.
  60. II. MENTAL
  61. CONTENTS:
  62. 1. Motivation
  63. 2. Why you must become paranoid
  64. 3. How to become paranoid
  65. 4. Stay paranoid
  66. 1. MOTIVATION
  67. The mental aspect is the key to be successful in anything.
  68. It's the power to motivate yourself, fight on if it hurts, being self
  69. disciplined, paranoid & realistic, calculate risks correctly and do stuff
  70. you don't like but are important even if you'd like to go swimming now.
  71. If you can't motivate yourself to program important tools, wait for the
  72. crucial time to hit the target, then you'll never get anywhere with your
  73. "hacks"
  74. A successful and good hacker must meet these mental requirements. It's like
  75. doing bodybuilding or a diet - you can learn it if you really try.
  76. EVEN THE BEST KNOWLEDGE WON'T HELP YOU UNTIL YOU ARE REALLY CONCERNED TO DO
  77. THE PREVENTIONS AND ACTUAL MAKE THEM !
  78. 2. WHY YOU MUST BECOME PARANOID
  79. It's right that normally being paranoid is not something which makes your
  80. life happier. However if you aren't expecting the worst, anything can hit
  81. you and throw you off balance. And you are risking very much with your
  82. doings. In your normal life you don't need to worry much about cops,
  83. thieves and therelike. But if you are on the other side remember that you
  84. make other people a hard life and bring them nightmares plus work - and
  85. they want to stop you.
  86. Even if you don't feel like committing a crime - you actually do. Hacker-
  87. Witchhunting pops up fast and gets everyone who might be involved. It's the
  88. sad thing : YOU ARE GUILTY UNTIL PROVEN OTHERWISE ! Once you've got the
  89. stigma being a hacker you'll never get it off. Once having an entry in your
  90. police record it's very hard to find a job. Especially no software company,
  91. even no computer related company will ever hire you, they will be afraid
  92. of your skills, and you will see yourself being forced to emmigrate or your
  93. life lost. Once you fall down only a few can get up again.
  94. Become paranoid!
  95. Protect yourself!
  96. Remember you have got everything to loose!
  97. Never feel silly doing THAT extraordinary action against tracing!
  98. Never bother if someone laughs on your paranoid doing!
  99. Never be too lazy or tired to modify the logs!
  100. A hacker must do his work 100% !
  101. 3. HOW TO BECOME PARANOID
  102. If you've read the part above and you think thats true, it's easy - you've
  103. got already become paranoid. But it must become a substantial part of your
  104. life. If you made it becoming a good hacker always think about whom to tell
  105. what, and that you phone calls and emails might be monitored. Always reread
  106. the section above.
  107. If the above didn't helped you, then think about what happens if you are
  108. caught. Would your girlfriend stay at your side? Even if her father speaks
  109. a hard word? Do you want to see your parents cry? Thrown from your
  110. school/university/job?
  111. Don't give this a chance to happen!
  112. If even this is not enough to motivate you: KEEP AWAY FROM HACKING! You
  113. are a danger to the whole hacking society and your friends !
  114. 4. STAY PARANOID
  115. I hope you learned now why it is important to become paranoid. So stay
  116. paranoid. One mistake or lazy moment could suffice to ruin your life or
  117. career.
  118. Always maintain motivation to do it.
  119. III. BASICS
  120. CONTENTS:
  121. 1. Preface
  122. 2. Secure Yourself
  123. 3. Your own account
  124. 4. The logs
  125. 5. Don't leave a trace
  126. 6. Things you should avoid
  127. 1. PREFACE
  128. You should know this and practice it before you start your first hack.
  129. These are the absolute basics, without them you are in trouble soon. Even
  130. an experienced hacker can find a new hint/info in here.
  131. 2. SECURE YOURSELF
  132. What if a SysAdmin reads your email?
  133. What if your phone calls are recorded by the police?
  134. What if the police seizes your computer with all your hacking data on it?
  135. If you don't receive suspicious email, don't talk about hacking/phreaking
  136. on the phone and haven't got sensitive/private files on your harddisk then
  137. you don't need to worry. But then again you aren't a hacker. Every hacker
  138. or phreaker must keep in touch with others and have got his data saved
  139. somewhere.
  140. Crypt every data which is sensitive! Online-Harddisk-Crypter are very
  141. important and useful:
  142. There are good harddisk crypters free available an the internet, which
  143. behave fully transparent to your operating systems, i.e. the packages
  144. listed below are tested and were found to be a hacker's first-choice:
  145. ïIf you use MsDos get SFS v1.17 or SecureDrive 1.4b ïIf you use Amiga get
  146. EnigmaII v1.5 ïIf you use Unix get CFS v1.33
  147. File Crypters: You can use any, but it should use one of the well known and
  148. secure algorythms. NEVER use a crypting program which can be exported
  149. because their effective keylengths are reduced!
  150. ïTriple DES ïIDEA ïBlowfish (32 rounds)
  151. Encrypt your emails!
  152. ïPGP v2.6.x is used most so use it too.
  153. Encrypt your phonecalls if you want to discuss important things.
  154. ïNautilus v1.5a is so far the best
  155. Encrypt your terminal sessions when connected to a unix system. Someone
  156. might be sniffing, or monitoring your phone line.
  157. ïSSH is the so far most secure ïDES-Login is fine too
  158. Use strong passwords, non-guessable passwords which are not mentioned in
  159. any dictionary. They should seem random but good to remember for yourself.
  160. If the keylength is allowed to be longer than 10 chars, use that, and
  161. choose a sentence from a book, slightly modified. Please crypt phonenumbers
  162. of hacker friends twice. And call them from payphones/officephones/etc.
  163. only, if you don't encrypt the conversation.
  164. The beginner only needs PGP, a filecrypter and an online-hardisk-crypter.
  165. If you are really deep into hacking remember to encrypt everything.
  166. Make a backup of your data (Zip-Drive, other harddisk, CD, Tape), crypted
  167. of course, and store it somewhere which doesn't belong to any computer
  168. related guy or family member and doesn't belong to your house. So if a
  169. defect, fire or fed raid occures you got a backup of your data.
  170. Keep written notices only as long as you really need them. Not longer.
  171. Keeping them in an encrypted file or on an encrypted partition is much
  172. more secure. Burn the papers once you don't need them anymore. You can also
  173. write them down with a crypt algorythm which only you know of, but don't
  174. tell others and don't use it too often or it can be easily analyzed and
  175. broken.
  176. Really hardcore or ultra paranoid hackers should consider too the TEMPEST
  177. Project. Cops, spies and hackers could monitor all your doings. A well
  178. equipted man could have anything he wants : Electronic pulse emanation can
  179. be catched from more than 100 meters away and show your monitor screen to
  180. somebody else, a laserpoint to your window to hear private conversations,
  181. or identifying hifrequency signals of keyboard clicks ... so possiblities
  182. are endless Lowcost prevention can be done by electronic pulse jammers
  183. and therelike which become available on the public market, but I don't
  184. think this is secure enough to keep anyone dedicated away.
  185. 3. YOUR OWN ACCOUNT
  186. So let's talk about your own account. This is your real account you got at
  187. your school/university/job/provider and is associated with your name. Never
  188. forget to fail these rules:
  189. Never do any illegal or suspicious things with your real accounts! Never
  190. even try to telnet to a hacked host! Security mailing lists are okay to
  191. read with this account. But everything which seems to have to do with
  192. hacking must be either encrypted or be deleted as once. Never leave/save
  193. hacking/security tools on your account's harddisk. If you can, use POP3 to
  194. connect to the mailserver and get+delete your email (or do it in an other
  195. way if you are experienced enough using unix) Never give out your real
  196. email if your realname is in your .plan file and/or geco field (remember
  197. the EXPN command from sendmail ...) Give it only to guys who you can trust
  198. and are also security conscious, because if they are caught you may follow
  199. (or if it's a fed, not a hacker) Exchange emails with other hackers only
  200. if they are encrypted (PGP) SysAdmins OFTEN snoop user directories and read
  201. other's email! Or another hacker might hack your site and try to get your
  202. stuff!
  203. Never use your account in a way which shows interest in hacking. Interest
  204. in security is okay but nothing more.
  205. 4. THE LOGS
  206. There are 3 important log files:
  207. WTMP - every log on/off, with login/logout time plus tty and host
  208. UTMP - who is online at the moment
  209. LASTLOG - where did the logins come from
  210. There exist others, but those will be discussed in the advanced section.
  211. Every login via telnet, ftp, rlogin and on some systems rsh are written to
  212. these logs. It is VERY important that you delete yourself from those
  213. logfiles if you are hacking because otherwise they
  214. a) can see when did you do the hacking exactly
  215. b) from which site you came
  216. c) how long you were online and can calculate the impact
  217. NEVER DELETE THE LOGS! It's the easiest way to show the admin that a hacker
  218. was on the machine. Get a good program to modify the logs. ZAP (or ZAP2) is
  219. often mentioned as the best - but in fact it isn't. All it does is
  220. overwriting the last login-data of the user with zeros. CERT already
  221. released simple programs which check for those zero'ed entries. So thats
  222. an easy way to reveil the hacker to the admin too. He'll know someone
  223. hacked root access and then all you work was worthless. Another important
  224. thing about zap is that it don't report if it can't find the log files - so
  225. check the paths first before compiling! Get either a program which CHANGES
  226. the data (like CLOAK2) or a really good one which DELETES the entries
  227. (like CLEAR).
  228. Normally you must be root to modify the logs (except for old distributions
  229. which have got utmp and wtmp world-writable). But what if you didn't made
  230. it hacking root - what can you do? Not very much : Do a rlogin to the
  231. computer you are on, to add a new unsuspicous LASTLOG data which will be
  232. displayed to the owner when he logs on next time. So he won't get
  233. suspicious if he sees "localhost". Many unix distributions got a bug with
  234. the login command. When you execute it again after you logged already on,
  235. it overwrites the login-from field in the UTMP (which shows the host you
  236. are coming from!) with your current tty.
  237. Where are these log files by default located? That depends on the unix
  238. distribution.
  239. UTMP : /etc or /var/adm or /usr/adm or /usr/var/adm or /var/log
  240. WTMP : /etc or /var/adm or /usr/adm or /usr/var/adm or /var/log
  241. LASTLOG : /usr/var/adm or /usr/adm or /var/adm or /var/log
  242. on some old unix dists the lastlog data is written into $HOME/.lastlog
  243. 5. DON'T LEAVE A TRACE
  244. I encountered many hackers who deleted themselves from the logs. But they
  245. forgot to erase other things they left on the machines : Files in /tmp and
  246. $HOME
  247. Shell History
  248. It should be another as you current login account uses. Some shells leave
  249. a history file (depends on enviroment configuration) with all the commands
  250. typed. Thats very bad for a hacker. The best choice is to start a new shell
  251. as your first command after logging in, and checking every time for a
  252. history file in you $HOME. History files :
  253. sh:.sh_historycsh:.historyksh:.sh_historybash:.bash_historyzsh:.history
  254. Backup Files :
  255. dead.letter, *.bak, *~
  256. In other words: do an "ls -altr" before you leave!
  257. Here're 4 csh commands which will delete the .history when you log out,
  258. without any trace.
  259. mv .logout save.1
  260. echo rm .history>.logout
  261. echo rm .logout>>.logout
  262. echo mv save.1 .logout>>.logout
  263. 6. THINGS YOU SHOULD AVOID
  264. Don't crack passwords on an other machine than your own, and then only on a
  265. crypted partition. If you crack them on a e.g. university and the root sees
  266. your process and examines it not only your hacking account is history but
  267. also the site from which the password file is and the university will keep
  268. all eyes open to watch out for you. Download/grab the passwd data and crack
  269. them on a second computer or in a background process. You don't need many
  270. cracked accounts, only a few.
  271. If you run important programs like ypx, iss, satan or exploiting programs
  272. then rename them before executing or use the small common source to exchange
  273. the executed filename in the process list ... ever security conscious user
  274. (and of course admin) knows what's going on if he sees 5 ypx programs
  275. running in the background ... And of course if possible don't enter
  276. parameters on the command line if the program supports an interactive mode,
  277. like telnet. Type "telnet" and then "open target.host.com" ... which won't
  278. show the target host in the process list as parameter.
  279. If you hacked a system - don't put a suid shell somewhere! Better try to
  280. install some backdoors like ping, quota or login and use fix to correct
  281. the atime and mtime of the file if you don't have got another possiblity.
  282. IV. ADVANCED
  283. CONTENTS:
  284. 1. Preface
  285. 2. Prevent Tracing of any kind
  286. 3. Find and manipulate any log files
  287. 4. Check the syslog configuration and logfile
  288. 5. Check for installed security programs
  289. 6. Check the admins
  290. 7. How to "correct" checksum checking software
  291. 8. User Security Tricks
  292. 9. Miscellaneous
  293. 1. PREFACE
  294. Once you installed your first sniffer and begin to hack worldwide then you
  295. should know and use these checks & techniques! Use the tips presented here
  296. - otherwise your activity will be over soon.
  297. 2. PREVENT TRACING OF ANY KIND
  298. Sometimes your hacking will be noticed. Thats not a real problem - some of
  299. your sites will be down but who cares, there are enough out there to
  300. overtake. The very dangerous thing is when they try to trace you back to
  301. your origin - to deal with you - bust you!
  302. This short chapter will tell you every possiblity THEY have to trace you
  303. and what possibilities YOU have to prevent that.
  304. 1. Normally it should be no problem for the Admin to identify the system
  305. the hacker is coming from by either:
  306. ïchecking the log entries; if the hacker was really lame, ïtaking a look at
  307. the sniffer output the hacker installed and he's in too, ïany other audit
  308. software like loginlog, ïor even show all estrablished connections with
  309. "netstat" if the hacker is currently online
  310. - expect that they'll find out! Thats why you need a gateway server.
  311. 2. A gateway server in between - what is it? Thats one of many many servers
  312. you have accounts on, which are absolutely boring systems and you have got
  313. root access on. You need the root access to alter the wtmp and lastlog
  314. files plus maybe some audit logs do nothing else on these machines! You
  315. should change the gateway servers on a regular basis, say every 1-2 weeks,
  316. and don't use them again for at least a month. With this behaviour it's
  317. unlikely that they will trace you back to your next point of origin : the
  318. hacking server.
  319. 3. Your Hacking Server - basis of all activity From these server you do
  320. begin hacking. Telnet (or better : remsh/rsh) to a gateway machine and
  321. then to the target. You need again root access to change the logs. You
  322. should change your hacking server every 2-4 weeks.
  323. 4. Your Bastian/Dialup server. This is the critical point. Once they can
  324. trace you back to your dialup machine you are already fried. A call to the
  325. police, a line trace and your computer hacking activity is history - and
  326. maybe the rest of your future too. You *don't* need root access on a
  327. bastion host. Since you only connect to it via modem there are no logs
  328. which must be changed. You should use a different account to log on the
  329. system every day, and try to use those which are seldom used. Don't modify
  330. the system in any way! You should've got at least 2 bastion host systems
  331. you can dialup to and switch between them every 1-2 month.
  332. Note: If you have got the possiblity to dialup different systems
  333. every day (f.e. due blueboxing) then do so. you don't need
  334. a hacking server then.
  335. 5. Do bluebox/card your call or use an outdial or any other way. So even
  336. when they capture back your bastion host, they can't trace you (easily) ...
  337. For blueboxing you must be cautious, because germany and the phone companies
  338. in the USA do have surveillance systems to detect blueboxers ... At&t traces
  339. fake cred card users etc. Using a system in between to transfer your call
  340. does on the one side make tracine more difficult - but also exposes you to
  341. the rish being caught for using a pbx etc. It's up to you. Note too that in
  342. f.e. Denmark all - ALL - calling data is saved! Even 10 years after your
  343. call they can prove that *you* logged on the dialup system which was used
  344. by a hacker ...
  345. 6.Miscellaneous
  346. If you want to run satan, iss, ypx, nfs filehandle guessing etc. then use a
  347. special server for this. don't use it to actually telnet/rlogin etc. to a
  348. target system, only use it for scanning. Connect to it as if it were a
  349. gateway server.
  350. Tools are out there which binds to a specific port, and when a connection
  351. is established to this port, it's automatically opening a connection to
  352. another server some other just act like a shell on the system, so you do a
  353. "telnet" from this socket daemon too. With such a program running you won't
  354. be written in any log except firewall logs. There are numerous programs
  355. out there which do that stuff for you.
  356. If possible, the hacking server and/or the gateway machine should be
  357. located in a foreign country! Because if your breakin (attempt) was
  358. detected and your origin host identified then most admins will tend to give
  359. up to hunt after you. Even if the feds try to trace you through different
  360. countries it will delay them by at least 2-10 weeks ...
  361. CONCLUSION: If you hack other stuff than univerisities then do it this way!
  362. Here is a small picture to help you ;-)
  363. +-------+ ~---------------> +-------------+ +-----------+
  364. |+-----+| >hopefully > |one of at | |one of many|
  365. || YOU || --> >a trace-safe > --> |least 3 | --> |hacking |
  366. |+-----+| >dial possiblity> |bastion hosts| |server |
  367. +-------+ ~---------------> +-------------+ +-----------+
  368. |
  369. |
  370. v
  371. +-----------------+ +--------+ +-----------+
  372. |maybe additional | | the | |one hacked |
  373. |server from | ... <-- ... | main | <-- |server as |
  374. |internal network | | target | |gateway |
  375. +-----------------+ +--------+ +-----------+
  376. 3. FIND AND MANIPULATE ANY LOG FILES
  377. It's important that you find all logfiles - even the hidden ones. To find
  378. any kind of logfiles there are two easy possibilities:
  379. ïFind all open files.
  380. Since all logfiles must write somewhere, get the cute program LSOF - LiSt
  381. Open Files - to see them ... check them ... and if necessary correct them.
  382. ïSearch for all files changed after your login.
  383. After your login do a "touch /tmp/check" then work on. Later just do a
  384. "find / -newer /tmp/check -print" and check them if any of those are
  385. audit files. see>check>correct. Note that not all versions of find support
  386. the -newer option You can also do a "find / -ctime 0 -print" or
  387. "find / -cmin 0 -print" to find them.
  388. Check all logfiles you find. Normally they are in /usr/adm, /var/adm or
  389. /var/log. If things are logged to @loghost then you are in trouble. You
  390. need to hack the loghost machine to modify the logs there too ...
  391. To manipulate the logs you can either do things like "grep -v", or do a
  392. linecount with wc, and then cut off the last 10 lines with
  393. "head -LineNumbersMinus10", or use an editor etc. If the log/audit files
  394. are not textfiles but datarecords ... identify the software which writes
  395. the logfiles. Then get the sourcecode. Then find the matching header file
  396. which defines the structure of the file. Get zap, clear, cloak etc. and
  397. rewrite it with the header file to use with this special kind of logfile
  398. (and it would be kind to publish your new program to the hacker society
  399. to safe others much work)
  400. If accouting is installed then you can use the acct-cleaner from zhart,
  401. also in this release - it works and is great!
  402. A small gimmick if you must modify wtmp but can't compile a source and no
  403. perl etc. is installed (worked on SCO but not on linux) : Do a uuencode of
  404. wtmp. Run vi, scroll down to the end of the file, and and delete the last
  405. 4 (!) lines beginning with "M" ... then save+exit, uudecode. Then the last
  406. 5 wtmp entries are deleted ;-)
  407. If the system uses wtmpx and utmpx as well you are in trouble ... I don't
  408. know any cleaner so far who can handle them. Program one and make it
  409. available for the scene.
  410. 4. CHECK THE SYSLOG CONFIGURATION AND LOG
  411. Most programs use the syslog function to log anything they want. It's
  412. important to check the configuration where syslog does print special
  413. types. The config file is /etc/syslog.conf - and I won't tell you here
  414. what the format is and what each entry means. Read the manpages about it.
  415. Important for you are kern.*, auth.* and authpriv.* types. Look where
  416. they are written too: files can be modified. If forwarded to other hosts
  417. you must hack those too. If messages are sent to a user, tty and/or
  418. console you can do a small trick and generate false log messages like
  419. "echo 17:04 12-05-85 kernel sendmail[243]: can't resolve bla.bla.com > /dev/console"
  420. or whichever device you want to flood so that the message you want to hide
  421. simply scrolls over the screen. These log files are very important!
  422. Check them.
  423. 5. CHECK FOR INSTALLED SECURITY PROGRAMS
  424. On most security conscious sites, there are security checkers run by cron.
  425. The normal directory for the crontabs are /var/spool/cron/crontabs. Check
  426. out all entries, especially the "root" file and examine the files they run.
  427. For just a fast investigation of the crontabs of root type "crontab -l root".
  428. Some of those security tools are most time also installed on the admins'
  429. accounts. Some of them (small utils to check wtmp, and if a sniffer is
  430. installed) are in their ~/bin. Read below to identify those admins and
  431. check their directories.
  432. Internal checking software can be tiger, cops, spi, tripwire, l5, binaudit,
  433. hobgoblin, s3 etc.
  434. You must examine them what they report and if they would report something
  435. that would be a sign of your breakin. If yes you can
  436. ïupdate the data files of the checker (learn mode) so that it won't report
  437. that type anymore ïreprogram/modify the software so that they don't report
  438. it anymore. (I love fake cpm programs ;-) ïif possible remove the e.g.
  439. backdoor you installed and try to do it in another way.
  440. 6. CHECK THE ADMINS
  441. It is important for you to check the sysops for the security counter-measures
  442. they do - so first you need to know which normal accounts are they use. You
  443. can check the .forward file of root and the alias entry of root. Take a look
  444. into the sulog and note those people who did a successful su to root. Grab
  445. the group file and examine the wheel and admin group (and whatever other
  446. group are in this file which are related to administration). Also grep'ing
  447. the passwd file for "admin" will reveile the administrators.
  448. Now you should know who the 1-6 administrators on the machines are. Change
  449. into their directories (use chid.c, changeid.c or similar to become the
  450. user if root is not allowed to read every file) and check their
  451. .history/.sh_history/.bash_history to see what commands they type usually.
  452. Check their .profile/.login/.bash_profile files to see what aliases are
  453. set and if auto-security checks or logging are done. Examine their ~/bin
  454. directory! Most times compiled security checking programs are put there!
  455. And of course take a look into each directory they've got beside that
  456. (ls -alR ~/). If you find any security related stuff, read 5.) for
  457. possibilities to bypass those protections.
  458. 7. HOW TO "CORRECT" CHECKSUM CHECKING SOFTWARE
  459. Some admins really fear hacker and install software to detect changes of
  460. their valuable binaries. If one binary is tampered with, next time the
  461. admin does a binary check, it's detected. So how can you
  462. a.find out if such binary checkers are installed and b.how to modify them
  463. so you can plant in your trojan horse?
  464. Note that there are many binary checker out there and it's really easy to
  465. write one - takes only 15 minutes - and can be done with a small script. So
  466. it's hard to find such software if it's installed. Note that internal
  467. security checking software sometimes also support such checking. Here are
  468. some widely used ones :
  469. SOFTWARE STANDARD PATHBINARY FILENAMES:
  470. tripwire/usr/adm/tcheck
  471. /usr/local/adm/tcheckdatabases
  472. /usr/local/adm/audit
  473. But as you can see there are too much possibilities! The software or
  474. database could even be on an normally unmounted disk or NFS exported
  475. partition of another host. Or the checksum database is on a write protected
  476. medium. There are too much possibilities. But normally you can just do the
  477. fast check if the above packages are installed and if not go on exchanging
  478. binaries. If you don't find them but it actually is a very well secured
  479. site then you should NOT tamper with the binaries! They sure have got them
  480. hidden very well.
  481. But what do you do when you find that software installed and you can modify
  482. them (e.g. not a write protected medium, or something that can be bypasswd
  483. - for example unmounting the disk and remounting writable)? You've got 2
  484. possibilities :
  485. ïFirst you can just check the parameters of the software and run an
  486. "update" on the modified binary. For example for tripwire that's
  487. "tripwire -update /bin/target".
  488. ïSeconds you can modify the filelist of the binaries being checked -
  489. removing the entry of the replaced one. Note that you should also check
  490. if the database file itself is checked too for changes! If yes -
  491. update/delete the entry as well.
  492. 8. USER SECURITY TRICKS
  493. This is a rare thing and is only for sake of completeness. Some users, named
  494. admins and hackers, usually don't want their own accounts to be used by
  495. someone else. That's why they sometimes put some security features into
  496. their startup files.
  497. So check all dotfiles (.profile, .cshrc, .login, .logout etc.) what commands
  498. they execute, what history logging and which searchpath they set. If f.e.
  499. $HOME/bin comes before /bin in the search path you should check the contents
  500. of this directory ... maybe there's a program called "ls" or "w" installed
  501. which logs the execution time and after that executing the real program.
  502. Other check automatically the wtmp and lastlog files for zap usage,
  503. manipulation of .rhosts, .Xauthority files, active sniffers etc. Never mess
  504. with an account a unix wizard is using!
  505. 9. MISCELLANEOUS
  506. Finally, before some last words about being under suspect or caught, here
  507. are some miscellaneous things which a worth to take a notice off.
  508. Old telnet clients do export the USER variable. An administrator who knows
  509. that and modified the telnetd can get all user names with that and so
  510. identify the account you are hacking from, once he notices you. The new
  511. clients have been fixed - but a clever admin has got other possiblities
  512. to identify the user : the UID, MAIL and HOME variables are still exported
  513. and makes identifying of the account used by the hacker easy. Before you
  514. do a telnet, change the USER, UID, MAIL and HOME variable, maybe even the
  515. PWD variable if you are in the home directory.
  516. On HP-UX < v10 you can make hidden directories. I'm not talking about .
  517. (dot) files or similar but a special flag. HP introduced it v9, but was
  518. removed from version 10 (because it was only used by hackers ;-). If you
  519. do a "chmod +H directory" it's invisible for the "ls -al". To see the
  520. hidden directories you need to add the -H switch to ls, e.g. "ls -alH" to
  521. see everything.
  522. Whenever you are in need to change the date of a file, remember that you
  523. can use the "touch" command to set the atime and mtime. You can set the
  524. ctime only by raw writes to the harddisk ...
  525. If you install sniffer and it's an important system, then make sure that
  526. you either obfusicate the sniffer output (with an encryption algorythm
  527. [and i'm not talking about rot13] or let the sniffer send all the captured
  528. data via icmp or udp to an external host under your control. Why that? If
  529. the admin finds somehow the sniffer (cpm and other software checking for
  530. sniffers) they can't identify in the logfile what data was sniffed, so he
  531. can't warn hosts sniffed by you.
  532. V. UNDER SUSPECT
  533. Once you are under suspect (by either police and/or administrator) you
  534. should take special actions so they won't get evidence on you.
  535. NOTE : If the administrators think you are a hacker,
  536. YOU ARE GUILTY UNTIL PROVEN INNOCENT
  537. The laws means nothing to the admins (sometimes I think the difference
  538. between a hacker and an administrator is only that the computer belongs to
  539. them). When they think you are a hacker you are guilty, without a lawyer to
  540. speak for you. They'll monitor you, your mails, files, and, if they are
  541. good enough, your keystrokes as well.
  542. When the feds are involved, you phone line might be monitored too, and a
  543. raid might come soon.
  544. If you notice or fear that you are under suspect then keep absolutely low
  545. profile! No offensive action which points to hacking should be done.
  546. Best thing is to wait at least 1-2 month and do nothing. Warn your friends
  547. not to send you any email, public normal only, non-offensive mail is
  548. wonderful, put pgp encrypted emails will ring the alarm bells of monitoring
  549. admins and feds. Cut down with everything, write some texts or program
  550. tools for the scene and wait until things have settled. Remember to encrypt
  551. all your sensitive data and remove all papers with account data, phone
  552. numbers etc. Thats the most important stuff the feds are looking for when
  553. they raid you.
  554. VI. CAUGHT
  555. Note that this small chapter covers only the ethics and basics and hasn't
  556. got any references to current laws - because they are different for every
  557. country.
  558. Now we talking about the stuff you should/shouldn't do once the feds
  559. visited you. There are two very important things you have to do:
  560. 1. GET A LAWYER IMMEDEATELY! The lawyer should phone the judge and appeal
  561. against the search warrant. This doesn't help much but may hinder them in
  562. their work. The lawyer should tell you everything you need to know what
  563. the feds are allowed to do and what not. The lawyer should write a letter
  564. to the district attorney and/or police to request the computers back as
  565. fast as possible because they are urgently needed to do business etc. As
  566. you can see it is very useful to have got a lawyer already by hand instead
  567. of searching for one after the raid.
  568. 2. NEVER TALK TO THE COPS! The feds can't promise you anything. If they
  569. tell you, you'll get away if you talk, don't trust them! Only the district
  570. attorney has got the power to do this. The cops just want to get all
  571. information possible. So if you tell them anything they'll have got more
  572. information from and against you. You should always refuse to give
  573. evidence - tell them that you will only talk with them via your lawyer.
  574. Then you should make a plan with your lawyer how to get you out of this
  575. shit and reduce the damage. But please keep in mind : don't betray your
  576. friends. Don't tell them any secrets. Don't blow up the scene. If you do,
  577. that's a boomerang : the guys & scene will be very angry and do revenge,
  578. and those guys who'll be caught because of your evidence will also talk
  579. ... and give the cops more information about your crimes!
  580. Note also that once you are caught you get blamed for everything which
  581. happened on that site. If you (or your lawyer) can show them that they
  582. don't have got evidences against you for all those cases they might have
  583. trouble to keep the picture of that "evil hacker" they'll try to paint
  584. about you at the court. If you can even prove that you couldn't do some
  585. of the crimes they accuse you for then your chances are even better. When
  586. the judge sees that false accuses are made he'll suspect that there could
  587. be more false ones and will become distrusted against the bad prepared
  588. charges against you.
  589. I get often asked if the feds/judge can force you to give up your
  590. passwords for PGP, encrypted files and/or harddisks. That's different
  591. for every country. Check out if they could force you to open your
  592. locked safe. If that's the case you should hide the fact that you are
  593. crypting your data! Talk with your lawyer if it's better for you to stand
  594. against the direction to give out the password - maybe they'd get
  595. evidences which could you get into jail for many years.
  596. (For german guys : THC-MAG #4 will have got an article about the german
  597. law, as far as it concerns hacking and phreaking - that article will be
  598. of course checked by a lawyer to be correct. Note that #4 will only
  599. discuss germany and hence will be in the german language. But non-germans,
  600. keep ya head up, this will be the first and last german only magazine
  601. release ;-)
  602. VII. PROGRAMS
  603. Here is a small list of programs you should get and use (the best!).
  604. DON'T email me where to get them from - ask around in the scene! I only
  605. present here the best log modifiers (see III-4 and IV-3). Other programs
  606. which are for interest are telnet redirectors (see IV-2) but there are so
  607. many, and most compile only on 1-3 unix types so there's no use to make a
  608. list.
  609. First a small glossary of terms: Change - changes fields of the logfile to
  610. anything you want. Delete - deletes, cuts out the entries you want. Edit -
  611. real editor for the logfile. Overwrite - just overwrites the entries with
  612. zero-value bytes. (Don't use overwriters (zap) - they can be detected!)
  613. LOG MODIFIERS:
  614. ah-1_0b.tar Changes the entries of accounting
  615. informationclear.c Deletes entries in utmp, wtmp, lastlog and wtmp
  616. xcloak2.c Changes the entries in utmp, wtmp and lastlog
  617. invisible.c Overwrites utmp, wtmp and lastlog with predefines
  618. values, so it's better than zap.
  619. Watch out, there are numerous inv*.c !marryv11.c
  620. Edit utmp, wtmp, lastlog and accounting data - best!
  621. wzap.c Deletes entries in wtmp
  622. wtmped.c Deletes entries in wtmp
  623. zap.c Overwrites utmp, wtmp, lastlog - Don't use! Can be detected!
  624. VIII. LAST WORDS
  625. Last fucking words: Don't get caught, remember these tips and keep your ears
  626. dry. If someone would like to correct some points, or would like to add a
  627. comment, or needs more information on a topic or even thinks something's
  628. missing - then drop me a note.

comments powered by Disqus