Join our Folding@Home team:
Main F@H site
Our team page
Support us: Subscribe Here
and buy SoylentNews Swag
We always have a place for talented people, visit the Get Involved section on the wiki to see how you can make SoylentNews better.
When Australia's federal government finally revealed who had been given money to help pay for metadata retention efforts The Register was surprised to see eight Universities on the list.
So we've asked around and figured out why.
Universities have a metadata retention obligation thanks to the Section 187B(a) of the Telecommunications (Interception and Access) Amendment (Data Retention) Act 2015 which explains that service providers other than carriers and ISPs don't have to retain metadata the comms service they provide: (i) is provided only to a person's immediate circle (within the meaning of section 23 of the Telecommunications Act 1997); or (ii) is provided only to places that, under section 36 of that Act, are all in the same area; and
"Immediate circle" includes staff and students, so WiFi for students doesn't create a metadata retention obligation for the university, although of course the University's internet service provider does have that obligation.
Anne Kealley, CEO of the Council of Australian University Directors of Information Technology (CAUDIT), told The Register that entities like a campus bookstore or privately-funded research outfit with on-campus offices fall outside the immediate circle. That kind of outfit often resides in university buildings and has little alternative other than to use university-provided telephony services. Contractors and charities are also beyond the immediate circle. And so are services like email accounts provided to alumni.
Hence Universities' metadata retention obligations.
[...] Australia has 43 accredited universities. It is unclear how many had no metadata retention obligations and how many found ways to avoid those obligations.
The combination of graphene nanoribbons made with a process developed at Rice University and a common polymer could someday be of critical importance to healing damaged spinal cords in people, according to Rice chemist James Tour.
[...] "We've developed a way to add water-solubilizing polymer chains to the edges of our nanoribbons that preserves their conductivity while rendering them soluble, and we're just now starting to see the potential for this in biomedical applications," he said. He added that ribbonized graphene structures allow for much smaller amounts to be used while preserving a conductive pathway that bridges the damaged spinal cords.
Tour said only 1 percent of Texas-PEG consists of nanoribbons, but that's enough to form a conductive scaffold through which the spinal cord can reconnect.
Texas-PEG succeeded in restoring function in a rodent with a severed spinal cord in a procedure performed at Konkuk University in South Korea by co-authors Bae Hwan Lee and C-Yoon Kim. Tour said the material reliably allowed motor and sensory neuronal signals to cross the gap 24 hours after complete transection of the spinal cord and almost perfect motor control recovery after two weeks.
The graphene nano-ribbons provide a conducting scaffold that allow spinal cords to reconnect.
Submitted via IRC for TheMightyBuzzard
Source: http://www.telegraph.co.uk/news/uknews/crime/6440589/Date-rape-drink-spiking-an-urban-legend.html
Widespread spiking of drinks with date-rape drugs such as Rohypnol and GHB is an "urban legend" fuelled by young women unwilling to accept they have simply consumed too much alcohol, academics believe. A study of more than 200 students revealed many wrongly blamed the effects of a "bad night out" on date-rape drugs, when they had just drunk excessively.
Many are in "active denial" that drinking large amounts of alcohol can leave them "incoherent and incapacitated", the Kent University researchers concluded. Young women's fears about date-rape drugs are so ingrained that students mistakenly think it is a more important factor in sexual assault than being drunk, taking drugs or walking alone at night.
The study, published in the British Journal of Criminology, found three-quarters of students identified drink spiking as an important risk – more than alcohol or drugs. More than half said they knew someone whose drink had been spiked.
But despite popular beliefs, police have found no evidence that rape victims are commonly drugged with such substances, the researchers said.
Dr Adam Burgess from the university's School of Social Policy, Sociology and Social Research, said: "Young women appear to be displacing their anxieties about the consequences of consuming what is in the bottle on to rumours of what could be put there by someone else.
Samsung is facing a lawsuit from a Galaxy Note 7 owner who endured an exploding phone in his pants just hours before Samsung began to cooperate with the US Consumer Product Safety Commission on an official recall:
After news emerged that Samsung had received 92 reports in the US about the battery in its Galaxy Note 7 phone overheating -- including 26 cases involving burns -- it seemed only time before someone would contact a lawyer.
Now, Reuters reports, 28-year-old Jonathan Strobel of Boca Raton, Florida, has filed what may be the first lawsuit in the US involving the Note 7's combustible battery. Strobel's suit, filed Friday, says his Note 7 exploded in his front pants pocket on September 9. This allegedly happened in a Costco in Palm Beach Gardens, where Strobel works. "His right thigh has a deep second-degree burn the size of the phone," Keith Pierro, Strobel's lawyer, told me, adding that Strobel's left hand was also burnt. (He apparently reached for his overheating phone with his opposite hand.)
The Palm Beach Post reported that Palm Beach Gardens Fire Rescue described the phone as having melted inside Strobel's pants.
The complaint says that Strobel suffered "sustained serious and permanent bodily injuries resulting in pain and suffering, permanent impairment, disability, mental anguish, inconvenience, loss of the enjoyment of life, expense of medical care and treatment, expense of hospitalization, lost wages, and ability to earn wages in the past and to be experienced in the future."
TechDirt reports
Wilson, North Carolina's Greenlight [publicly-owned ISP], has had to disconnect one neighboring town or face violating state law. With state leaders tone deaf to the problem of letting incumbent ISPs write such laws, and the FCC flummoxed [by a federal court] in its attempt to help, about 200 home Internet customers in [the town of] Pinetops will thus lose access to gigabit broadband service as of October 28
[...] Greenlight's fiber network provides speeds of 40Mbps to 1Gbps at prices ranging from $40 to $100 a month, service that's unheard of from any of the regional incumbent providers (AT&T, CenturyLink, Time Warner Cable) that lobbied for the protectionist law. Previously, the community of Pinetops only had access to sluggish DSL Service from CenturyLink.
Related:
Muni ISP forced to shut off fiber-to-the-home Internet after court ruling (Ars Technica)
Previous: Appeals Court Rules the FCC Cannot Override State Laws Banning Municipal ISPs
In a sign that maybe there is hope for the survival of the human race, The Guardian reports that the number of cigarette smokers in the UK has dropped to less than 17%, the lowest number in half a century.
In 1974, over 50% of men in Britain were smokers; that had fallen to just 19.1% in England in 2015. Similarly, just over 40% of women smoked back then; last year it was only 14.9%.
There are now just 7.2 million adults in England who smoke. They are far outnumbered by 14.6 million ex-smokers. It is the first time that under 17% of the population are smokers and is down from the 19.3% seen as recently as 2012.
Interestingly the success rate for people trying to quit has jumped from 13.6% to around 20%.
Some of this may reflect the price of smokes - which look to be between £8 and £10 ($13 US) for a pack of twenty. (Canadian prices are sitting around $9-10 CDN)
And, in the interest of what passes for "balance" these days, there are groups that will dispute the health risks of smoking tobacco.
Disclaimer: Smoked for twenty+ years, mostly plain Camels. Yummmm..... Quit cold turkey.
From The Washington Post:
The survey's findings support other research showing that as overall rates of gun ownership has declined, the number of firearms in circulation has skyrocketed. The implication is that there are more guns in fewer hands than ever before. The top 3 percent of American adults own, on average, 17 guns apiece, according to the survey's estimates.
Interesting. Lawyers, guns, and money! Which of these has the smallest percentage and largest absolute amount? Of course, the other major shift the survey reveals is in the rationale for owning firearms: currently, a majority of owners cite personal protection as their motivation, prior to the 1990's the majority owned guns for sport.
The Retro-Malware series is an experiment on original content for SoylentNews, written in the hopes to motivate people to subscribe to the site and help grow our resources. The previous article talked a bit about the programming environment imposed by DOS and 16-bit Intel segmented programming; it should be read before this one.
Before we get into this installment, I do want to apologize for the delay into getting this article up. A semi-unexpected cross-country drive combined with a distinct lack of surviving programming documentation has made getting this article written up take far longer than expected. Picking up from where we were before, today we're going to look into Terminate-and-Stay Resident programming, interrupt chaining, and get our first taste of how DOS handles conventional memory. Full annotated code and binaries are available here in the retromalware git repo.
As usual, check past the break for more. In addition, if you are a licensed ham operator or have ham radio equipment, I could use your help, check the details at the end of this article.
[Continues...]
For anyone who used DOS regularly, TSRs (short for Terminate and Stay Resident) were likely a source of both fun and frustration. Originally appearing in DOS 2.0, TSRs, as the name suggests, are programs that exit but leave some part of their code around in memory. TSRs are primarily used to provide device drivers, extended APIs, or hooks that other applications can take advantage of. At the same time, they also could be used (as we will be doing) to install invisible hooks to modify, change, or log system behaviors. In that sense, they can be considered broadly equivalent to extensions on classic Mac OS. The BIOS could be considered a special type of TSR as it's always available in memory to provide services to the operating system and applications.
From a technical perspective, a TSR is any application that executes int 21h with the right options. Ralph Brown's interrupt guide has this to say on DOS's API for TSRs:
DOS 2+ - TERMINATE AND STAY RESIDENT AH = 31h AL = return code DX = number of paragraphs to keep resident Return: Never Notes: The value in DX only affects the memory block containing the PSP; additional memory allocated via AH=48h is not affected. The minimum number of paragraphs which will remain resident is 11h for DOS 2.x and 06h for DOS 3.0+. Most TSRs can save some memory by releasing their environment block before terminating (see #01378 at AH=26h,AH=49h). Any open files remain open, so one should close any files which will not be used before going resident; to access a file which is left open from the TSR, one must switch PSP segments first (see AH=50h)
Well, for most people, I suspect that is as clear as mud. Let me try and explain it a bit better. Essentially, when a program flags to DOS that it wants to TSR, DOS simply leaves the amount of memory marked in DX alone, and marks those paragraphs (which are 16 bytes) as 'in use' so neither it nor any other well-behaving programs will attempt to use them. No relocation or copying is done as part of this process; the memory is simply marked dead, and left 'as is' as we'll see below.
This is problematic for a number of reasons. As I mentioned in the previous article, when in real mode, Intel processors can only access up to 1 MiB of memory, and it's the area where all applications, drives and device address space needs to squeeze into. Of this, only 640 kiB are normally available to applications (which is known as conventional memory). If a TSR is too large, or too many are loaded, its is very easy to run out of RAM to do anything useful with the machine. To make matters worse, DOS provides absolutely no mechanism to manage or uninstall TSRs. (Once an application is resident, it's staying there unless it is specifically designed to unhook itself and free itself from memory.) Combine that with the fact that there's no 'official' way of doing so in the DOS APIs.
This quickly lead to an era where you might need a specific boot floppy for a given application so as to have its TSRs available (such as mouse or network drivers) — and nothing else — so that there would be enough conventional memory left to fit everything in. While several third-party efforts tried to standardize TSR installation/removal — such as TesSeRact — none of them became a true de-facto standard. Furthermore, it is very possible for a TSR removal to leave memory in a fragmented state which could break other applications. An entire cottage industry of memory optimizers quickly sprang up which could load TSRs into high memory.
At this point, you may be wondering "If TSRs are so miserable, why use them?". The answer, unfortunately, is that it is the only way on DOS to provide any sort of extended functionality. DOS has no concept of shared libraries or multitasking; it was TSR or bust. This brings us to our next topic: interrupt handling.
While I touched on interrupts in the previous article, I didn't go into too much detail. Interrupts, simply put, are special signals sent to the processor to tell it to stop what it's doing and do something else immediately. These interrupts can be generated by either hardware or software. Interrupts essentially operate like this:
When an interrupt occurs, the processor looks at the Interrupt Vector Table (IVT) located at 0x0 to determine where it needs to jump to handle that interrupt. The function that handles an interrupt is known as an Interrupt Service Routine (ISR). Assuming there is a valid handler address in the IVT, the processor does a far call to the IVT and immediately continues execution. A 'bare bones' interrupt handler looks something like this:
previous_hook_offset: dw 0 previous_hook_segment: dw 0 hook: ; When we come into an interrupt, only the ; code segment and instruction pointer are preserved ; for us. It's the responsibility of the handler to ; preserve this information. ; This is saved on the application's local stack, which is fine ; for now (FreeDOS does the same thing internally) as long as ; we're not putting any large items on it. We'll look at setting ; up a local stack later. pushf ; Save flags pusha ; push all general registers to the stack ; Setup segments push ds push es ; For interrupt handlers, CS=DS normally, and SS either points at: ; the application stack (aka, whatever was running before we were) ; or at a local stack setup by the TSR. ; On x86, it's not possible to directly copy from one segment register ; to another, so we'll use AX as a scratch: mov ax, cs mov ds, ax mov es, ax ; Let's add a "hello world" hook: ; NOTE: Normally it's a bad idea to call DOS interrupts in a TSR ; because DOS itself is not re-entrant. However, as in this example, ; we've hooked the unused 0x66, which DOS does not call out of the box, ; which means we'll never be in this ISR while we're in DOS. ; If this were real code, we would have to check the INDOS flag for sanity. mov ah, 9 mov dx, hello_world_str int 0x21 ; DOS compatability "quirk?". On DOSBox (which I initially tested this on) ; there's a default entry in the IVT for all interrupts in F000:xxxx. ; Documentation suggestions that this is also the default behavior ; for MS-DOS though I can't confirm it. ; ; FreeDOS, on the other hand, leaves unused INTs initialized to 0000:0000 ; so blindly far calling it causes a fault. So we need to check if the ; segment is 0000, and skip chaining if that's the case cmp word [previous_hook_segment], 0x0000 je skip_chain ; Chain to other TSRs pushf ; pushf is required because iret expects to pop flags call far [previous_hook_offset] skip_chain: ; We're done, restore to previous state pop es pop ds popa popf ; To return from an interrupt, we use the special iret instruction iret
Quite a bit of code for not doing much. As the code comments explain, the interrupt handler has to preserve any information in the registers it wants to use. For this example, we just save everything with a pushf instruction followed by pusha instruction, which puts the FLAGS register followed by all the general purpose registers (AX-DX, SI, DP, BP, SP) on the stack. Preserving flags in an ISR is extremely important since FLAGS is where things like comparison results are stored; if you corrupt FLAGS, it's completely possible that an application evaluates an "if" statement the wrong way and becomes a source of hard-to-impossible-to-find bugs.
ISRs are somewhat notorious in that they appear deceptively easy to code, and absolutely disastrous if you get it wrong. One of the major things to be aware of is that it's possible for an interrupt to be interrupted. For example, if your interrupt handler is running, and someone taps on the keyboard, the keyboard handler will preempt you. Depending on what you're doing, this might not be a problem, or it could "lock up" the computer. ISRs can turn interrupts on and off with the sti/cli instructions, but an all-too-common bug is forgetting to turn interrupts back on. Raymond Chen, a developer at Microsoft, wrote an entire chapter in his book "The Old New Thing" dedicated to the things that stupid applications do that Windows had to patch around — such as forgetting how to handle interrupts.
The second consequence is that ISRs should be reentrant. For those who are not hugely familiar with computer programming, reentrancy is the ability for a subroutine to be interrupted, then called again safely. For example, if you're listening to keyboard events, it's possible that two events can come at the same time and the second event preempts the first one. Bad Things(tm) happen if you have non-reentrant ISRs. The only reason this is a 'should' vs. a 'must' is that DOS itself is not reentrant; as the comment explains, you can't safely call a DOS interrupt from an ISR. DOS provides a special global flag known as INDOS to let callers know if it's safe to make an interrupt check; it was excluded above for brevity and because we used an unused interrupt.
The final common pitfall for DOS-based ISRs is it is possible for multiple TSRs to hook the same interrupt. For example, App A and App B can both decide they want the same interrupt. Depending on the application, it may chain interrupts down, or it may claim an interrupt entirely for itself. This can lead to infuriatingly complicated issues to debug if the other TSR is not well-behaved. Microsoft and IBM eventually provided built-in TSR multiplexing in DOS in the form of int 2F, but the API is extremely difficult to use and failed to solve many of the inherent issues.
Let's take a momentary digression from TSRs to look at how functions work and how they interact with the stack. From an instruction perspective, Intel processors provide a "call" opcode which pushes the current instruction pointer to the stack, and then unconditionally jumps to a given location. It doesn't, however, define the behavior of how arguments are passed or the management of the stack. As such, developers have created conventions to specify how the stack and arguments should be passed from one function to another.
For non-programmers, the stack can be considered to be a "working space" where a program can store local variables and temporary information such as result values. In contrast to the heap, stacks are relatively small, and are essentially localized to a given function. For historical reasons, the stack grows 'down' from upper memory addresses to lower memory addresses. The stack pointer SP always points to the top of the stack. When information is pushed to the stack with a "push" operation, the value saved is stored in memory to the location pointed at SP and the register itself is decremented by the size. In contrast, deleting an item from the stack simply increments SP allowing new information to override the old.
For example, let's assume we have a C function with the following prototype:
// By default, most C compilers use the CDECL calling convention on x86 int example(int a, int b) { // We'll do stuff here return a+b; }
Unlike most architectures, x86 defines multiple types of calling conventions. Of these, the most common are stdcall (used primarily by Windows), and cdecl (C Declaration). For the code I write, I'm sticking to the cdecl convention for my own sanity. cdecl is what's known as a "caller-based" convention, which means the calling function is responsible for cleaning up the stack at the end of a function. Here's what the calling code looks like in assembly:
example_call: mov ax, 4 mov bx, 5 ; Arguments go in left to right push ax push bx ; Under CDECL, names are decorated with a _ to indicate ; they're a function, so example becomes _example call _example ; Now we need to clean the stack up add sp, 4 ; The return value (9) comes back in ax ; all other registers are smashed (aka their ; values are not preserved into or out of the ; function)
Fairly straight forward, right? Let's look at how this function might be implemented so we can discuss the base pointer (BP) as well. Here's what _example looks like:
_example: ; Setup stack frame push bp mov bp, sp ; The stack now has the following layout ; bp[+2] stack frame ; bp[+4] int a ; bp[+6] int b ; Move values from the stack to registers mov ax, [bp+4] mov bx, [bp+6] add ax, bx pop bp ret
BP, or the base pointer, can be considered a reference point for where each function begins and ends. Whenever we enter or leave a function, the base pointer forms the base of the stack for that function (hence the name). These reference points are known as stack frames, and since every function copies SP (which always points to the top of the stack) to BP, you can always tell where you are relative to other functions. Debuggers, for example, walk the stack to determine where they currently are by comparing the values of BP to known offsets.
Before we leave the topic of calling conventions, the final point to bring up are near and far calls. In the previous article, I discussed that 16-bit processors can only reference up to 64 kilobytes of memory directly at any given time. As such, if you need to reference code or data outside that 64k window, you need to change the segment so it's pointing in the right location.
For functions, code that's within the same segment is known as a near call. Near calls are equivalent to normal function calls on most other architectures. Far calls in contrast include the required segment, and load CS as part of the function call. Far calls are made by the "call far" instruction, and require the called function to use the "retf" instruction to indicate they need to return far. Far calls have a fairly high performance hit due to the segment change, and thus should be limited as much as possible
In the previous interrupt handler example code, we saw that we had to do a far call to chain to previous TSRs. The reason for this is that interrupt service handling is essentially a special case of a far call; the processor has to change to the ISR's segment in memory. When we chain to another interrupt handler, we have to do the same thing. If you're still confused, the following example will clear things up.
So now that we have the basis of TSRs in our heads, let's look at how they're managed and installed by the operating system. To do that, we need an actual DOS installation. While TSRs do work in DOSbox, DOSbox has some unusual quirks with its environment that make it not 100% accurate to actual DOS (for example, all interrupts have an installed default handler; FreeDOS at least does not do this).
Fortunately for free software, FreeDOS exists which is a (mostly) compatible free software re-implementation of DOS 5. Installation is pretty much identical to what DOS 5 would have been like if it was shipped on a CD vs. floppy disks
The CD is bootable, and starting it up in VirtualBox brings up this boot menu.
The installer offers to start FDISK to create a boot partition. Users of MS-DOS FDISK should find this more or less identical to the standard FDISK.COM
After which DOS installation takes a few minutes, and then promptly crashes. For reasons I can't figure out, the included JemmEx memory extender refuses to work under VirtualBox. Fortunately, EMM386 is happy to do the job, and after a quick reboot, I get dumped to C:\
After configuring WatTCP, and firing up the built in FTP server, I can copy my TSRs over without issue. Of course, given that DOS uses VESA graphics, I can't copy and paste. Fortunately for my sanity, FreeDOS (and MS DOS) support redirecting the terminal with the CTTY command. After a little bit of fiddling with VirtualBox's settings, I get this:
Copy and paste for the win. Anyway, now that we have a decent to use testing environment, let's get into the practical aspect of this.
After doing a clean reboot of the system, FreeDOS reports the following as its memory usage:
C:\>mem Memory Type Total Used Free --------------- --------- -------- -------- Conventional 639K 50K 589K Upper 36K 31K 5K Reserved 349K 349K 0K Extended (XMS) 31,680K 5,626K 26,054K ---------------- -------- -------- -------- Total memory 32,704K 6,056K 26,648K Total under 1 MB 675K 81K 594K Total Expanded (EMS) 31M (32,571,392 bytes) Free Expanded (EMS) 25M (26,705,920 bytes) Largest executable program size 589K (602,672 bytes) Largest free upper memory block 4K ( 4,096 bytes) FreeDOS is resident in the high memory area. C:\>
Lots of numbers, right? We'll do a more in-depth article about the types of memory, but let's do a brief primer here so that the output can be understood. Let's break these down step by step
Conventional memory is what applications in DOS generally have available and refers to the lower 640k of the 1 MiB address space. Anything operating in real mode has to fit in this memory area. FreeDOS reports a total of 639k because a very small chunk of RAM at 0x0000 has to be reserved for the processor's interrupt tables, as well as a small part of COMMAND.COM that has to stay resident at all times to aid things like LOADALL. On this specific system, I have a few TSRs already installed to provide network services which is why a 50k block of conventional memory is already used.
Above the 640k line is what's referred to as the "upper memory area", or UMA and is reserved by DOS. The upper memory area also has things like the monochrome and VGA memory buffers, as well as option ROMs, the DOS kernel, and the BIOS shadow map. Normally, this region of memory shouldn't be used by applications, but due to the fact that conventional memory can get very crowded, on most systems there are small but usable sections of memory in these areas, known as UMA blocks. A memory manager can determine which blocks are safe to use, and load applications or data into these chunks, a process known as "loading high". When we get into hiding our TSR, use of upper memory will become very important
Memory that exists above 1M+64k (that 64k is special, see below), and cannot be directly accessed by real mode. Because neither DOS nor the BIOS can operate in 32-bit/protected mode, and that the 80286 processor could not easily switch from protected mode to real mode, accessing memory above the 1 MiB barrier required various amounts of trickery. Extended memory can extend up from 1 MiB to 4 GiB (which is the architectural limit of 32-bit processors). Accessing extended memory either requires entering protected mode, tricking the processor into unreal mode (which on the 80286 required the LOADALL instruction to put the processor in an invalid state), or using a BIOS service which did one of the previous two options to exchange blocks with conventional memory.
One important line to look at is "FreeDOS is resident in the high memory area." I've stated multiple times that 1 MiB is the limit of what Intel processors can address. As it turns out, this is only a partial truth. Remember that addressing in real mode is done in the form of segment:offset. So what happens if I load a segment value of FFFF?. Well it turns out we can address an additional 64 kilobytes of RAM beyond the 1 MiB barrier. This is known as the high memory area.
Due to many quirks related to the abomination known as A20 (which will get an entire section in the next article), the high memory area requires special rules and methods to access. The short version is that unless you have a memory manager, or are willing to manipulate the A20 line directly (which is dangerous), the HMA is not usable by general applications. We'll look more at this in a future article.
So with that all out of the way, let's look at how a TSR is loaded. In the github repository, there's an example TSR known as tsr_example which, when loading, prints out the segment registers and the segment:offset of the next hook in memory. It's combined with a "callhook" program that simply runs int 0x66 to invoke it. So let's load it and see what happens:
C:\> tsr_demo DOS loaded the COM with this: CS: 0C9C DS: 0C9C SS: 0C9C
When our TSR is loaded, it reads and dumps out the segment registers, showing DOS loaded us at 0C9C. For COM files (or any executable that is 'tiny'), CS=DS=SS. When DOS loads a COM executable, the entire thing is copied into memory, CS/DS/SS are set to the execution point, and the process far calls to CS:0100 to begin execution. If we check our memory usage, we can see that it has dropped:
C:\>mem Memory Type Total Used Free ---------------- -------- -------- -------- Conventional 639K 115K 524K
NOTE: It shouldn't be using 50 kiB of RAM per run; the binary is only 324 bytes! I think I'm calculating the paragraphs-to-preserve number wrong, but I didn't get a chance to fix it by time this article went up. If someone wants to look at the code, check tsr_examine.asm; the TSR int call is at the very bottom of the file and based off example code I found elsewhere.
If we run callhook, we can determine that our TSR in fact installed successfully, and the previous hook is at 0000:0000 (which is skipped over).
C:\>callhook CS: 0C9C DS: 0C9C SS: 1CB6 Previous hook is at 0000:0000
Note that SS is different. When a TSR is invoked (in this case by doing int 0x66), it inherits the running state of whatever application that was running at the time. It's the responsibility of the TSR to put the stack back the way it found it when it exits, else you'll cause random corruption in userspace applications.
Now lets look at see what happens if we invoke our TSR multiple times:
C:\>tsr_demo DOS loaded the COM with this: CS: 1CB6 DS: 1CB6 SS: 1CB6 C:\>tsr_demo DOS loaded the COM with this: CS: 2CD0 DS: 2CD0 SS: 2CD0 C:\>tsr_demo DOS loaded the COM with this: CS: 3CEA DS: 3CEA SS: 3CEA
With each load, we're loading higher in memory. DOS does not automatically rebase or relocate TSRs; they stay at whatever memory segment they were in when they terminated. As DOS automatically loads COM files as low as possible, each run is loaded at the next "available" section of RAM. Calling mem shows that our available conventional memory has dropped
C:\>mem Memory Type Total Used Free ---------------- -------- -------- -------- Conventional 639K 308K 331K
So what now happens if we run callhook?
C:\>callhook CS: 3CEA DS: 3CEA SS: 4D04 Previous hook is at 2CD0:0103 CS: 2CD0 DS: 2CD0 SS: 4D04 Previous hook is at 1CB6:0103 CS: 1CB6 DS: 1CB6 SS: 4D04 Previous hook is at 0C9C:0103 CS: 0C9C DS: 0C9C SS: 4D04 Previous hook is at 0000:0000
We chain through each version of the TSR, easily visible by CS/DS changing as we go upwards until we reach the 'stop' at 0000:0000. At this point, I think we have a fairly good grasp on how TSRs work in practice, what DOS gives us, and how interrupts work more in-depth. At this point, this article is already past the 4k word mark, so I'm going to cut this off here before the editors stage a revolution. So let me close this off with the fact I need some help with the community.
As I mentioned in Part 1, for getting the keylogged data out of the system, I'm interested in using a non-TCP/IP based protocol. Up until the mid-90s, IPX and NetBIOS-only networks were still relatively common, and it wasn't until the domination of the 'modern' internet that TCP/IP became ubiquitous. After considerable amounts of research, I've decided that fitting in the theme of 'unusual yet neat', I'd like to extract the data out using AX.25 and ham radio equipment. The other alternative I may do is using IPX, as I found the original DOOM source code actually has a complete IPX driver on it. As of right now, I'm somewhat torn between doing this with AX.25 or IPX. The thing is though, I'm going to need some help to make AX.25-based keylogger a reality.
The use of standard radio would allow the keylogger to work on air-gapped computers and show how a potential exfiltration of data might have been done in environments predating TCP/IP. It would be fairly easy to modify a standard PC to hide a 2m or 70cm transmitter within the case and connect to it via I/O lines in an early form of the NSA's current Tailored Access Operations. It would also mean that the keylogger itself would be fairly useless for use in real-life which aids the goal of preventing proliferation of attack tools.
The problem is right now, I have a serious lack of equipment. While I'm a licensed ham in the United States (KD2JRT/Technician), the only equipment I have are two Baofeng UV-82s. What I need is to figure out a decent way to handle getting data broadcasted. I know it's at least theoretically possible to build a cable to hook the Baofengs up to a computer's mic/sound in, and use a software TNC (Terminal-Node Connector) to do AX.25. By doing so, I could simply connect the TNC to VirtualBox's serial port emulation, and “blamo”, AX.25 for DOS.
What I need from the community is two-fold:
I'm currently in New York City for the foreseeable future. I could potentially build cables for my Baofengs myself but I don't currently have a soldering iron, and my living situation makes it rather difficult to do electronics work here. Depending on pricing, I can probably cover shipping and handling, or compensate out-of-pocket work done by a community member. If you're interested in helping, post a comment or send me an email (mcasadevall@soylentnews.org), and I'll be in touch.
Finally, if you've enjoyed this article, please consider subscribing or gifting a subscription. No account is required, as you can anonymously gift subscriptions to my alt-account, mcasadevall (6). I'm hoping we can raise enough money to fully pay off the stakeholders of the site, and perhaps get a small budget together to let me dedicate more time to content like this, or buy equipment to explore more obscure pieces of hardware (i.e., digging into doing some INIT coding on classic Mac OS, or something of that nature). I'd like to give thanks to all those subscribed, including jimtheowl after the previous article.
And with that, 73 de NCommander!
We had submissions from two different Soylentils on this story about an IT worker for the company which managed Hillary Clinton's email server apparently looking for help on how to wipe email addresses.
The Gateway Pundit reports:
An employee with Platte River Networks, the company in charge of Hillary Clinton's home server, who was granted immunity from Obama's Department of Justice in their investigation of Clinton, reportedly asked for assistance in July 2014 from Reddit users on how to purge emails and how to strip VIP's email address from "a bunch of archived emails":
"Hello all- I may be facing a very interesting situation where I need to strip out a VIP's (VERY VIP) email address from a bunch of archived email that I have both in a live Exchange mailbox, as well as a PST file. Basically, they don't want the VIP's email address exposed to anyone, and want to be able to either strip out or replace the email address in the to/from fields in all of the emails we want to send out. I am not sure if something like this is possible with PowerShell, or exporting all of the emails to MSG and doing find/replaces with a batch processing program of some sort. Does anyone have experience with something like this, and/or suggestions on how this might be accomplished?"
Paul Combetta, the IT guy who used BleachBit to wipe email servers for Hillary Clinton, went on Reddit in July 2014 and asked this question:
Remove or replace to/from address on archived emails?
Hello all- I may be facing a very interesting situation where I need to strip out a VIP's (VERY VIP) email address from a bunch of archived email that I have both in a live Exchange mailbox, as well as a PST file. Basically, they don't want the VIP's email address exposed to anyone, and want to be able to either strip out or replace the email address in the to/from fields in all of the emails we want to send out.
Paul Combatta was given immunity by the Justice Department.
If you check the timeline you find that in July 2014 there were outstanding FOIA requests but Congress had not yet subpoenaed the email server.
One of the commenters on the Reddit thread said: "If there was a feature in Exchange that allowed this, it could result in major legal issues."
SpaceX's CEO Elon Musk has been talking about the Mars Colonial Transporter (MCT) since around 2012, and has said that SpaceX will not hold an initial public offering until the MCT is flying regularly. The MCT was said to be able to deliver 100 tons of cargo to the surface of Mars, fly using upgraded "Raptor" rocket engines fueled by liquid oxygen (LOX) and liquid methane, and achieve full reusability on all stages.
Now, ahead of a session at the International Astronautical Congress on Sept. 27th, Musk has decided to change the name of the Mars Colonial Transporter to reflect broader and more ambitious planned capabilities:
For most of its 14 year existence, SpaceX has focused on designing and developing the hardware that will lead to its ultimate goal: colonizing Mars. These plans have remained largely secret from the general public, as company founder Elon Musk has dropped only the barest of hints. But that is expected to change on Sept. 27, during a session at the International Astronautical Congress, when Musk details some of these plans for the first time in a public forum.
However, on the eve of the meeting, Musk dropped a surprise on Twitter. The workhorse spacecraft that will carry approximately 100 tons of cargo or 100 people to the surface of Mars, which until now has been popularly known as the Mars Colonial Transporter, can't be called that, Musk said. "Turns out MCT can go well beyond Mars, so will need a new name..." he tweeted on Friday evening. By Saturday evening he had a new name dubbing the spacecraft the "Interplanetary Transport System," or ITS.
Mars, it turns out, isn't the solar system's only marginally habitable world for would-be new world colonists. The Moon, Venus, the asteroid Ceres, and outer Solar System moons Titan and Callisto all have some advantages that could allow for colonies to subsist. However, Mars has generally been the preferred destination—due to its relative proximity to Earth, a thin atmosphere, and sources of water ice. Musk now seems to be suggesting that some of these more distant destinations, especially moons around Jupiter and Saturn, might be reachable with the Interplanetary Transport System.
Also at TechCrunch.
An article in The Economist makes the case for "wooden" skyscrapers:
New techniques mean that wood can now be used for much taller buildings. A handful are already going up in cities around the world. The 14-storey Treet block of flats in Bergen, Norway, is currently the tallest. But Brock Commons, an 18-storey wooden dormitory at the University of British Columbia in Canada, is due to be completed in 2017. That is when construction is expected to begin on the 21-storey Haut building in Amsterdam. Arup, a firm of engineering consultants working on the project, says it will be built using sustainable European pine. Some architects have even started designing wooden skyscrapers, like the proposed Tratoppen ("the treetop" illustrated above), a 40-floor residential tower on the drawing-board in Stockholm.
Wood has many attractions as a construction material, apart from its aesthetic qualities. A wooden building is about a quarter of the weight of an equivalent reinforced-concrete structure, which means foundations can be smaller. Timber is a sustainable material and a natural "sink" for CO2, as trees lock in carbon from the atmosphere. Tall steel-and-concrete buildings tend to have a large carbon footprint, in part because of the amount of material required to support them. Using wood could reduce their carbon footprint by 60-75%, according to some studies.
There are two main concerns about using wood to build high. The first is whether wood is strong enough. In recent years there have been big advances in "engineered" wood, such as cross-laminated timber (CLT) made from layers of timber sections glued together with their grains at right angles to one another. In much the same way that aligning carbon-fibre composites creates stronger racing cars, aircraft and golf clubs, CLT imparts greater rigidity and strength to wooden structures. A recent experiment by Skidmore, Owings & Merrill, a firm of architects, and Oregon State University, shows how strong engineered wood can be. The researchers used CLT in a hybrid form known as concrete-jointed timber. This featured an 11-metre wide CLT floor section with a thin layer of reinforced concrete spread across the surface. Thicker sections of concrete were added where the floor was supported by pillars. It was put into a giant test rig where a powerful hydraulic press pushed with increasing force onto the surface. The researchers wanted to see how the structure moved under load, but kept pressing in order to find its limits. The floor finally began to crack when the load reached a massive 82,000 pounds (37,200kg), around eight times what it was designed to support.
If you want to know what the second main concern is, you'll have to read the article. 😉
Direct from the mind of the guy who bought you the "I will kill you" presentation at DEF CON 23, is another mind bending, entertaining talk. This time it's bigger and badder than before.
Are you sick and tired of your government? Can't wait another 4 years for an election? Or do you want to be like the CIA and overthrow a government overseas for profit or fun? If you answered yes to one or more of these questions than[sic] this talk is for you! Why not create your own cyber mercenary unit and invoke a regime change to get the government you want installed? After all, if you want the job done right, sometimes you have to do it yourself.
Find out how over the last 60 years, governments and resource companies have been directly involved in architecting regime changes around world using clandestine mercenaries to ensure deniability. This has been achieved by destabilizing the ruling government, providing military equipment, assassinations, financing, training rebel groups and using government agencies like the CIA, Mossad and MI-5 or using foreign private mercenaries such as Executive Order and Sandline. Working with Simon Mann an elite ex SAS soldier turned coup architect who overthrew governments in Africa, Chris Rock will show you how mercenary coup tactics directly applied to digital mercenaries to cause regime changes as the next generation of "Cyber Dogs of War".
The YouTube video promises to teach you, among other things:
Forget all your nautical knowledge and fire your navigator, because it's time for self-driving boats:
When it comes to autonomous vehicles why stop on land when you can expand to the seas? That's the thinking of MIT and Amsterdam's Institute for Advanced Metropolitan Solutions (AMS Institute). The two groups announced on Monday that they have joined forces to create the cleverly named Roboat to explore the possibilities of creating self-driving boats.
The boats would be used for a variety of functions, including transporting people and goods, but would also be capable of much more. "Imagine a fleet of autonomous boats for the transportation of goods and people," says Carlo Ratti, professor at MIT and principal investigator in the Roboat-program in a statement announcing the partnership, "but also think of dynamic and temporary floating infrastructure like on-demand bridges and stages, that can be assembled or disassembled in a matter of hours."
Patent trolls have plagued tech companies for years -- but a new web site proposes a novel solution. "Everyone in the world can back the crowdfunding campaign against the patent," explains their site, which includes a "Featured stupid patents" section. After covering the cost of the fees for the U.S. Patent and Trademark Office and a lawyer, "The rest is distributed to those who find valid prior art...any evidence that a patent is not novel. We review all the prior art pieces and reward those that may invalidate a claim... Then, we file an ex partes reexamination to the USPTO."
The site's founders include the legal officer at Newegg, who has been fighting patent trolls in the courts for years -- and they came up with a great slogan for the site. "We invalidate patents that shouldn't exist."
In the waters off the coast of Hawaii, a tall buoy bobs and sways in the water, using the rise and fall of the waves to generate electricity.
The current travels through an undersea cable for a mile to a military base, where it is fed into Oahu's power grid—the first wave-produced electricity to go online in the U.S.
By some estimates, the ocean's endless motion packs enough power to meet a quarter of America's energy needs and dramatically reduce the nation's reliance on oil, gas and coal. But wave energy technology lags well behind wind and solar power, with important technical hurdles still to be overcome.
To that end, the Navy has established a test site in Hawaii, with hopes the technology can someday be used to produce clean, renewable power for offshore fueling stations for the fleet and provide electricity to coastal communities in fuel-starved places around the world.