WEBVTT

00:01.600 --> 00:07.200
Hello, everyone, and welcome to my talk, Breathless, A Tall Tale of a CPAP Machine.

00:07.200 --> 00:14.220
For those that don't know me, I am Vee, but a little bit more about myself.

00:14.220 --> 00:19.320
I'm an assistant professor in Norway, specifically in digital forensics and incident response.

00:19.320 --> 00:23.880
I'm a very proud cyborg with a long-standing implant since 19.

00:24.200 --> 00:29.080
I did digital forensics and incident response for a long time, still doing it.

00:29.080 --> 00:30.760
I do cyber threat intelligence.

00:30.760 --> 00:36.720
I also like to do some OSINT and find information specifically about medical devices that I'm looking at.

00:36.720 --> 00:39.160
There is a wealth of information out there.

00:39.160 --> 00:49.240
I'm also very passionate about patient rights, specifically being a patient myself, advocating for those that don't have a voice or feel they don't have a voice.

00:49.640 --> 00:54.280
That's currently what I'm doing a lot of in Norway is physician education.

00:54.280 --> 01:07.700
Now, I'm also a proud mom of two little girls, albeit not that little girl, no, that little anymore, but they are absolutely kick-ass, and they will soon be presenting one day similar work that mom does.

01:08.400 --> 01:11.640
Now, what exactly are we going to be talking about today?

01:11.640 --> 01:21.340
Well, the foundation of how I look at medical devices is looking at it by using my scientific process, which is medical device forensics.

01:21.900 --> 01:25.520
This is made up and visualized in a triangle.

01:25.520 --> 01:30.060
A triangle is one of the strongest engineering shapes there is.

01:30.360 --> 01:34.400
I realized that looking at a medical device, I couldn't just look with one lens.

01:34.400 --> 01:39.440
I had to look through multiple lenses to get a holistic picture of what was happening on the device.

01:39.700 --> 01:48.320
Firstly, I wanted to know how it worked mechanically, how it functioned, and that I had to go through a process of debugging.

01:48.320 --> 01:58.860
I had to understand and learn how it works, and that kind of falls into the components of medical device engineering, which every manufacturer will be very familiar with.

01:58.860 --> 02:07.720
Now, also, digital forensic scientific process is one that I've used, and that is kind of, I preserve the information on there.

02:07.720 --> 02:08.580
I examine it.

02:08.580 --> 02:09.440
I analyze it.

02:09.440 --> 02:11.880
I reconstruct a sequence of events.

02:11.880 --> 02:17.200
But I also match that up with, you know, knowing how the device works.

02:17.200 --> 02:26.740
If I know how the device works, and what underlying file systems it has, and how the data is organized, I can anticipate where I will find my forensic evidence.

02:27.400 --> 02:29.760
Now, I also look at the clinical data.

02:29.760 --> 02:34.660
Can I visualize the clinical data as the physician or the doctor would see it?

02:34.660 --> 02:37.160
How does that correlate with the timeline that I had?

02:37.160 --> 02:39.820
How does it correlate with the functioning of the device?

02:39.840 --> 02:47.660
So, kind of bringing it all together to have that whole holistic view of what exactly took place on the device.

02:51.000 --> 03:00.900
Now, I, you know, when I teach this to my students, and when we do the whole medical device forensic class, they're like, but why a CPAP machine?

03:00.900 --> 03:13.140
Now, I'll tell you shortly, but it comes down to the fact that there's about 50 to 70 million people around the world that's been diagnosed with obstructive sleep apnea, or otherwise OSA.

03:13.940 --> 03:24.760
So, it's quite a lot of people that have potentially got a device like a CPAP or a BiPAP that they use every night, every time they go lie down to have a nap.

03:24.760 --> 03:31.420
Now, the sleep economy is 432 million US dollars the last time I looked.

03:31.420 --> 03:35.040
The global market share is 81 billion US dollars.

03:35.120 --> 03:38.800
But those things aside is not the most important thing for me.

03:38.800 --> 03:43.760
My dad has been using his device for a few years now.

