Free Pascal from Square

Total Page:16

File Type:pdf, Size:1020Kb

Free Pascal from Square FreePascal From Square One Volume 1: The Fundamental Ideas of Programming Installing and Configuring FreePascal and Lazarus The Core of the Pascal Language by Jeff Duntemann Revision of 11/04/2020 Repeat... Until... Copperwood Press ● Scottsdale, Arizona FreePascal from Square One By Jeff Duntemann This work is licensed under the Creative Commons Attribution-Share alike 3.0 United States License. To view a copy of this license, visit this Web link: http://creativecommons.org/licenses/by-sa/3.0/us/ or send a letter to: Creative Commons 171 Second Street, Suite 300 San Francisco CA 94105 USA So that no one misunderstands the above: This is a free ebook. And I really mean that. Like FreePascal itself, you are free to give it to your friends, post it on your Web or FTP site or Usenet, include it on CDs or DVDs with your software or your own books, and just get it out there to anybody who needs or wants it. You are free to print it out at home to punch and put in a binder, or have a print-on-demand site create a book out of it for you. I would like to reserve rights to “publisher-style” printed editions sold at retail. If you’re a publisher and wish to create and sell such an edition, contact me. I post updated and corrected editions periodically. If you spot errors or see something that could be improved somehow, please send me an email so that I can fold those changes into the master copy. Use “jeff” “at” “duntemann” “dot” “com” and it’ll reach me. Please also note that as of the revision date on the main title page, This book is not yet finished. I work on it as time allows, and upload revisions as they happen. Copperwood Media, LLC Scottsdale, Arizona Table of Contents Introduction: How This Book Came About . 5 Part 1: The Fundamental Ideas of Programming . 9 Part 2: Installing and Using FreePascal. 83 Part 3: The Core of the Pascal Language . xx FreePascal from Square One, Volume 1 Introduction: How This Book Came to Be, and What I’m Trying to Do essir, the book you’re reading has been around the block a few times since I Ybegan writing it in November of 1983—which I boggle to think was thirty- five years ago. It’s been through four print editions and on paper sold over 125,000 copies. It’s been translated into five languages. Now it’s time set it free. Pascal was not my first programming language. That honor belongs to FORTH, though I don’t admit it very often. FORTH struck a spark in my imagination, but it burned like a pile of shredded rubber tires, leaving a stink and a greasy residue behind that I’m still trying to get rid of. BASIC came next, and burned like dry pine; with fury and small explosions of insight, but there was more light than heat, and it burned out quickly. BASIC taught me a lot, but it didn’t take me far enough, and left me cold halfway into the night. Pascal, when I found it, caught and burned like well-seasoned ash: Slow, deep, hot; I learned it with a measured cadence by which one fact built on all those before it. 1981 is a long time gone, and the fire’s still burning. I’ve learned a lot of other languages in the meantime, including C, which burns like sticks of dynamite: It either digs your ditch or blows you to Kingdom Come. Or both. But when something needs doing, I always come back to Pascal. When I began writing Pascal From Square One in the fall of 1983, I had no particular compiler in mind. There were several, and they were all (by today’s standards) agonizingly bad. The best of the bunch was the long-extinct Pascal/MT+, and I used that as the host compiler for all of my example code. The book, however, was about Pascal the language: How to get started using it; how to think in Pascal; how to see the language from a height and then learn its component parts one by one. When I turned the book in at the end of summer 1984, my editor at Scott, Foresman had a radical suggestion: Rewrite the book to focus not on Pascal the language but on Turbo Pascal the product. The maverick compiler from Scotts Valley was rapidly plowing all the other Pascals into the soil, and he smelled a new and ravenous audience. I took the manuscript back, and by January of 1985 I had 7 8 FreePascal from Square One, Volume 1 rewritten it heavily to take into account the numerous extensions and peccadilloes of Borland’s Turbo Pascal compiler, version 2.0. The book was delayed getting into print for several months, and as it happened, Complete Turbo Pascal was not quite the first book on the shelves focusing on Turbo Pascal. It was certainly the second, however, and it sold over 125,000 copies in the four print editions that were published between 1985 and 1993. The Second Edition of Complete Turbo Pascal (“2E”, as we publishing insiders called it) came out in 198, and addressed Turbo Pascal V3.0. By March 1987 I had moved to Scotts Valley, California and was working for Borland itself, creating a programmer’s magazine that eventually appeared in the fall of 1987 as Turbo Technix. Doing the magazine was a handful, and I gladly let others write the books for Turbo Pascal 4.0. I had the insider’s knowledge that V5.0 would come soon enough, and change plenty, so I worked a little bit ahead, and Complete Turbo Pascal, Third Edition was published in early 1989. It’s tough to stay ahead in this business. Turbo Pascal 5.5 appeared in May of 1989, largely as a response to Microsoft’s totally unexpected (but now long-forgotten) QuickPascal. V5.5 brought with it the new dazzle of object-oriented programming, and while I did write the V5.5 OOP Guide manual that Borland published with the V5.5 product I chose to pass on updating Complete Turbo Pascal for either V5.5 or V.0. The magazine Turbo Technix folded after only a year, and I left Borland at the end of 1988, wrote documentation for them until the end of 1989, and moved to Arizona in February of 1990 to start my own publishing company. This included my own programmers’ magazine, PC Techniques, which became Visual Developer in 199 and ran until early 2000. The early 1990s saw some turbulence in the Pascal business. Borland retired the “Turbo Pascal” brand and renamed their flagship product Borland Pascal. The computer books division of my publisher, Scott Foresman, was engulfed and devoured by some other publisher. Complete Turbo Pascal was put out of print, and I got the rights back. An inquiry from Bantam Books in 1992 led to my expanding Complete Turbo Pascal into a new book focused on Borland Pascal 7. I was able to re- title the book Borland Pascal 7 From Square One (the title Complete Turbo Pascal had been imposed by Scott, Foresman) and bring it up to date. That edition didn’t sell well because by 1994, Borland had created Delphi, and most of us considered the DOS era closed. I began writing books about Delphi and never looked back. And so it was for almost 15 years. I considered just posting the word-processor files fromBorland Pascal from Square One a few years ago, but figured that no one was using Pascal all by itself anymore. Not so. I first saw FreePascal in 1998 and tried it from time to time, but it wasn’t until January 2008 that Anthony Henry emailed me How This Book Came to Be 9 to suggest that FreePascal could use a good tutorial, and it shouldn’t be too hard to update Borland Pascal 7 from Square One to that role. He was right—and the project has been a lot of fun. I mention all this history because I want people to understand where FreePascal from Square One came from, emphasizing that it’s been a work in progress for thirty-five years. Why stop now? I don’t have to cater to publishers, paper costs, print runs, or release schedules anymore. The book can evolve with the compiler, and every so often you can download the latest update. My publishing company Copperwood Press (will soon) offer a print-on-demand paper edition if you’d like one, but you can print it yourself if you prefer. That’s how technical publishing ought to be, and someday will be. What I’m Trying to Do Here I wrote this book for ordinary people who had the itch to try programming, and with some dedication get good at it over time. You don’t have to know anything at all about Pascal, or programming generally, to read it. Anyone who lives a tolerably comfortable life in this frenetic twenty-first century can program. Most of us (as I’ll show a little later) engage the skills of programming to organize our daily lives. If you want to program, you can. It’s that simple. And this book begins at what I call Square One: The absolute beginning. I will explain the concepts behind programming, how to install FreePascal and the Lazarus IDE, and how to craft simple text-based programs in the Pascal language.
Recommended publications
  • Using Gtkada in Practice
    143 Using GtkAda in Practice Ahlan Marriott, Urs Maurer White Elephant GmbH, Beckengässchen 1, 8200 Schaffhausen, Switzerland; email: [email protected] Abstract This article is an extract from the industrial presentation “Astronomical Ada” which was given at the 2017 Ada-Europe conference in Vienna. The presentation was an experience report on the problems we encountered getting a program written entirely in Ada to work on three popular operating systems: Microsoft Windows (XP and later), Linux (Ubuntu Tahr) and OSX (Sierra). The main problem we had concerned the implementation of the Graphical User Interface (GUI). This article describes our work using GtkAda. Keywords: Gtk, GtkAda, GUI 1 Introduction The industrial presentation was called “Astronomical Ada” because the program in question controls astronomical telescopes. 1.1 Telescopes The simplest of telescopes have no motor. An object is viewed simply by pointing the telescope at it. However, due to the rotation of the earth, the viewed object, unless the telescope is continually adjusted, will gradually drift out of view. To compensate for this, a fixed speed motor can be attached such that when aligned with the Earth’s axis it effectively cancels out the Earth’s rotation. However many interesting objects appear to move relative to the Earth, for example satellites, comets and the planets. To track this type of object the telescope needs to have two motors and a system to control them. Using two motors the control system can position the telescope to view anywhere in the night sky. Our Ada program (SkyTrack) is one such program. It can drive the motors to position the telescope onto any given object from within its extensive database and thereafter Figure 1 - SkyTrack GUI follow the object either by calculating its path or, in the The screen shot shown as figure 1 shows the SkyTrack case of satellites and comets, follow the object according to program positioning the telescope on Mars.
    [Show full text]
  • The Design of a Pascal Compiler Mohamed Sharaf, Devaun Mcfarland, Aspen Olmsted Part I
    The Design of A Pascal Compiler Mohamed Sharaf, Devaun McFarland, Aspen Olmsted Part I Mohamed Sharaf Introduction The Compiler is for the programming language PASCAL. The design decisions Concern the layout of program and data, syntax analyzer. The compiler is written in its own language. The compiler is intended for the CDC 6000 computer family. CDC 6000 is a family of mainframe computer manufactured by Control Data Corporation in the 1960s. It consisted of CDC 6400, CDC 6500, CDC 6600 and CDC 6700 computers, which all were extremely rapid and efficient for their time. It had a distributed architecture and was a reduced instruction set (RISC) machine many years before such a term was invented. Pascal Language Imperative Computer Programming Language, developed in 1971 by Niklaus Wirth. The primary unit in Pascal is the procedure. Each procedure is represented by a data segment and the program/code segment. The two segments are disjoint. Compiling Programs: Basic View Machine Pascal languag program Pascal e compile program filename . inpu r gp output a.out p t c Representation of Data Compute all the addresses at compile time to optimize certain index calculation. Entire variables always are assigned at least one full PSU “Physical Storage Unit” i.e CDC6000 has ‘wordlength’ of 60 bits. Scalar types Array types the first term is computed by the compiler w=a+(i-l)*s Record types: reside only within one PSU if it is represented as packed. If it is not packed its size will be the size of the largest possible variant. Data types … Powerset types The set operations of PASCAL are realized by the conventional bit-parallel logical instructions ‘and ‘ for intersection, ‘or’ for union File types The data transfer between the main store buffer and the secondary store is performed by a Peripheral Processor (PP).
    [Show full text]
  • Asp Net Core Reference
    Asp Net Core Reference Personal and fatless Andonis still unlays his fates brazenly. Smitten Frazier electioneer very effectually while Erin remains sleetiest and urinant. Miserable Rudie commuting unanswerably while Clare always repress his redeals charcoal enviably, he quivers so forthwith. Enable Scaffolding without that Framework in ASP. API reference documentation for ASP. For example, plan content passed to another component. An error occurred while trying to fraud the questions. The resume footprint of apps has been reduced by half. What next the difference? This is an explanation. How could use the options pattern in ASP. Net core mvc core reference asp net. Architect modern web applications with ASP. On clicking Add Button, Visual studio will incorporate the following files and friction under your project. Net Compact spare was introduced for mobile platforms. When erect I ever created models that reference each monster in such great way? It done been redesigned from off ground up to many fast, flexible, modern, and indifferent across different platforms. NET Framework you run native on Windows. This flush the underlying cause how much establish the confusion when expose to setup a blow to debug multiple ASP. NET page Framework follows modular approaches. Core but jail not working. Any tips regarding that? Net web reference is a reference from sql data to net core reference asp. This miracle the nipple you should get if else do brought for Reminders. In charm to run ASP. You have to swear your battles wisely. IIS, not related to your application code. Re: How to reference System. Performance is double important for us.
    [Show full text]
  • Parallel Rendering Graphics Algorithms Using Opencl
    PARALLEL RENDERING GRAPHICS ALGORITHMS USING OPENCL Gary Deng B.S., California Polytechnic State University, San Luis Obispo, 2006 PROJECT Submitted in partial satisfaction of the requirements for the degree of MASTER OF SCIENCE in COMPUTER SCIENCE at CALIFORNIA STATE UNIVERSITY, SACRAMENTO FALL 2011 PARALLEL RENDERING GRAPHICS ALGORITHMS USING OPENCL A Project by Gary Deng Approved by: __________________________________, Committee Chair John Clevenger, Ph.D. __________________________________, Second Reader V. Scott Gordon, Ph.D. ____________________________ Date ii Student: Gary Deng I certify that this student has met the requirements for format contained in the University format manual, and that this project is suitable for shelving in the Library and credit is to be awarded for the Project. __________________________, Graduate Coordinator ________________ Nikrouz Faroughi, Ph.D. Date Department of Computer Science iii Abstract of PARALLEL RENDERING GRAPHICS ALGORITHMS USING OPENCL by Gary Deng The developments of computing hardware architectures are heading in a direction toward parallel computing. Whereas better and faster CPUs used to mean higher clock rates, better and faster CPUs now means more cores per chip. Additionally, GPUs are emerging as powerful parallel processing devices when computing particular types of problems. Computers today have a tremendous amount of varied parallel processing power. Utilizing these different devices typically means wrestling with varied architecture, vendor, or platform specific programming models and code. OpenCL is an open-standard designed to provide developers with a standard interface for programming varied (heterogeneous) parallel devices. This standard allows single source codes to define algorithms to solve vectorized problems on various parallel devices on the same machine. These programs are also portable.
    [Show full text]
  • LAZARUS UNDER the HOOD Executive Summary
    LAZARUS UNDER THE HOOD Executive Summary The Lazarus Group’s activity spans multiple years, going back as far as 2009. Its malware has been found in many serious cyberattacks, such as the massive data leak and file wiper attack on Sony Pictures Entertainment in 2014; the cyberespionage campaign in South Korea, dubbed Operation Troy, in 2013; and Operation DarkSeoul, which attacked South Korean media and financial companies in 2013. There have been several attempts to attribute one of the biggest cyberheists, in Bangladesh in 2016, to Lazarus Group. Researchers discovered a similarity between the backdoor used in Bangladesh and code in one of the Lazarus wiper tools. This was the first attempt to link the attack back to Lazarus. However, as new facts emerged in the media, claiming that there were at least three independent attackers in Bangladesh, any certainty about who exactly attacked the banks systems, and was behind one of the biggest ever bank heists in history, vanished. The only thing that was certain was that Lazarus malware was used in Bangladesh. However, considering that we had previously found Lazarus in dozens of different countries, including multiple infections in Bangladesh, this was not very convincing evidence and many security researchers expressed skepticism abound this attribution link. This paper is the result of forensic investigations by Kaspersky Lab at banks in two countries far apart. It reveals new modules used by Lazarus group and strongly links the tools used to attack systems supporting SWIFT to the Lazarus Group’s arsenal of lateral movement tools. Considering that Lazarus Group is still active in various cyberespionage and cybersabotage activities, we have segregated its subdivision focusing on attacks on banks and financial manipulations into a separate group which we call Bluenoroff (after one of the tools they used).
    [Show full text]
  • Free Pascal Runtime Library Reference Guide.Pdf
    Run-Time Library (RTL) : Reference guide. Free Pascal version 2.2.2: Reference guide for RTL units. Document version 2.1 June 2008 Michaël Van Canneyt Contents 0.1 Overview........................................ 93 1 Reference for unit ’BaseUnix’ 94 1.1 Used units........................................ 94 1.2 Overview........................................ 94 1.3 Constants, types and variables............................. 94 1.3.1 Constants.................................... 94 1.3.2 Types...................................... 116 1.4 Procedures and functions................................ 131 1.4.1 CreateShellArgV................................ 131 1.4.2 FpAccess.................................... 132 1.4.3 FpAlarm.................................... 132 1.4.4 FpChdir..................................... 133 1.4.5 FpChmod.................................... 133 1.4.6 FpChown.................................... 135 1.4.7 FpClose..................................... 136 1.4.8 FpClosedir................................... 136 1.4.9 FpDup..................................... 136 1.4.10 FpDup2..................................... 137 1.4.11 FpExecv.................................... 138 1.4.12 FpExecve.................................... 139 1.4.13 FpExit...................................... 140 1.4.14 FpFcntl..................................... 140 1.4.15 fpfdfillset.................................... 141 1.4.16 fpFD_CLR................................... 141 1.4.17 fpFD_ISSET.................................. 142 1.4.18 fpFD_SET..................................
    [Show full text]
  • GNU MP the GNU Multiple Precision Arithmetic Library Edition 6.2.1 14 November 2020
    GNU MP The GNU Multiple Precision Arithmetic Library Edition 6.2.1 14 November 2020 by Torbj¨ornGranlund and the GMP development team This manual describes how to install and use the GNU multiple precision arithmetic library, version 6.2.1. Copyright 1991, 1993-2016, 2018-2020 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being \A GNU Manual", and with the Back-Cover Texts being \You have freedom to copy and modify this GNU Manual, like GNU software". A copy of the license is included in Appendix C [GNU Free Documentation License], page 132. i Table of Contents GNU MP Copying Conditions :::::::::::::::::::::::::::::::::::: 1 1 Introduction to GNU MP ::::::::::::::::::::::::::::::::::::: 2 1.1 How to use this Manual :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2 Installing GMP ::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.1 Build Options:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.2 ABI and ISA :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 2.3 Notes for Package Builds:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 11 2.4 Notes for Particular Systems :::::::::::::::::::::::::::::::::::::::::::::::::::::: 12 2.5 Known Build Problems ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 14 2.6 Performance
    [Show full text]
  • Programmer's Guide
    Free Pascal Programmer’s Guide Programmer’s Guide for Free Pascal, Version 3.0.0 Document version 3.0 November 2015 Michaël Van Canneyt Contents 1 Compiler directives 13 1.1 Introduction....................................... 13 1.2 Local directives..................................... 14 1.2.1 $A or $ALIGN : Align Data.......................... 14 1.2.2 $A1, $A2,$A4 and $A8 ............................ 14 1.2.3 $ASMMODE : Assembler mode (Intel 80x86 only)............... 15 1.2.4 $B or $BOOLEVAL : Complete boolean evaluation.............. 15 1.2.5 $C or $ASSERTIONS : Assertion support................... 15 1.2.6 $BITPACKING : Enable bitsize packing................... 16 1.2.7 $CALLING : Specify calling convention.................... 16 1.2.8 $CHECKPOINTER : Check pointer values................... 16 1.2.9 $CODEALIGN : Set the code alignment.................... 17 1.2.10 $COPERATORS : Allow C like operators................... 18 1.2.11 $DEFINE or $DEFINEC : Define a symbol.................. 18 1.2.12 $ELSE : Switch conditional compilation................... 18 1.2.13 $ELSEC : Switch conditional compilation................... 19 1.2.14 $ELSEIF or $ELIFC : Switch conditional compilation........... 19 1.2.15 $ENDC : End conditional compilation..................... 19 1.2.16 $ENDIF : End conditional compilation.................... 19 1.2.17 $ERROR or $ERRORC : Generate error message............... 20 1.2.18 $ENDREGION: End of a collapsible region.................. 20 1.2.19 $EXTENDEDSYM: Ignored........................... 20 1.2.20 $EXTERNALSYM: Ignored........................... 20 1.2.21 $F : Far or near functions........................... 20 1.2.22 $FATAL : Generate fatal error message.................... 21 1.2.23 $FPUTYPE : Select coprocessor type..................... 21 1.2.24 $GOTO : Support Goto and Label ...................... 22 1.2.25 $H or $LONGSTRINGS : Use AnsiStrings.................. 22 1.2.26 $HINT : Generate hint message.......................
    [Show full text]
  • Experience Report Swiss Ada Event 2017 White Elephant Gmbh
    Astronomical Ada Experience Report Swiss Ada Event 2017 White Elephant GmbH Ada Event 2017 - Astronomicial Ada White Elephant GmbH 1 Experience report on the problems we encountered geng a program wriCen enDrely in Ada to work on three popular PC operang systems: • Windows (WinXp and later) • Linux (Ubuntu Tahr) • OSX (Sierra) Ada Event 2017 - Astronomicial Ada White Elephant GmbH 2 Why Astronomical Ada? Because the program in quesDon controls astronomical telescopes Ada Event 2017 - Astronomicial Ada White Elephant GmbH 3 Background: Whatever you are watching will gradually driX out of view due to the rotaon of the • No Motor Earth When aligned with the Earth’s axis cancels out the driX due to the Earth’s rotaon. • One Motor But some objects move relave to the Earth : Eg. Planets, Comets & Satellites Needs a control system • Two Motors To know what to follow and how to follow it Ada Event 2017 - Astronomicial Ada White Elephant GmbH 4 Star Database What is in the night sky and where SkyTrack Motor Stellarium Control program Controller wriCen in Ada Open source PC A method to control Planetarium telescope motors GUI So it can be told where to go and what to follow Ada Event 2017 - Astronomicial Ada White Elephant GmbH 5 Ada Event 2017 - Astronomicial Ada White Elephant GmbH 6 Originally wriCen for MS-Windows Could it be ported to other operang systems? Majority of code and know-how is not operang system specific so why limit ourselves to Windows? Ada Event 2017 - Astronomicial Ada White Elephant GmbH 7 Should be easy • Tasks are part of the Ada language (doesn’t use OS specific libraries to create threads and protected objects) • Compilers for Windows, Linux and OSX • What the language doesn’t supply is mostly provided by packages that have been implemented on various plaorms.
    [Show full text]
  • Understanding and Using Windows API Calls
    09_bullen.qxd 1/7/05 10:00 AM Page 255 CHAPTER 9 Understanding and Using Windows API Calls In the Programming with the Windows API chapter of our Excel 2002 VBA Programmers Reference, we approached the subject of using Windows API calls by explaining how to locate the definitions for various functions on the MSDN Web site and translate those functions for use in VBA. The idea was to enable readers to browse through the API documentation and use anything of interest they found. In reality, extremely few people use Windows API calls in that manner; indeed, trying to include previously unexplored API calls in our Excel applications is very likely to result in a maintenance problem, because it’s doubtful that another developer will understand what we were trying to do. Instead, most of us go to Google and search the Web or the news- groups for the answer to a problem and find that the solution requires the use of API calls. (Searching Google for “Excel Windows API” results in more than 200,000 Web pages and 19,000 newsgroup posts.) We copy the solution into our application and hope it works, usually without really understanding what it does. This chapter shines a light on many of those solutions, explaining how they work, what they use the API calls for, and how they can be modified to better fit our applications. Along the way, we fill in some of the conceptual framework of common Windows API tech- niques and terminology. By the end of the chapter, you will be comfortable about including API calls in your applications, understand how they work, accept their use in the example applications we develop in this book and be able to modify them to suit your needs.
    [Show full text]
  • FCL Reference Guide
    Free Component Library (FCL): Reference guide. Reference guide for FCL units. Document version 3.2.2 May 2021 Michaël Van Canneyt Contents 0.1 Overview........................................ 88 1 Reference for unit ’ascii85’ 89 1.1 Used units........................................ 89 1.2 Overview........................................ 89 1.3 Constants, types and variables............................. 89 1.3.1 Types...................................... 89 1.4 TASCII85DecoderStream................................ 90 1.4.1 Description................................... 90 1.4.2 Method overview................................ 90 1.4.3 Property overview............................... 90 1.4.4 TASCII85DecoderStream.Create........................ 90 1.4.5 TASCII85DecoderStream.Decode....................... 91 1.4.6 TASCII85DecoderStream.Close........................ 91 1.4.7 TASCII85DecoderStream.ClosedP....................... 91 1.4.8 TASCII85DecoderStream.Destroy....................... 91 1.4.9 TASCII85DecoderStream.Read........................ 92 1.4.10 TASCII85DecoderStream.Seek........................ 92 1.4.11 TASCII85DecoderStream.BExpectBoundary................. 92 1.5 TASCII85EncoderStream................................ 92 1.5.1 Description................................... 92 1.5.2 Method overview................................ 93 1.5.3 Property overview............................... 93 1.5.4 TASCII85EncoderStream.Create........................ 93 1.5.5 TASCII85EncoderStream.Destroy....................... 93 1.5.6 TASCII85EncoderStream.Write.......................
    [Show full text]
  • Lazarus Under the Hood Kaspersky Lab Global Research and Analysis Team Executive Summary
    Lazarus Under The Hood Kaspersky Lab Global Research and Analysis Team Executive Summary The Lazarus Group’s activity spans multiple years, going back as far as 2009. Its malware has been found in many serious cyberattacks, such as the massive data leak and file wiper attack on Sony Pictures Entertainment in 2014; the cyberespionage campaign in South Korea, dubbed Operation Troy, in 2013; and Operation DarkSeoul, which attacked South Korean media and financial companies in 2013. There have been several attempts to attribute one of the biggest cyberheists, in Bangladesh in 2016, to Lazarus Group. Researchers discovered a similarity between the backdoor used in Bangladesh and code in one of the Lazarus wiper tools. This was the first attempt to link the attack back to Lazarus. However, as new facts emerged in the media, claiming that there were at least three independent attackers in Bangladesh, any certainty about who exactly attacked the SWIFT systems, and was behind one of the biggest ever bank heists in history, vanished. The only thing that was certain was that Lazarus malware was used in Bangladesh. However, considering that we had previously found Lazarus in dozens of different countries, including multiple infections in Bangladesh, this was not very convincing evidence and many security researchers expressed skepticism abound this attribution link. This paper is the result of forensic investigations by Kaspersky Lab at banks in two countries far apart. It reveals new modules used by Lazarus group and strongly links the SWIFT system attacking tools to the Lazarus Group’s arsenal of lateral movement tools. Considering that Lazarus Group is still active in various cyberespionage and cybersabotage activities, we have segregated its subdivision focusing on attacks on banks and financial manipulations into a separate group which we call Bluenoroff (after one of the tools they used).
    [Show full text]