home *** CD-ROM | disk | FTP | other *** search
/ Cuteskunk BBS / cuteskunk.zip / cuteskunk / unsorted-zines / fk3.txt < prev    next >
Text File  |  2003-06-29  |  20KB  |  476 lines

  1. -=-=-<< F0rbidden Knowledge - Volume Two, Issue Three
  2.  
  3.  
  4. Contents of this Issue...
  5.  
  6. -/- Introduction by the Editorial Comittee
  7.  
  8. -/- An Automated Response System under Unix using TCP Wrappers by Vortexia
  9. -/- A Hint for Social Engineering through IRC by Wyzewun
  10. -/- Cracking the EAN Barcode System Part One by Moe1
  11. -/- More Beigeboxing Methods by Wyzewun
  12. -/- Old Car Alarms and Jaguar Lock Mechanisms by Hitsquad
  13. -/- Lock Mechanisms on BMW's by Wyzewun
  14.  
  15. -/- News in brief by The Editors
  16. -/- Thanks and Greets
  17. -/- Lamer of the month section! By Editors vote!
  18.  
  19.  
  20. -=-=-<< Introduction to F0rbidden Knowledge, Volume 2, Issue 3 by The Editors
  21.  
  22. Well, it's time for a new season of F0rbidden Knowledge. The SoS have split
  23. and we are giving full priority to the production of the Zine. It was simply
  24. too hard to continue working on other projects with the responsibility of
  25. finding out stuff and writing articles about it. 
  26.  
  27. We have dumped all prior associations, and are all working exclusively on
  28. F0rbidden Knowledge from now on. The FK team are...
  29.  
  30.  
  31. ----/ Chief Editor ..................... Wyzewun (wyze1@syrex.co.za) 
  32.  
  33. ---/ Co-Editors ...................... Vortexia (vortexia@one.se) 
  34. --/ .................................. Marc Satur9 (satur9@usa.net) 
  35.  
  36. --/ The Crew ....................... Moe1 (moe1@mailbox.co.za) 
  37. -/ ................................. Sniper (sniper@h4x0rz.za.org) 
  38. -/ .................................. Gevil (gevil@hotmail.com)
  39.  
  40.  
  41. You may contact any of us through e-mail, otherwise you will find at least one
  42. of us on #zahack on EFNet. We hope you enjoy the Zine, it is nothing like the
  43. last two issues, so please mail us and tell us what you think.
  44.  
  45. Please also keep in mind that because of us having to restart production of
  46. the zine completely half way through the month, and the fact that many people
  47. decided not to contribute their articles at the last minute, we did not have
  48. as much as we would've liked to have in this issue. However, I feel that the
  49. quality of the articles in this issue surpasses any in previous editions of FK
  50. and that we are definately heading for a good patch.
  51.  
  52. I have also dumped the stupid ASCII art stuff, and given the zine an
  53. all-around new look, which is simpler and easier to read. Please mail me
  54. telling me what you think of the new F0rbidden Knowledge
  55.  
  56.  
  57. Cheers,
  58. Wyzewun (wyze1@syrex.co.za) 
  59.  
  60.  
  61. -=-=-<< An automated response system under Unix using TCP Wrappers by Vortexia
  62.  
  63. Ok... here we go :) How to make a system respond to connection attempts you
  64. well.... dont like so much *grin* Well... there are a coupla ways, I only 
  65. gonna cover the most simple one (with TCP Wrappers, which is a standard
  66. program on linux systems and can be installed under a bsd system from
  67. /usr/ports/security/tcp_wrapper)
  68.  
  69. Ok... first a brief explanation on how a tcp wrapper works....
  70.  
  71. Someone connects to your box... your box spawns tcpd (the tcp wrapper daemon),
  72. which then checks the connecting person's ip against your allow and deny
  73. lists, IF it likes that persons ip then it starts the program they are
  74. connecting to (the daemon the connecting client wants), and quits itself...
  75. if it doesnt, it either just drops the connection clients connection, or it
  76. runs a script before dumping the connecting clients connection :)
  77.  
  78. Ok... so now to the actual, how the hell to implement this section...
  79.  
  80. First of all if ya wanna tcp wrapper something you gotta put it in inetd.conf
  81. 2 sample entries from a bsd system:
  82.  
  83. This is without TCP Wrappers:
  84. telnet stream tcp nowait root /usr/libexec/telnetd /usr/libexec/telnetd
  85.  
  86. This is with TCP Wrappers:
  87. telnet stream tcp nowait root /usr/local/libexec/tcpd /usr/libexec/telnetd
  88.  
  89. Ok... this is pretty damn self explanatory... standard inetd.conf entry is
  90. first, I wont explain all the options they arent important at this stage,
  91. except you will notice that I inserted tcpd in the second entry, following
  92. that example will allow you to wrapper most things..... (backup original
  93. /etc/inetd.conf before you modify it incase you stuff up).
  94.  
  95. Ok... then you find out where hosts.allow and hosts.deny are on your system
  96. (if its linux its probably in /etc, if its FreeBSD probably /usr/local/etc).
  97.  
  98. Then you add some options to them... Ok, we wanna deny all by default...
  99. we would put the following in hosts.deny for each daemon.
  100.  
  101. telnetd: ALL
  102. popper: ALL
  103.  
  104. etc etc, the first entry has to be the NAME of the actual file you are
  105. denying, I.E if telnetd in inetd.conf is /usr/sbin/in.telnetd then put there
  106. in.telnetd, if its /usr/libexec/telnetd put telnetd etc etc etc.
  107.  
  108. Then we wanna allow something in for telnetd, so in hosts.allow we put
  109. something like:
  110.  
  111. telnetd: 34.23.42.38 235.34.129.38
  112.  
  113. This will allow those 2 ips in for telnetd, alternatively you can put
  114. wildcards in there.
  115.  
  116. Ok, now you got basic wrappers working allowing and disallowing connections,
  117. now you wanna do auto response, so first of all, I must say this, now is a
  118. good time to learn how to read man pages :P
  119.  
  120. man 5 hosts_access will show you the man page, section 5 for hosts_access,
  121. man 5 hosts_options can also help with what follows.
  122.  
  123. Ok... lets change our hosts.deny file slightly... we want auto response on
  124. pop3 that uses a daemon with filename popper... so we put in something like
  125. this....
  126.  
  127. popper: ALL: spawn (/root/security/wrapper.script %h %s %c %h)
  128.  
  129. This says, before dropping the denied connection, run the script
  130. /root/security/wrapper.script with the parameters %h %s %c %h.
  131.  
  132. Note, you can tell it to run ANYTHING here with ANY parameters (please dont
  133. abuse *grin*, will explain HOW to abuse later)
  134.  
  135. Ok... the parameters... first lets cover what they do, there are further
  136. options than the ones covered by basic auto response only needs the ones I
  137. have specified, I will cover one other one later as well.
  138.  
  139. %h is the hostname, or ip if it cant find the hostname
  140. %s is the daemon they tried to connect to, and the server address, or as much
  141. info is available to TCPD
  142. %c is client information (the perosn who is connecting) user@host, if identd
  143. is running, or just the hostname again.
  144.  
  145. A further useful one I found is %a which doesnt return host, it just returns
  146. an ip address.
  147.  
  148. Ok... how to then write the script that it passes all this 2....
  149. Lets look at a basic bash script...
  150.  
  151. Ok, we want this to portscan the host, finger the host, then email the
  152. results to someone so they will be aware that someone is trying to connect...
  153.  
  154. (remeber anything other than the first line of whats below that starts with a
  155. # is a comment)
  156.  
  157. #!/bin/bash
  158. nmap -o $1.$2.strobe.scan $1
  159.  
  160. # nmap is our portscanner, $1 refers to %h (the first parameter), $2 is
  161. # %s. What this says is run a portscanner against $1 (the connecting
  162. # host) and output it to a file with name containing the connecting client
  163. # and the daemon they tried to connect 2.
  164.  
  165. finger \w@$1 >$1.$2.finger.results
  166.  
  167. # This says run finger against the host and output to a file
  168.  
  169. echo "Strobe results for $1" >$1.$2.mail.output
  170. cat $1.$2.strobe.scan >>$1.$2.mail.output
  171. echo "Finger results for $1" >>$1.$2.mail.output
  172. cat $1.$2.finger.results >>$1.$2.mail.output
  173. cat $1.$2.mail.output |mail -s "Security Violation Report" |mail root
  174.  
  175. (script ends here)
  176.  
  177. Ok... the last 5 lines are pretty simple really, the first line says make a
  178. file called $1.$2.mail.output ($1 and $2 being the information specified
  179. by %h and %s). The Second line says append the file $1.$2.strobe.scan to the
  180. mail file. The Third line says append a line that says: "Finger Results for
  181. $1" The forth line says append the finger resulsts to the mail file the fifth
  182. line says email the entire file to the local root account.
  183.  
  184. Simple huh? :) 
  185.  
  186. Ok... now to auto respond *evil grin*, Say you felt REALLY nasty and wanted to
  187. smurf or nestea everyone connecting to your box... just replace the nmap line
  188. or one of the other lines with your favorite attack proggy :)
  189.  
  190. For example:
  191.  
  192. smurf $1 bcast.file -S 128 -n 2000
  193.  
  194. will happily smurf $1 with 2000 128k packets (dont try this on a modem link or
  195. anything with less bandwidth than dual channel ISDN, its just an example
  196. *grin*).
  197.  
  198. Anyway :) thats how you do it 
  199.  
  200. If this article is confusing or you want more info on how to do even more fun
  201. things with tcpd or want explanations, I hang on #zahack on efnet and Im
  202. always willing to help anyone out with what I know
  203.  
  204. Cheers
  205. Vortexia (vortexia@one.se)
  206.  
  207.  
  208. -=-=-<< Fooling people on IRC into running Programs by Wyzewun
  209.  
  210. Getting a relatively smart person to run a program they recieved off IRC is
  211. actually a lot easier than one would normally think it is. I've found that the
  212. method that works best is to find some form of Lame DoS attack that they are
  213. vunerable to. (For Windows, I recommend trying Jolt or Click because half of
  214. the idiots on this planet are vunerable to those)
  215.  
  216. After kicking the target off IRC a couple of times, msg him and tell him that
  217. you know what is happening to him. Make up some bullshit name for an exploit
  218. and tell him that he is vunerable to it, and he must go and download the patch
  219. from Microsoft's site.
  220.  
  221. At this stage, tell him that you've just realised that you have the patch for
  222. it, and that if he wants he can have it from you, but make sure that you offer
  223. to let him search Micro$oft's site so that he doesn't think something funny
  224. is going on. After he can't find it and asks you to DCC him the patch, just
  225. send over Netbus, Back Orifice, Your new Virus, Whatever.
  226.  
  227. Easy as that. If you have a site you may want to put up the executable there
  228. to make him less suspicious. It's really all up to you, this article gives you
  229. a means to an end that is completely up to you.
  230.  
  231.  
  232. -=-=-<< Cracking the EAN Barcode System by Moe1
  233.  
  234. The EAN or European Article Number System Barcode has 13 values, making it
  235. easy to spot. Value 1 is situated outside the "left hand side" border.
  236. Together with the second digit, it tells us the origin of the product. Values
  237. from 3-12 give's us the article code. And value 13 is a checksum which checks
  238. the validity of all the other numbers.
  239.  
  240. The checksum is calculated as follows:
  241.  
  242. 1. Add all the odd position numbers except the last digit (1+3+5+7+9+11) 
  243.  
  244. 2. Add all the even position numbers (2+4+6+8+10) and multiply the answer
  245. by 3. (Note that we are leaving out the last digit, which is our checksum)
  246.  
  247. 3. Add the answer in 1 with the answer in 2.
  248.  
  249. 4. We divide the sum of 1 and 2 by the number 10 and if the remainder is not
  250. zero, then we substract the remainder from 10 and this should give us our
  251. last positioned number.
  252.  
  253. Once the checksum is done, we know that the barcode is valid.
  254.  
  255. Now on to the lines (yeah doze pesky lines above the values)
  256.  
  257. Note: 7 lines make's up 1 value.
  258.  
  259. There are 3 graphic codes that are used and we have 2 groups of values as
  260. explained above. From those 3 graphic codes, 2 codes (A,B) are used in the
  261. first group of values and code (C) is used in the second group of values.
  262. Below shows us the different graphic code that makes up the different numbers
  263. of the values. Take notice of the different lines.
  264.  
  265. BLACK LINE REPRESENTED BY 1
  266. WHITE SPACE REPRESENTED BY 0
  267.  
  268. CODE A CODE B CODE C
  269. if code A were: | if code B were: | if code C were:
  270. 0 ----> 0001101 | 0 ----> 0100111 | 0 ----> 1110010
  271. 1 ----> 0011001 | 1 ----> 0110011 | 1 ----> 1100110
  272. 2 ----> 0010011 | 2 ----> 0011011 | 2 ----> 1101100
  273. 3 ----> 0111101 | 3 ----> 0100001 | 3 ----> 1000010
  274. 4 ----> 0100011 | 4 ----> 0011101 | 4 ----> 1011100
  275. 5 ----> 0110001 | 5 ----> 0111001 | 5 ----> 1001110
  276. 6 ----> 0101111 | 6 ----> 0000101 | 6 ----> 1010000
  277. 7 ----> 0111011 | 7 ----> 0010001 | 7 ----> 1000100
  278. 8 ----> 0110111 | 8 ----> 0001001 | 8 ----> 1001000
  279. 9 ----> 0001011 | 9 ----> 0010111 | 9 ----> 1110100
  280.  
  281. NOTE: only in group 1 are CODE A & B used, in group 2 it's all CODE C. So look
  282. at group 1 and identify which CODE forms the number.
  283.  
  284. EXAMPLE:
  285. I buy a Sunday Times Newspaper, and I look at the bottom of the front page and
  286. see a nice little barcode. Due to my curiosity I wanna know how that shit
  287. works so I decide I wanna try and crack that scheme those newspaper boys use.
  288. First I look at the numbers and find that there are 13 numbers
  289. (9 770039 533008) immediately I know that they are using the EAN system.
  290. Since I know how to crack this system, its no problem. I first do a checksum 
  291. to see if any screws up occur...
  292.  
  293. 9+7+0+9+3+0 = 28
  294. (7+0+3+5+3+0) x 3 = 54
  295. 28+54 = 82
  296. 82 divided by 10 = 8 remainder 2
  297. 10 - 2 = 8 = CHECKSUM (value 12 or 13th position no. in barcode)
  298.  
  299. Ok Checksum done.
  300.  
  301. Now we see what makes up 770039 and we find that its the code pattern: ABBABA
  302.  
  303. And our code pattern for 533008 is: CCCCCC (check and see the lines would be
  304. exactly the same as the lines in CODE C) Right so we know:
  305.  
  306. BARCODE: 9 770039 533008
  307.  
  308. 977 tells us its a book or some sort of reading material
  309. 770039 is ABBABA and 533008 is CCCCCC
  310. and our checksum is 8
  311.  
  312. I took the Sunday Times Newspaper for an example because it seems it's the
  313. easiest to do. If you still dont understand how barcodes can be of any
  314. assistance to you then "ERM" think harder. < Wyze1: Amonst a couple of other
  315. things - Think IDs >
  316.  
  317. Bye!
  318. Moe1 (moe1@mailbox.co.za)
  319.  
  320. in Issue Four, perhaps later. Depends on how lazy Moe1 is, how the readers
  321. respond to this article, and how many spelling mistakes and grammatical
  322. screw-ups Wyzewun can try to edit out of the article before he faints :P>
  323.  
  324.  
  325. -=-=-<< More Beigeboxing Methods by Wyzewun
  326.  
  327. In Issue Two, I covered use of the Blue and Green Telkom boxes to box. This
  328. Issue, I'll be looking at some alternative methods...
  329.  
  330. Method Number One
  331. ~~~~~~~~~~~~~~~~~
  332. Go to an abandoned building that used to be an office (South Africans - Watch
  333. out for squatters *grin*) and it is extremely likely that it will have working
  334. phone lines running into it. Of course, it is also very likely that there will
  335. be no form of phone jack to be found - Are we using a phone jack? No. We're
  336. using Crocodile Clips. Problem Solved. :)
  337.  
  338. Method Number Two
  339. ~~~~~~~~~~~~~~~~~
  340. Try using the phone of some-one who has recently moved out of a house, or use
  341. your neigbours' phone when they are on holiday. Simply find the cord that runs
  342. from their phone out of their house, cut it open, and connect up your box. If
  343. the tenants have moved out and have had their phone disconnected, phone up
  344. Telkom and tell them that the disconnection of the phone was a mistake and
  345. ask them to reconnect it. :) This way, you can keep a phone working for up to
  346. three months before Telkom finally cut it off.
  347.  
  348. Method Number Three
  349. ~~~~~~~~~~~~~~~~~~~
  350. Find the point where a cable goes from the overhead poles into the ground.
  351. It is sometimes covered with a concrete or asbestos cover, so you may have to
  352. get past that. Assuming you somehow have done so, open up the cable, and you
  353. should find twisted pairs of wires like this...
  354.  
  355. pair #%# <--scotch lock
  356. 2 pairs | //
  357. | /><><><> ///><><><> //\<><><><>\
  358. | \><><><><\
  359. twisted- \\
  360. together #%#
  361. << ASCII Art Stolen from Kokey >>
  362.  
  363. The wires are colour coded to indicate negative and positive wires. When in
  364. doubt of how to connect your box, consult Kokey's handy Table-O-Colours...
  365.  
  366. Base colours Negative legs 
  367. ------------ -------------
  368. blue white
  369. orange red
  370. green black
  371.  
  372. Or alternatively, if you can get down far enough to see where the wires
  373. un-ravel to, you can just do that. ;-)
  374.  
  375. Well, that's all the ways I'm going to cover on beigeboxing in SA for this
  376. issue, yes, there are more, but I'm going to have to research them in a bit
  377. more detail, so yes, FK4 will have more beigeboxing stuff! Just remember to
  378. tell me when you get sick of this... :)
  379.  
  380.  
  381. -=-=-<< Affirmative Car Shopping by Hitsquad
  382.  
  383. Since Wyzewun explained how to borrow a bus in the previous months, I thought
  384. we should move up a level and explain how to, um borrow a car for a short
  385. time before he gets picked up by the police.
  386.  
  387. Anyway, with many older car alarms, when the car is bumped, the alarm sounds
  388. and the lights flash. Like most electrical systems, there is a fuse in case
  389. there is a power fails in some way and this fuse will break the circuit,
  390. thereby killing the alarm.
  391.  
  392. Now this is all good and fine if nobody can reach the fuse, but if you can
  393. reach the fuse, then there's trouble. With the older car systems, the fuse is
  394. behind the left front light that flashes, so simply break the light and the
  395. fuse behind it and that is the end of one alarm system. Simple huh?
  396.  
  397. So now if there is an old car down the road from you, with an alarm that keeps
  398. waking you up at night, you know how to switch it off. ;-)
  399.  
  400. This method however does not disable the engine/battery cut offs so it might
  401. be harder to steal the car. (This method was tried on an old Porsche and it
  402. worked, unfortunetly, the money I won on the bet was less than the light I had
  403. to replace and I did have the owners permission :-< )
  404.  
  405. Also, according to Jaguar magazine, there are over 500 000 jaguars in South
  406. Africa. Now if you lock your keys in the car , there is a
  407. fairly simple and not so destructive way to get your keys and you don't need a
  408. brick. The lock mechanism has been placed behind the rear-view mirror. Simply
  409. remove the mirror and there is the lock mechanism which you can then open your
  410. car. Easy as that.
  411.  
  412. Hitsquad
  413.  
  414. Things To Ponder - #06
  415. Should you trust a stockbroker who is married to a travel agent?
  416.  
  417.  
  418. -=-=-<< More affirmative car shopping by Wyzewun
  419.  
  420. Allright, if we're going to go into the whole car theft thing this issue then
  421. thats fine with me - I also have a new trick or two to share... The Lock
  422. Mechanism on a BMW with Central Locking is in fact located in the boot of the
  423. car. So, to get yourself a new BMW, you will need a tennis ball and a brick.
  424. No, I am NOT going to write an article on Tennis Ball Theft! Shut up and Stop
  425. Laughing at me!@#! :P
  426.  
  427. Cut the Tennis Ball in half, place it over the lock on the boot and hit it
  428. with the brick as hard as you can. All the doors should open.
  429.  
  430. Note that this can also be done with a nail instead of a tennis ball, which is
  431. more effective, but also requires practice and will fuck up the lock if you
  432. don't do it right.
  433.  
  434.  
  435. -=-=-<< News in Brief by The Editors
  436.  
  437. -/- Konr@d magazine (Berlin, Germany) set to publish article on Johannesburg
  438. Computer Culture in their March Issue. The article includes the results
  439. of interviews with Wyzewun as well as mentions of many other prominent
  440. South African hackers and what they do.
  441.  
  442. -/- Wyzewun has insisted that he is going to drink Tequila until his liver
  443. explodes unless some-one designs a nice ASCII Art Logo for FK. Then again,
  444. he may enjoy that... Damn...
  445.  
  446.  
  447. -=-=-<< Thanks and Greets
  448.  
  449. Group Greets:
  450. Cult of the Dead Cow, Hacker News Network, L0pht, Legions of Underground,
  451. Phrozen Crew, r00t, Technotronic, The Hackers Choice
  452.  
  453. Personal Greets:
  454. Aleph1, Cache, Caliburn, Crazyg*y, Cyber Demon, Cyclotron, fern, FireIce,
  455. Grey Wolf, kokey, Mnemonic, Mudge, optiklenz, opium, Pavlov,
  456. Radix, route, Sector12, Sledge, Spy, The Keyboard Caper
  457.  
  458. ***********************
  459. Lamer of the Month:
  460. ***********************
  461.  
  462. NICK: HOTMETAL!
  463. REASON: Has a habit of posting bullshit on mailing lists and making himself
  464. look like a fool
  465. REAL NAME: Cami (Camihose?)
  466.  
  467. ***********************
  468.  
  469.  
  470. -=-=-<< When and Where to get the Next Issue
  471.  
  472. Issue Number: Four
  473. Release Date: 5th March 1999
  474. Distrib Site: www.posthuman.za.net 
  475. Notes: FK4 will be even better than this issue, I promise :)
  476.