03:43.920 --> 03:48.500
And I wanted to know when he initially got the device, how was it functioning?

03:48.500 --> 03:50.080
What was it recording?

03:50.420 --> 03:52.360
You know, how do I know it's working?

03:52.360 --> 03:56.240
How do I trust implicitly in this device?

03:56.340 --> 04:01.400
And he kindly let me look at his device in a non-destructive manner.

04:01.660 --> 04:13.020
So, this whole analysis was done using digital forensic mechanisms that doesn't need to open the device at all.

04:13.920 --> 04:23.720
Now, once you have preserved the evidence or looked at the evidence on the CPAP machine, you'll see that it makes use of a standard EDF file.

04:23.720 --> 04:28.840
Now, EDF files are generally used to record medical signals.

04:28.840 --> 04:37.360
So, they are used in sleep studies largely to see, you know, to record brain signals and how was the patient sleeping?

04:37.360 --> 04:38.660
Was his eyes open?

04:38.660 --> 04:40.100
Was it closed?

04:40.320 --> 04:43.440
Was there any, you know, events where he stopped breathing?

04:43.440 --> 04:47.440
So, this is quite a very standard medical format.

04:47.440 --> 04:49.980
And it's also very well documented.

04:50.040 --> 04:56.120
But the best thing about EDF files is that it's actually in printable US ASCII.

04:56.280 --> 05:02.760
So, you can actually read some of the data with just something like a hex editor, plain and simple.

05:03.180 --> 05:09.860
Now, a signal in an EDF data record is a series of two-byte samples.

05:10.100 --> 05:18.800
These subsequent samples represent integer values of the signals which have been sampled with an equal time interval.

05:19.140 --> 05:26.280
So, these signals are kind of what helps us visualize was the patient breathing?

05:26.400 --> 05:28.520
Was the machine responding?

05:28.640 --> 05:29.800
Was there any events?

05:29.800 --> 05:35.560
But I'll get into the kind of signals and annotations you find on these files a little later.

05:35.840 --> 05:38.380
An EDF file is also super flexible.

05:38.580 --> 05:41.540
It allows for exchange and storage.

05:41.620 --> 05:45.120
It's very simple to use and simple to write to.

05:45.620 --> 05:53.020
Some fun trivia about the EDF file is it was developed at a sleep congress in 1987.

05:53.020 --> 05:55.620
So, it is as old as I am.

05:55.680 --> 06:01.220
EDF+, which was slightly better, was developed in 2002.

06:01.900 --> 06:04.120
Now, let's look at some of the specifications.

06:04.120 --> 06:05.700
And this is not all of them.

06:05.700 --> 06:08.540
This is just the highlight of some of the interesting ones.

06:08.540 --> 06:17.480
Now, the start date and start time fields in the header will only contain characters from 0 to 9 separated by a period value.

06:17.480 --> 06:25.520
So, you could use regex to actually search through the files to find these relevant samples or relevant values.

06:25.560 --> 06:28.740
There's also a local patient identification.

06:28.740 --> 06:34.840
However, this is not always there because this is set up by the technician.

06:34.840 --> 06:37.960
So, it depends on how the machine has been set up.

06:37.960 --> 06:43.260
Now, I know it depends is pretty much a forensic term that we use because there's so many variables.

06:43.260 --> 06:50.200
It's not guaranteed that you'll have all the information that I present today in an EDF file on your machine.

06:50.280 --> 06:56.500
Now, it also includes the birth date of the patient in a day, day, month, month, year, year format.

06:56.660 --> 06:59.720
This machine was a South African machine.

06:59.720 --> 07:05.260
So, quite possibly this could change depending on your region the machine was bought from.

07:05.260 --> 07:07.760
I'm thinking specifically in the US.

07:09.900 --> 07:19.840
So, these are kinds of very important because this is how we correlate evidence and timelines is using these specific values.

07:20.100 --> 07:30.120
Now, if we look at this, this is an ASCII translation table to give you an idea of how you can actually parse out the header file.

07:31.280 --> 07:34.240
As you can see, there is a start date.

07:34.240 --> 07:37.020
There's a local recording identification.

07:37.760 --> 07:39.700
This table is freely available.

07:39.700 --> 07:41.660
There are resources to it.

07:41.660 --> 07:58.660
But this was just to give you an idea of actually, you know, how looking into data-driven analytics processes, because this is how I came to this information, allowed me to actually look at the files in the raw format and identify quite quickly if there was any,

07:58.660 --> 08:05.180
you know, sequences that were out according to the local recording times because those are supposed to flow.

08:05.180 --> 08:10.260
Now, if a patient didn't use it for one evening, there would be a gap in the date and time.

08:12.480 --> 08:19.000
Now, I looked at two devices because my dad had one device and then ultimately upgraded.

08:19.140 --> 08:22.200
This is not a reflection on the manufacturer at all.

08:22.360 --> 08:25.200
This, it wasn't looking at vulnerabilities.

08:25.200 --> 08:28.040
I was simply looking at can I do forensics on the device?

08:28.040 --> 08:30.260
Can I actually learn from the data?

08:30.260 --> 08:37.140
Can I marry the engineering with the forensics with the clinical side of things?

08:37.140 --> 08:39.080
Now, more about the device.

08:39.080 --> 08:45.900
The ResMed AirSense 10 machine collects quite a lot of statistics and quite a lot of interesting statistics.

08:45.900 --> 08:50.140
It has an AHI index, pressure and leak usage.

08:50.140 --> 09:01.780
Now, the machine allows a patient to sleep more comfortably because it keeps the airways open, positive airway, by actually high pressure air that goes in.

09:01.800 --> 09:12.060
Now, how they monitor whether a patient is using the device is that they actually record specific statistics that get sent away to the doctor.

09:12.060 --> 09:21.880
So, this device has the capabilities to actually send data out and be connected to a network.

09:22.320 --> 09:24.980
It depends on the geographical location.

09:24.980 --> 09:30.460
In South Africa, this is not very much used where the data doesn't get sent to the doctor.

09:31.520 --> 09:38.080
Now, let's look a little bit at the different kind of signals or the different kinds of things that the CPAP machine records.

09:38.080 --> 09:41.920
Now, the first one we're going to look at is AHI signals.

09:41.920 --> 09:50.900
Now, these are recordings of the number of hypopneas or times you stopped breathing has been recorded.

09:50.900 --> 09:54.380
And these are done by an hour-by-hour basis.

09:54.460 --> 10:03.580
Now, the AHI index is one of those that I quite frequently used in the CPAP scenarios to actually determine the overall sleeping health of the patient.

10:03.580 --> 10:12.880
This is a severity rating of how bad the patient's sleep is, how many events they have, how well treatment is working.

10:12.880 --> 10:20.400
It's also an indication whether there is more clinical need for an adjustment to the machine.

10:20.600 --> 10:44.820
Now, the AHI signals has got forensic clinical value because it indicates the overall sleep health of the person, specifically looking at hour-by-hour basis, how many times the patient stopped breathing, overall using the mathematical equation to determine what the index is about how bad your overall sleep health is.

10:44.820 --> 10:53.440
So this is quite an important signal that I looked at to determine whether or not my dad was actually improving or not improving.

10:54.000 --> 10:58.360
Now, the CPAP pressure setting, this is a fixed pressure setting.

10:58.360 --> 11:07.100
Now, it's also very important to know that there is a maximum pressure that a human being can take.

11:07.100 --> 11:11.080
So there are recommendations for the devices not to go over that.

11:11.080 --> 11:19.740
Now, if you go look at the machine itself, you will see that it's a very patient-specific setting.

11:19.740 --> 11:25.240
There will be a high and there will be a low setting, meaning that they may be different from day to night.

11:25.240 --> 11:31.200
You might have a higher requirement for pressure in the night versus during the day.

11:31.280 --> 11:37.020
Now, this is recorded in a file that's called a .brp file.

11:37.400 --> 11:41.500
This is also known as the high-resolution graph data.

11:41.500 --> 11:50.100
And this value will change as the device is used because it basically is alternated.

11:52.100 --> 11:55.480
Now, for example, if we look at this, this is from my dad.

11:55.480 --> 11:58.680
And yes, I have permission to show you this data.

11:59.040 --> 12:01.000
Also, this is very old data.

12:01.000 --> 12:02.220
It's not his latest one.

12:02.220 --> 12:07.800
If we looked at these two kind of things, we have the statistics on the left and we have the device settings.

12:07.800 --> 12:13.280
Now, the minimum pressure rate is 6.4 versus the maximum that is 14.

12:13.280 --> 12:19.220
Now, that is well within the range of what a human being can safely use.

12:20.000 --> 12:25.240
However, if you look at on the left-hand side, you see the values fluctuate a little bit.

12:25.240 --> 12:28.560
And this is how the device is responding to his different needs.

12:28.600 --> 12:32.260
So, the one value, the statistics, is how the device has been used.

12:32.260 --> 12:34.180
And then you have the device settings.

12:34.580 --> 12:36.660
Now, why does this match to us in forensics?

12:36.660 --> 12:42.720
Well, if we know what the clinical setting is supposed to be, we can correlate that the device is set to that.

12:42.800 --> 12:47.780
Any deviation from that would need to be further investigated as to why it was changed.

12:47.780 --> 12:54.360
Also, with the statistics, you can correlate that the device is responding within those parameters and not exceeding them.

12:54.400 --> 13:10.520
If you look at the FDA's database about where a patient complains specifically about medical devices, where physicians also can complain, there were other manufacturers that had problems with pressure being far exceeding what was safe.

13:10.520 --> 13:12.980
And patients had adverse reactions.

13:12.980 --> 13:16.320
So, adverse reactions do occur in these devices.

13:16.700 --> 13:19.620
I'm not aware of any in this specific one.

13:19.620 --> 13:28.060
And I could correlate with my dad's data that he was receiving what was programmed and what was appropriate for his needs.

13:28.060 --> 13:31.080
Now, it also has a leak.

13:31.080 --> 13:34.220
Now, everyone will say, well, it's not supposed to be leaking.

13:34.220 --> 13:40.640
But there is some normal leak, you know, air leak expected with these devices.

13:40.640 --> 13:45.880
Now, the ResMed AirSense 10 has a built-in leak differential within the mask.

13:45.880 --> 13:54.140
It also has the ability to actually indicate whether, you know, the mask is properly used or not.

13:54.180 --> 14:00.700
Now, if this value is exceedingly high, there could be two potential issues.

14:00.700 --> 14:07.680
One could be there is a device fault, that there is such a big leak, or it's just an improper mask fitting.

14:07.820 --> 14:16.680
And these are things that you would investigate if a patient came to you and said, well, you know, I'm not getting adequate treatment.

14:16.680 --> 14:33.120
If you looked at a CPAP leak and you see that it's far exceeding what the manufacturer states in their manuals, you would firstly look into how the mask is fitted, and see if the patient's got it right, if the mask needs to be replaced, or whether it's actually a device fault.

14:33.360 --> 14:41.320
Now, as I said, some leak is normal, and every device on the market has their own threshold, and this is contained in their manuals.

14:41.780 --> 14:50.340
Now, this is also used to calculate by, you know, how long the mask was worn, and normally measured in litres per minute.

14:50.560 --> 14:54.480
And this you will also find in the clinical representation a little bit later.

14:56.040 --> 15:10.420
Now, this is also how they use it, they use measurements for compliance purposes, to send it away to the physician to see whether or not the device is used adequately, properly, and correctly.

15:10.840 --> 15:16.580
So this is kind of how they monitor patients' usage of the device.

15:17.040 --> 15:31.860
Now, once we have done understanding around what the device records, what the data is like, I like to look at the partitioning schema and file system, because this is actually where it becomes known to us, this is where we recognize things a little bit more.

15:32.080 --> 15:39.940
A little secret that I've learned is medical devices are nothing weirder than what we are used to in digital forensics and incident response.

15:39.940 --> 15:49.700
They are slightly different, but at a fundamental level, there are similarities between systems we know versus medical devices.

15:49.700 --> 15:56.720
Now, this specific one had a master boot record with a single partition on, which was a FAB32.

15:57.520 --> 16:02.320
There was no volume label set for this specific one, but there was a serial number.

16:02.980 --> 16:15.140
The recordings of the data was in Big Endian, so I can already anticipate kind of what kind of hardware it is, because there's specific hardware that works with, and systems that work with Big Endian.

16:15.240 --> 16:25.800
But it's important to know that, you know, the Big Endian is what is used, because that, when it comes to your date and time formats, it depends on how you will read the hexadecimal values.

16:25.980 --> 16:27.720
Little Endian versus Big Endian.

16:27.720 --> 16:32.560
So this was kind of an important thing, because I didn't fully anticipate that it would be Big Endian.

16:32.560 --> 16:36.560
I kind of thought it would be little, but this was quite a surprise for me.

16:37.320 --> 16:45.140
And now, if we looked at the folder structure, and like I said, this was a non-destructive way of looking at the data recorded on the SD card of the machine.

16:45.240 --> 16:56.380
I haven't opened the machine yet, because at that time, it was under warranty, and it was actively used by my dad, so I didn't really want to go mess with things to a large extent.

16:56.380 --> 17:08.680
Now, if we looked at, logically, at the SD card after we've imaged and mounted it, to understand what was on it, there was some files and folders, and these are kind of uniform across the ResMed range.

17:08.680 --> 17:20.720
Now we have a data log folder, we have an identification.crc, identification.tgt, journal.dat, sdr.crc, sdr.edf.

17:20.720 --> 17:26.260
Now, the crc values are that of its associated file.

17:26.480 --> 17:28.540
I'm not going to go into all of them.

17:28.540 --> 17:30.700
I'm only going to highlight the most important.

17:30.700 --> 17:39.520
If you want to know more about the in-depth analysis of each of these components, feel free to reach out to me, and we can have a discussion about it.

17:39.520 --> 17:41.380
But I'm a little bit short on time.

17:41.500 --> 17:50.480
Now, the data log folder contains high-resolution graph data records, and it's information about the airflow of the device.

17:50.540 --> 17:56.100
It also contains annotations and notes, whether or not events have taken place.

17:56.100 --> 18:02.660
Now, if an event has taken place, it is recorded in a .eve file, which is the events file.

18:02.720 --> 18:13.420
Now, this is an annotation that is used to determine whether the patient suffered any attacks like hypopnea, apnea, obstructive apnea, or central apnea.

18:13.420 --> 18:21.080
So it kind of is about, you know, is there any adverse events that was noted and that the machine responded to.

18:21.080 --> 18:27.520
Each session is split across four .edf files, and these are different files that contain different annotations.

18:27.520 --> 18:34.320
The file names are generated by date, type, and type of recording, and then followed by the .edf extension.

18:34.600 --> 18:42.160
So you would have .eve files, you will have .bpd files, because they contain different information.

18:42.160 --> 18:47.320
There is also a CRC checksum generated for each of the files.

18:48.140 --> 18:59.740
Now, this is an example of a high-resolution graph data, and it tells us more about the airflow, as well as events that have taken place.

18:59.940 --> 19:06.800
But this doesn't tell us much in terms of just looking at it like this, but I will show you how to visualize it better.

19:07.320 --> 19:10.320
Now, str.edf was another one that was very interesting.

19:10.320 --> 19:13.640
This is the file that contains the values for the HI index.

19:14.980 --> 19:22.240
And as I said earlier, this is a very important thing, because we want to know what the overall sleep health of a patient potentially is.

19:22.360 --> 19:26.240
And the way that we know that is by looking at the str.edf file.

19:26.300 --> 19:34.520
It's updated at the end of every session, but most records only contain one entry per day, because it's at the end of the session.

19:34.520 --> 19:40.760
And theoretically, most patients generally use this during the night, because they're not sleeping during the day.

19:41.300 --> 19:45.600
This file can also be used as a summary of the recorded sessions for the day.

19:45.920 --> 19:55.320
But it's important to know that there will only be mostly one, and it would be an overall HI index of how the patient is at the end of the sessions.

19:56.140 --> 20:02.660
Now, another interesting thing that I wanted to look at is, well, what happens if I actually factory reset the device?

20:02.660 --> 20:06.120
What happens, you know, how's the data retained?

20:06.820 --> 20:17.560
And the SN10 has multiple processes that it goes through to erase all data, and it has some data retention policies or things in place.

20:17.560 --> 20:21.660
It kind of looks like it is just a high level format.

20:21.660 --> 20:33.680
So what I did was actually, you know, backup my dad's data, factory reset the device, and then look at whether or not I can actually retain, you know, recover some data.

20:33.820 --> 20:40.700
But the overall data retention rules are your BRP data is continuously erased every seven days.

20:40.700 --> 20:45.620
And this is important in digital forensics to understand what data is erased.

20:45.620 --> 20:53.740
And when I say erased, I mean that it is made unallocated so that the file system can overwrite that value.

20:53.740 --> 20:58.840
So there is still the potential to recover files if it hasn't been overwritten yet.

20:58.840 --> 21:05.380
So the quicker you do a forensic acquisition of a potential device, the better off you are to recover data.

21:05.380 --> 21:09.880
Obviously, the longer time goes past, the more difficult it gets.

21:09.880 --> 21:13.620
Now, PLD data is continuously deleted every 30 minutes.

21:13.620 --> 21:18.040
So this will be much harder to recover versus that of seven days.

21:18.080 --> 21:22.160
Now, SAD and EVE files are retained for 365 days.

21:22.160 --> 21:24.280
Now, these are your events and airflow files.

21:24.280 --> 21:29.620
So these are, in my opinion, the most important ones to look at.

21:29.620 --> 21:32.240
And luckily for us, they don't get deleted.

21:32.460 --> 21:38.740
Obviously, this is on an SD card, so it runs the risk of actually filling up.

21:38.740 --> 21:41.760
But it takes quite long because these files are quite small.

21:42.660 --> 21:50.820
Now, when I looked at the manual for the Essence 10 device about how to factory reset it, it is simply a quick format.

21:50.820 --> 21:53.000
It formats the SD card.

21:54.320 --> 22:01.480
And if you've done digital forensics, you know that there's a large chance on FAT32 that you'll be able to recover the files.

22:03.080 --> 22:10.540
When examining the unallocated space for one thing, you can actually look for EDA file signatures, which you can see below.

22:10.540 --> 22:13.360
And you can go search and recover for those files.

22:13.460 --> 22:31.640
Now, because this is a FAT32 file system, it allows for us to use normal digital forensic techniques we would have used to retrain a FAT or to go look for files that have been marked with hexadecimal 0XE5, which is how directory entries are marked as deleted.

22:31.840 --> 22:35.260
Now, those can be reversed if the data is intact.

22:35.260 --> 22:41.300
So you can do data recovery on these devices just because of the file system that's on there.

22:41.300 --> 22:51.560
And I think this is one of the things people don't expect with medical devices is that it actually follows rules of data storage of file systems we know.

22:52.600 --> 22:56.240
Now, I did note that there were some inconsistencies.

22:56.240 --> 23:11.240
The deleted file directory entries, when I examined them to determine the information that could be, you know, distinguished or I could understand, there were some inconsistencies with regards to dates and times which were recorded in the directory entries.

23:11.240 --> 23:17.060
This was anticipated just because of it being a medical device.

23:17.100 --> 23:20.460
Sometimes it throws in a loop or it throws in a surprise.

23:20.460 --> 23:33.880
Now, the creation date for the deleted files is no longer reflected, but it is rather overwritten with a set value of hexadecimal 0X00, 0X32.

23:34.020 --> 23:39.520
And this is recorded at the offset hexadecimal 0X10 in the directory entry.

23:39.620 --> 23:41.560
However, the timestamp remains intact.

23:41.560 --> 23:43.340
So the creation date is overwritten.

23:43.340 --> 23:55.840
Now, the last access date in the offset hexadecimal 0X12 is overwritten with the value 0X00, 0X31.

23:56.520 --> 23:59.360
But the timestamp remains intact.

23:59.360 --> 24:01.620
And so it carries on.

24:02.680 --> 24:09.040
It seems that the dates are rather overwritten versus the timestamps that are still in the files.

24:09.040 --> 24:18.560
Now, the creation date and time corresponds to the file name, as the file name is made up of year, year, month, month, date, date, and so forth.

24:18.560 --> 24:33.200
So you can still identify the creation time, but it becomes a little bit harder with the last date access, which could be a very crucial piece of information to see whether something has been tampered with or not.

24:33.360 --> 24:37.640
However, just looking at the file name, you can find the creation date and time again.

24:38.000 --> 24:47.560
I am not entirely sure yet why it overrides the information in directory entries, or whether this is an accidental override, or whether this is intentional.

24:48.340 --> 24:55.140
This could be potentially an undocumented side effect of the methods that are used to delete data from the SD card.

24:55.960 --> 25:03.140
I am still investigating this and trying to examine different hypotheses as to why this is happening.

25:03.160 --> 25:09.540
The modified date and times are noted and accurate based upon the last time the machine recorded and accessed that file during therapy.

25:09.540 --> 25:20.000
So it's very hard at this point to understand why that has happened, but it is something that I'm currently testing further.

25:20.200 --> 25:26.400
Now, EDF files you can look with Hex Editor, or you can actually use some Python.

25:26.460 --> 25:36.720
Now, the way that I found this was quite accidental because I found EDF files in big, large data analytic studies, specifically about sleep studies.

25:36.720 --> 25:40.540
And I found that they were using Python to actually parse this information.

25:40.540 --> 25:45.760
So I thought, well, surely I can use this to look at the EDF files of my dad.

25:46.420 --> 25:56.420
And one of the libraries that I used was pyedflib, which allowed me to actually read or actually write to files if I wanted to.

25:57.420 --> 26:04.420
And it gave me information about who the patient was, the start date, time of the file, and what signal labels was recorded.

26:04.420 --> 26:07.840
So not quite a lot in terms of what I wanted to have.

26:07.840 --> 26:14.120
So I further researched and I found EDF-RD, which was the one that we used in my course.

26:14.520 --> 26:21.900
And this is something that was designed in 2000, that was specifically to read and write EDF files.

26:21.980 --> 26:25.100
It's a very low-level library and it's very easy to use.

26:25.100 --> 26:27.480
I mean, after all, I used it and so did others.

26:27.480 --> 26:30.880
It's very easy to extract the information.

26:30.880 --> 26:40.940
I could get the patient name, the start date, start time, and number of data records that was recorded, which allowed me to anticipate, you know, what kind of files was on the SD card.

26:41.080 --> 26:43.800
These are some examples just of the code.

26:43.800 --> 26:52.360
As you can see, it's very simple and it allowed me to get quick and dirty information about the EDF files recorded on the ResNet machine.

26:53.020 --> 26:56.720
But I wanted to find out how do I visualize the technical aspect.

26:56.720 --> 27:00.840
I've now looked at the engineering side of things, how the device functions.

27:00.840 --> 27:04.700
I have looked at what's contained in the EDF files.

27:04.700 --> 27:08.560
I've looked at the file system, but I wanted to visualize the sleep data.

27:09.120 --> 27:23.120
Now, in comes OSCQR, which is an open source CPAP program that is used by this, you know, the community that does have CPAP.

27:23.120 --> 27:26.960
And it's quite amazing what you find in the information that they're willing to share.

27:27.800 --> 27:32.700
Now, OSCQR stands for the Open Source CPAP Analysis Reporting.

27:32.760 --> 27:47.660
Now, I had a forensic image, a DD file containing all the information from the SD card, but how this device functions is that you need to plug in the SD card and then it will automatically import the files.

27:48.000 --> 28:06.000
So how I got around this little thing is I actually mounted the forensic image as a removable drive and then import the information into OSCQR to determine whether what I found in the raw data and the digital forensic side of things was actually matching up visually with what was happening.

28:06.660 --> 28:13.000
Now, if you look at this on the left-hand side, we see an AHI index of 0.26.

28:13.000 --> 28:17.560
We see more about the kind of events that were suffered.

28:17.560 --> 28:20.580
We see statistics and we see the machine settings.

28:20.920 --> 28:24.240
Now, on the right-hand side, these are visualized in a graph .

28:24.340 --> 28:29.940
But at this point, you know, it doesn't make quite a lot of sense, but you can actually correlate data.

28:29.940 --> 28:36.380
Now, if we look at where the orange square is, you will see that there was an event that was noted.

28:36.800 --> 28:41.040
The flow rate was increased for the device.

28:41.040 --> 28:48.400
The pressure was constant, but the leak rate was quite high, which could indicate the therapy was applied, as well as the flow limit.

28:48.400 --> 29:00.480
So you can actually correlate across whether the device, whether one, events taken place, whether the machine appropriately responded, and whether the patient received treatment.

29:00.560 --> 29:12.640
Now, you'll also see that if we look at this, there was an obstructive event where my dad struggled to breathe.

29:12.640 --> 29:19.260
And we can see that it's recorded and that he received constant treatment or positive airway.

29:19.260 --> 29:21.840
So you can correlate the information.

29:21.840 --> 29:24.900
Now, we see that there was large leaks here that was happening.

29:24.900 --> 29:27.220
This is not due to machine failure.

29:27.220 --> 29:29.820
This was due to him not having his mask on correctly.

29:29.820 --> 29:34.880
But knowing that this was occurring, we were actually able to get the mask fitted properly.

29:34.880 --> 29:38.000
We have some obstructive events that have taken place.

29:38.160 --> 29:43.560
So this quite tells you when something has happened, whether the machine has responded appropriately.

29:44.220 --> 29:47.320
And you can correlate these things around the device.

29:47.320 --> 29:50.500
So it's a very nice way of visualizing the information.

29:50.500 --> 30:02.420
And as a patient, understanding your treatment and understanding whether or not you are improving and taking, you know, and being clinically supported as you should.

30:02.680 --> 30:07.340
Now, the statistics on the device contains quite a lot of information.

30:07.340 --> 30:12.740
It contains machine information when it was last used, when it was first used.

30:13.060 --> 30:19.740
And this is kind of important information to just understand the overall view of the device.

30:19.900 --> 30:21.840
Now, future work.

30:21.900 --> 30:27.000
My dad has obtained a secondhand CPAP machine for me because he's amazing and awesome.

30:27.000 --> 30:29.220
He doesn't think that I'm completely weird.

30:29.360 --> 30:38.030
I will be taking apart this machine to forensically acquire the machine as well and then correlate the final piece of the puzzle.

30:38.250 --> 30:44.490
My first attempt was just to look at the data from a non-destructive way.

30:44.950 --> 30:51.290
So stay tuned for future talks on looking at the device versus just the information that's recorded.

30:51.530 --> 30:55.830
A special thanks specifically to the Biohack Village, my home away from home.

30:55.830 --> 30:58.150
I am missing you all dearly this year.

30:58.150 --> 31:01.730
Nina, looking at you for all the support you've given me through the years.

31:01.730 --> 31:02.970
You've been amazing.

31:02.970 --> 31:12.570
Jay Radcliffe that actually piqued my interest into CPAP machines by giving me a image a few years ago that has led me down this path to want to look at this more.

31:12.570 --> 31:18.250
And then my dad for not, you know, thinking that I'm completely crazy and weird and supporting the research.

31:18.250 --> 31:19.510
I hope you enjoyed it.

31:19.510 --> 31:29.310
If you have any questions, feel free to reach out to me and I will happily have a conversation with you and point you in the right direction.

31:29.370 --> 31:35.710
If you want to know more about the resources, you can look here and find them.

31:35.710 --> 31:38.790
Thank you again for having me and I hope you enjoyed it.

