Amen. So keep your place again in 1 Kings chapter 13. We're going to continue through the rest of this story. And tonight we're going to look at the perspective of the prophet or the old prophet as the Bible calls him here at the beginning. So we saw this morning how the man of God was able to rebuke and defend the enticement from Jeroboam to disobey God's word. But this old prophet comes and lies to him and gets him to disobey the Lord. But now let's look at what happens after he actually disobeys God and goes with this prophet that lies to him. The Bible says, look at 1 Kings 13 and look at verse number 20, verse number 20. So here they are and they're sitting there and they're eating bread and he's disobeyed God. The man of God is disobeyed God and he's eating and drinking water with the false, not the false prophet, the old prophet. And it came to pass as they sat at the table. The word of the Lord came unto the prophet that brought him back. And he cried unto the man of God that came from Judah saying, Thus saith the Lord, For as much as thou hast disobeyed the mouth of the Lord and hath not kept the commandment which the Lord thy God commanded thee, But came his back and his eaten bread and drunk water in the place of which the Lord did say to thee, Eat no bread and drink no water, thy carcass shall not come unto the sepiculture of thy fathers. Now that had to be an awkward conversation right there because here this old prophet lies to the man of God. Just a picture of the scene here. The guy lies to him to get him to come back to his house so they can fellowship and hang out. And as they're fellowshiping and hanging out, the actual word of the Lord comes to the old prophet and tells him. And then the old prophet actually at that point tells the man of God the truth.  You know, it's like awkward, you know, so I mean this could not be a very happy goodbye between these two.   And he has gone, a lion met him by the way, the man of God and slew him and his carcass was cast in the way.  And behold, the men passed by and saw the carcass cast in the way and the lion standing by the carcass. And they came and told it in the city where the old prophet dwelt. So they go back, the guy, the guy packs him up right away. The old prophet packs up the man of God and sends him on his way. I'm sure it was a kind of a bitter goodbye. I don't know that but you could about imagine. And sends him on his way and then the guy gets killed by a lion. The Lord sends a lion to kill this man, this man of God that disobeyed him. And then everybody hears about it and the old prophet hears about it. And the prophet, they went and they told him, verse 26, and the prophet that brought him back from the way heard thereof, he said, it is the man of God who is disobedient unto the word of the Lord. He was disobedient because this guy lied to him. Therefore the Lord had delivered him unto the lion which had torn him and slain him according to the word of the Lord, which he spake unto him.  And when he went he found his carcass cast in the way and he asked the lion standing by the carcass.   And the old prophet came to the city to mourn and to bury him. And he laid his carcass in his own grave, because remember this was one of the judgments of God coming to the prophet to tell the man of God that you're not going to be laid in the sepiculture of your father. So this prophet, he gives him his own grave. He gives him his own, you know, sepiculture. And then he says, look what he says, and he mourned over him saying, Alas, my brother. Now, Alas is a great word. Alas is a great word that I don't really think that we have like an equivalent of today. But basically Alas means it's like one word for just like, ah, what have I done? Kind of thing. Or just like extreme sorrow for something. Like Alas, I mean Alas, we should implement this in the culture today. Like Alas could replace every swear word that we ever have. So when somebody on the job would just like start swearing because they could just say, Alas. They could say Alas, it's just like a deep sorrow. Hit your hand with a hammer, bam, Alas. You know, that's not really what happens today. But that's what Alas means, it's just this out crying of sorrow that this man has. He's sorry for what he did. He's upset, he's trying to fix it.  Give him my grave. And he's just deeply, he's mourning, he's upset. Look at verse 31. And it came to pass after he buried him that he spake to his son saying, when I am dead, then bury me in the sepiculture where the man of God is buried. Lay my bones beside his bones for the same which he cried by the word of the Lord against the altar in Bethel and against the houses of the high places which are in the cities of Sumeria shall surely come to pass. He reiterates the prophecy from verse 1. Look at verse number 1 of 1 Kings chapter 13. Just go back to verse number 1. This was, remember, the man of God comes in and he gives this prophecy before he even starts preaching against Jeroboam. And he says in verse number 1, he says, And behold, there came a man of God out of Judah by the word of the Lord unto Bethel and Jeroboam stood by the altar to burn incense. This is the golden calf altar. And he cried against the altar and the word of the Lord saying, oh, altar, altar. He's crying against the altar. He's like, he's preaching against this altar itself. Okay? A child shall be born into the house of David. Remember, remember, Judah, it was a promise that Judah would always be a son of David.  So he's saying in the house of David in Judah, like we don't know what generation it's going to be, but at some point down the road one of the kings of Judah, it's really saying it's going to be a king of Judah, Josiah by name, and upon thee shall he offer the priests of the high places that burn incense upon thee, and men's bones shall be burnt upon thee. So this actually came to pass. Turn to 2 Kings chapter 23. This prophecy actually came to pass. So the old prophet repeats this prophecy and says that this is going to happen. So the context of 2 Kings chapter 23 is there is a King Josiah, and King Josiah has found, look, the book of the law and what they had been doing had been forgotten for years. They had forgotten it. Josiah finds the book of the law. They read the book of the law. They realize we're not doing any of this stuff. They're actually having false altars and all these things. So Josiah starts cleaning house. Josiah starts going and just getting things right. He starts burning altars. He pulls the false prophets out of the grave, smashes their bones, starts burning them on the altar. I mean, the guy is going crazy on this. Look at verse 15 of 2 Kings chapter 23. So as he's doing this, he gets to the altar that was at Bethel, it says. Moreover, the altar that was at Bethel and the high place with Jeroboam the son of Nebat, who made Israel to sin, had made both the altar and the high place he break down. This is Josiah. And burned the high place and stamped it to small powder and burned the grove. And as Josiah turned himself, he spied the sepicultures, the graves, that were there in the mount and sent and took the bones out of the sepicultures and burned them upon the altar and polluted it according to the word of the Lord which the man of God proclaimed, who proclaimed these words. Then he said, so he basically, he's fulfilling the man of God's prophecy right here. Then he says, look verse 17, then he said, what title is this that I see? And the men of the city told him, it was the sepiculture of what? The man of God, which came from Judah and proclaimed these things that thou has done against the altar of Bethel. And he said, let him alone, let no man move his bones. So he's smashing bones, burning bones, smashing altars to powder, just going crazy. And he finds this sepiculture and he says, no, don't touch those bones. He says, leave that man alone because he knew who he was. So they let his bones alone, but look who else's. The old prophet wanted to be buried with the man of God. So he let the old prophet's bones alone along with the man of God's bones. So these two men did not get burned and smashed and brought down with Josiah's judgment, both of them. So I mean that's why I believe that the old prophet was just an old retired prophet that was an actual prophet that just lied because he wanted to hang out with the man of God. He just made a grievous sin. He fooled his brother. But the points I'm making today doesn't really matter whether or not he was a false prophet or not. The points both stand the same. But the point I'm trying to make here is that in Josiah's time, some 300 years or whatever it is, I'd have to look back on it, a long time they all knew this story. They all knew what had happened with Jeroboam in the man of God and the old prophet. They all knew about it. So yes, the prophecy of Josiah came true. But this grievous sin that this prophet committed against this man was remembered centuries later. Think about that. I mean that's what he was remembered for. So tonight, the sermon, we talked about influence this morning and no one, whether it looks like a prophet or it looks like it, no one should be able to influence you away from the Bible. No one. But tonight, I want to talk about from the perspective of this old prophet the source of regret. This old prophet had a lot of regret in his life. I want to talk about the source of regret. All of that was just introduction to the title of the sermon tonight as the source of regret. Luke chapter 6 and verse 36. Luke chapter 6 and verse 36. Look, we talk a lot about mercy here. We talk a lot about mercy here. The Bible talks a lot about mercy. Mercy is a great thing. Mercy should be given when the Bible says it should be given. And look at Luke chapter 6 and verse 36. The Bible says be therefore merciful as your father also is merciful. The Bible kind of teaches this concept that the more mercy you give to people is the amount of mercy that God is going to show you. So if you're this person that's just ultra, just unmerciful, just like, you know, no one can... I mean, everyone has to be just perfect. You're just going to come down on them like a ton of bricks. The Bible says you're not going to have much mercy is what the Bible teaches. So the Bible says be merciful. We talk a lot about that here. We talk a lot about forgiveness here. How much should we forgive, you know, our brothers and sisters in Christ? The Bible says in Matthew 18 verse 21, then Peter came to him and said, Lord, how off shall my brother sin against me and I forgive him? Tell seven times.   He's saying like just keep forgiving people is what he's saying. Look, we talk a lot about mercy. We talk a lot about forgiveness. We talk a lot about these things because the Bible talks a lot about these things. But tonight let's talk about the source of regret, the source of regret in the Bible. I'm going to show you where that comes from. We all have regrets in our life. We all have regrets in our life. Where does that come from? I'm going to show you tonight. First of all, the first thing is this, forgiveness. Forgiveness, here's the first part where it comes from. Forgiveness does not mean forgetfulness. Okay, forgiveness does not mean forgiveness. The prophet, this old prophet, he lived with this all of his days. He lived with the idea, the fact that he did this. And it was remembered for centuries. It was remembered for millennia. We're talking about it today. Talk about how you don't want to be immortalized. You know, you're like, oh man, the guy got in the Bible. You don't want to get in the Bible this way. You know, you don't want to get in the Bible this way. He's immortalized. What he did is forever got, I mean, God promises to preserve what this guy did. Think about that. He's immortalized in the Bible. Forgiveness also doesn't mean that consequences aren't real. You can be forgiven, but consequences are still there. And this story is a perfect example of this. Well, look, he was sorry. Alas! Alas! He was like, he was sorrowful. He was crying out sorrowful. And you know what? He did everything that he could to make it right. He did everything that he could. He told him to go. He told him what the word of the Lord came to him. He told him to go. And he gave him a burying place.  He gave him a burying place. He did everything he could do to try to make it right. Go back to 1 Kings chapter 13. I mean, he clearly felt bad. He says, Alas! He laid his carcass in his own grave, verse 30. And they mourned over him, saying, Alas, my brother! He did what he could. He did what he could. He clearly felt bad. But here's the thing. The guy was dead. The guy was dead. God killed the man of God here because he didn't listen to him. God took him home. God took him home. So the first source and the main source that we need to look at for regret in our lives. The reason that we have regret. You're like, I have regret. I can think about regrets that I have right now. If you can't think of a regret that you have, you're not being honest with yourself. The regrets that you have in your life is because consequences are real. Very simple. All the things that we do when we do not obey God, well, look, well, we can receive forgiveness. We can receive forgiveness from our brothers and sisters. We can receive forgiveness from the Lord. We can receive forgiveness, but consequences are still there. Consequences are still there. I mean, think about it just from a personal perspective. Certain decisions. Let me just give you an example of a couple. Look at Matthew chapter 19. Matthew chapter 19. Certain decisions. Certain sins that we could fall into in our lives.  I'm just saying these are just examples of these sins will have consequences. You think about certain decisions or sins that we fall into. One example is divorce. This is one example.  But one of the examples in the Bible about a sin that you can receive forgiveness for it. You can receive forgiveness for anything is divorce. Think about it. Matthew chapter 19. Look at verse number nine. One of the consequences of getting divorced is that you can't get remarried, the Bible says. And I say unto you, whosoever shall put away his wife, accept it be for fornication, and shall marry another, commit adultery.  So not to get into the doctrine of divorce, but the point is if you get divorced, you're to stay single. That's a consequence. That's a consequence in your life. Another one in 1 Timothy chapter three and verse two. You don't have to turn there. It says a bishop must be blameless the husband of one wife. So if you end up getting divorced, you can't be a pastor. That's a consequence. Look, that doesn't mean you can't be forgiven. It just means that you know that plan A for your life is no longer possible. That plan A is now plan B. And then it's possible you just make other mistakes and other sins. And then you're on plan C. Then you're on plan D. Plan E.  So there's lots of sins personally that we could get into that we could commit that have consequences that could last for the rest of our lives on this earth. There's lots of those. Okay, things that you could do. I mean, you know, things that people did things when they were younger, maybe things, you know, and they just, they're just consequences that they're just going to, they're just going to have those consequences. That's a source of regret for people. That's where that feeling, that's where that regret comes from because that consequence is always there to remind you.  You know, that's always there to remind you. How about this one? How about this one? Parenting. Parenting. Look, every parent will have regrets. Every single parent. You're like, even you, the pastor, look, I have regrets as parents. As a parent, you're like, if you haven't done, unless you can stand up as a parent and say, I've done everything exactly perfect, you will have regrets as a parent. But the trick with parenting is to make as few mistakes as possible and make mistakes that are small, hopefully. So the consequences are small, you know, as parents. You don't want to have lasting consequences as a parent. But, you know, you'll see people, you know, you'll see people make mistakes as parents that even if they get them right, there's consequences. You know, there's consequences for the next generation, which means generations. You know, one of the scariest stories in the Bible, turn to 2 Kings chapter 8, talking about consequences. One of the scariest stories of consequences for a parent in the Bible is, you know, look, all you have to do, I mean, the parenting thing is really scary because all you really have to do with your kids is expose them to the wrong people. You don't have to be a bad person. You don't have to be wicked yourself.  Look at 2 Kings chapter 8. 2 Kings chapter 8. This is the story of Josephat. Josephat, if you go and you're going to rank kings of Judah, Josephat's like, I mean, aside from David, Josephat's probably number one or number two.  These are the guys that did right like the whole reign. They served the Lord, they did right. Josephat made one mistake. I mean, I'm not saying he didn't make more mistakes, but he made one clear mistake in the Bible. Look at 2 Kings chapter 8, verse number 16.  Thirty and two years old was he when he began to reign and he reigned eight years in Jerusalem. And he walked in the way of his dad, Josephat. No, he didn't. He walked in the way of the kings of Israel as did the house of Ahab. Why? You remember when Josephat teamed up with Ahab to go to war with Ahab? Ahab convinced Josephat. It's very similar to the old prophet. Ahab comes to Josephat and he says, hey, you know, your enemies are my enemies and my enemies are your enemies. He's like, come yoke up with me and let's go fight this battle against this third party and Josephat does it. Josephat had an alliance with a very wicked person. With Ahab, he was not a wicked person but he had an alliance with one. And look at verse 18. It says, he walked in the ways, so his son walked in the ways of the kings of Israel as did the house of Ahab. For the daughter of Ahab was his wife and he did evil in the sight of the Lord. He married this gal, Athaliah, who was like the most wicked murdering demon of a woman, you know, maybe in the entire Bible. And it destroyed his family for generations. Look, it began with a good king just hanging out with Ahab, a wicked person. Look, a seemingly simple small mistake, but it just had big consequences. It had big consequences. He delivered a life sentence to his son and his son's son. And he delivered, I mean just by just exposing them, just exposing them to the wrong people. This is chapter 49. So the point is, is that sin has consequences and consequences beget regret. Consequences, they bring regret.   It's a horrible thing to even think about. And I'm very like, I'm very in tune to this story. I'm scared of this story and I think about this story because it seems like a small mistake. It seems like a small mistake that had large consequences and I'm sure there was a lot of regret throughout generations in that family. But look, I told you this morning, I told you this morning about the church and how I believe in the church. And this is one of the reasons right here. I believe in the church for this reason. There's such power in a group of like-minded believers like this. There's such power to protect from the things that happen to Jehoshaphat that cause these consequences and subsequent regret. And it's just, it's scary when you think about how easily it can happen. Just your children meeting the wrong people, you know, marrying the wrong people. It's a scary thought. Look at your invitation. You should have an invitation on your chair somewhere. This is one of the greatest powers of the church right here. Look at your invitation. Look at your invitation. You should have one somewhere near you. But look at the back of the invitation. To me, this is one of the reasons that this church is priceless. And I mean priceless. Look at this. About us. The Bible, or not the Bible, this invitation. This is a mission statement is what this is. Okay? It says we are an independent, fundamental, soul-winning, separated. I mean, hopefully we know why we're all those things. King James Bible-believing Baptist church and not ashamed to say so. Our mission is to preach the gospel of Jesus Christ, disciple believers with unfiltered Bible preaching and build strong lifelong relationships. Your lifelong friendships. Look, this is one of the powers of the church right here. Is that in a good Bible-believing church, Bible preaching church, separated church, soul-winning church, you will know who people are. And like if nothing's been proven, we will eventually find out who everybody is in a church like this. And look, that's great protection for your families, for your children. That's great protection. Look, it's difficult to know who people are. It's difficult to know who people are. But this is essential that you know who people are. I mean, one of the biggest motivations for me to follow through on moving to California. You know, there was lots of doubts. There was lots of doubts when I thought, okay, what about this? What about that? What about everything that's been done here? What about the job? What about the farm? What about this? What about all these things I've done here? There was no answer for my children there. There was no answer for my children there. And that was one of the greatest motivations. And the answer for your children is a good church. The answer for your children is knowing people that are in a good church. Knowing other people that are in a good church. Because you know who people are. You know who people are. Now you say, like, everybody wants this. And I, you know, I believe most people would say, yeah, I want this. I would want that. I want to make a Jehoshaphat type decision that would, you know, hurt my family for generations.  That's what we're talking about. Consequences leading to regrets for my children's future. And you say, well, everybody wants it, but why can't some people make it? And the answer is in Genesis chapter 49. The core, look, there's lots of different, maybe micro reasons or side reasons. But here's the core of it right here. Here's the core of it right here. In Genesis chapter 49, you see, you see Jacob giving blessings to his children. And look at verse number four. He talks to Reuben, and he says, he doesn't give a blessing here. Look what he says. He says, unstable as water. He's talking to Reuben, one of his sons. Thou shalt not excel. That's not a blessing. That's not a blessing. You know what he's doing? He's handing out blessings, and here he hands out a curse. This is why not everybody can make it. It's because of instability right here. Instability. Instability is a curse. It's a curse. It's a curse that Reuben had.   Look, and the consequences. That's what we're talking about tonight. The consequences of this curse are grave. Notice how he says, unstable as water. Thou shalt not excel. In what? In anything. If you are unstable, this is why everybody wants it. Everybody wants it. Everybody would say, oh, I want lifelong friendships. Oh, I want to be in a church. Oh, I want this. I want my children to meet people in a church, but they're unstable as water, and they will not make it, and the consequences are grave. It's a curse upon them. It's a curse. It's not just work. It's not that you just, look, and you'll see this curse. It's easy to see. You can't hide it. It's not that they just, it's not just work. I was talking with one of the men of the church today, and we're just kind of talking about this idea, this instability, and how it affects you in your life. It's not just that you can't hold a job. I mean, that's one sign of it. It's not that you just can't hold a job. It's not just a church. It's not just you can't stay in a church. It's not just that, you know, like I said, we're not the first one. We're not the last one. We're just the next one. It's not just that, but it's friendships too. What a curse that is. What a curse that is. Look, think about this for a second. You should have lifelong friendships. The Bible is saying that that is possible. Look, friendships, you should have friendships that last for years. You should have friendships that last for decades.  But if you're not stable, you will not have those things. You will not have those things. And guess what? Here's the really sad part. If you have this curse, guess who else will learn it? Your children. Your children. They will also learn it. And then you'll just get more of the same. You'll just get more of the same. So look, but to have lifelong friendships and to have stability in your life, it takes maturity. Look, if you're going to have two friends, they're going to be friends for like years and years and years and decades, that takes maturity on both sides.  Maybe they go off into some horrible thing and want you to get into some horrible thing and look, that's going to hurt that relationship. Or it should. You shouldn't just like follow them no matter what. It takes maturity on both sides. But that takes stability on both sides. But look, as instability being unstable is a curse, if you pass on stability to your children, that's a great blessing. That's a great blessing. It's one. It's one you want to pass on in your life. Definitely. And look, those consequences that come from all those things, that's where those regrets come from. So back to the story. Back to our idea this evening. Mercy is real. Forgiveness is real. But regret is real as well if you don't follow God's word. You will have regret. You say, why aren't we supposed to look forward? Aren't we supposed to look forward and put our hand of the plow in our lives? Turn to 2nd Corinthians chapter 7. Yes, yes you are. You are not supposed to let yourself be burned to the ground with regret. You're supposed to get right, get that forgiveness, get that mercy and move on with your Christian life. That is true. But look at 2nd Corinthians chapter 7. I believe regret is there. Consequences are real. That's where regret comes from. But it's there to help us in our lives not hinder us. Look at 2nd Corinthians chapter 7 verse number 11. This is a really powerful verse here on what godly sorrow is. How can you really tell if someone's really sorry? That guy was like, Alas, what have I done? Alas, I've killed this man. We look at him, he's sorry. But look at verse number 11 of 2nd Corinthians 7. The Bible says, for behold, this is the same thing. That he sorrowed after a godly sort. Now he gives us details of what that looks like. He says, what carefulness it rod in you? So he's saying, this person he's talking about here is like, they're sorry for something. They're sorry and they're more careful now. But that regret is there to, your regret should make you careful that you don't fall into that again. He says, what regret it rod in you, or what carefulness it rod in you, what clearing of yourselves, what indignation.  You're just like, I can't believe I killed the man of God. I can't believe I lied to that man. And you're just Alas. You know, you're upset. And then look at this one. Yay, what fear. Yay, what fear. I mean, that regret, yes, Luke 9.62 says that we need to put our hand to the plow and move forward in our life. But that regret should be used to make us fearful. That we don't fall back into, you know, something that we should hate those things that we've done that cause us these regrets in our lives. So the consequences should just be a reminder of these things, to keep us fearful and to make us careful in our lives. So that these things that we, look, you have regrets. You all have regrets. I have regrets.  But you look at those sins and you look at those things that I have regrets for. And all you have to do is just say, okay, let me use that regret properly. I don't want to sit down and just have regrets and cry on the ground and let it just stop me in my tracks. No, I'm going to put my hand to the plow. I'm going to keep going in the Christian life. I'm going to keep moving forward, but I'm going to have that regret wrought carefulness and fear in me. So I don't have these things repeat themselves. I mean, the prophet regretted this.  Can you imagine? He regretted what happened here, his whole life.  You know, I mean, the prophet, he probably shouldn't have been there in the first place. That's another thought we probably have. He's living in a wicked place when, you know, the Jeroboams just making anybody a priest and he's living in this wicked place, but it led him to these things, which is another story in itself. But look, hopefully he used this regret to move him in a positive direction and that's what we should do. That's what we should do. We should use regret in our life, which we're reminded of it, right? Any consequences that we have today, some consequences are just going to last forever. Some consequences are worse than others. This is why also, you know, you can't really say that all sin is equal. You can prove that with a proof, because not all consequences are equal. You know, some things are definitely, I mean, even the consequences in the law that God puts forth. You know, some things are under death, some things are not, but consequences, they vary, which means that sin varies and we need to be careful about these things. So we should use this. Use the consequences in your life. Yeah, maybe you're on plan B, plan C, plan D, whatever, it doesn't even matter. At least God provided another plan for you. That's another great beautiful sermon in itself that no matter what you've done or where you are, God's got to plan something for you. You know, whether it's just serving in a church and just, you know, whatever. I mean, there's always another plan, but use those consequences in your life to not just bury you in regret in the ground so you do nothing, but to just, you know, rot fear and carefulness in you. Is what it should do. So look, we saw the man of God. We saw the man of God, we just wrap up this story. Hopefully when you read this story now, hopefully when you read this story, you think about these two sermons and it makes sense to you now. It can be a confusing story when you look at it.  You know, it can be a little bit of a confusing story, but look, you had a guy make a mistake because he wanted something selfishly and the man of God should have known better. The man of God should have known better because, you know, the devil suit came up to him. Jeroboam came up to him in a devil suit and said, I want you to disobey God. He said, no, I can see you in the devil suit. And then it was a very subtle attack. So you need to watch for subtle attacks in our lives, always. They will always come.  And then from the side of the prophet, we need to look, and here's another thing. Use these consequences and these regrets that you have in your life to not want more of them. You know, you shouldn't want more consequences because you'll have more regret in your life. So it's just a great story of these two sides of just making sure we always just keep our eyes focused on the Bible and just keep walking the way God wants us to walk. No matter what, no matter what. No matter anything. I mean, it doesn't matter. It's really, really simple when you think about it. You just kind of have to ask yourself all the time, is this decision going to be better or worse for my spiritual life? I mean, that's a pretty good question to ask yourself all the time. What's going on in your life is this decision going to help me get closer to church, gonna help me get closer to the Lord, closer to service, closer to soul winning, or further away. I mean, when you put it like that, it's pretty clear. And then you can see these subtle attacks coming from a ways out. And once you see that, you'll be able to avoid the consequences and the regret that will follow. Let's bow our heads and have a word of prayer.


Card number 14, Card number 14, Robert Owen, Money Man, Robert Owen, Robert Owen, look at the mafia hat, State Department contractor, Robert Owen, Robert Orm, former legislative aide to Indiana Senator, now Republican vice presidential candidate, Dan Quill, was recruited by NCNSC staffer, Oliver North, CIA hand, John Hall, whom he had first met in Quill's office in 1983, and Contra leader Adolfo Calero, C-card number 13, 12, and 4, for the crucial role of liaison between individuals who were aiding the Contras, once on the Contras FDN payroll, Owen, known as the courier, took up his new job as North bagman, with zeal, acting as North eyes and ears, he reported on the military and financial needs of the Contras and their helpers, and delivered money, travelers checks, maps, encryption devices, and instructions to them. In 1985, with help from Calero and North, Owen's new company, IDEA, which he operated out of his home, was given a $50,000 State Department contract to deliver humanitarian aid to the Contras. Through Owen's influence, some of this State Department money was awarded to Airmatch, a covert Pentagon operation, and some to Ocean Hunter, a Mendelian-Cocaine cartel operation, with ties to the CIA's John Hall, C-cards 10, 11, and 12. Despite the fact that his patriotic zeal had entangled him with international drug traffickers and criminals, Owen expressed deep regard for Oliver North, the man who had recruited him. This was evidenced by his reading to the Iran Contra Committee from a poem written by John Hall, quote, the knowledge that on this troubled earth, there still walks men like Aldi North. In our lifetime, you have given us a legend, end quote. Robert Owen, Robert Owen, bunch of fanatics, a poem about this guy. Let's read these two things together. Let's read these words together. Okay, what do we got? What do we got? While we look at Aldi North's face, the puppy eyes looking gleefully into the sky, right, quote, the knowledge that on this troubled earth, there still walk men like Aldi North. In our lifetime, you have given us a legend, a legend indeed, a legend indeed.


Hi everyone, Joe for JaspysCaseBreaks.com with a mosaic football-sello-pack break. Last one we got to do to unlock that two-box high-end division mixer coming up in the next video. Big thanks to this group for making it happen. Appreciate it. All the football teams are into the first ice roll will be for the break, and the second ice roll will be for the giveaway part. So for the break, three and a four, seven times, four names and teams. One, two, three, four, five, six, and seventh and final time. Three and a four, seven times, four of the teams. One, two, three, four, and seventh and final time. After seven, we got the ATL down to SF. No trade windows, we're just going to print and rip. There's the first half of the list right here. Second half right here. Thanks everyone. And that's a two-box break right there. That'll be in a different video. First, let's do the filler pack. These fillers, if you're new to this, a chance to get in to a more expensive break, to a pricier break for a fraction of the price. That's the idea anyway. Thanks everybody here. Could be some surprises in here as well. Let's see what we got. The Trevor Lawrence rookie card. The Najiaris rookie card. That's not so bad. Najiaris from Michael Locia and the Trevor Lawrence for the Jaguars. That's for Harry. NFL debut. Insert rookie card. All right, bonus pack. Pink camos, JJ Watt, Jerry Rice, and Chaz Sarat. Not bad. Let's see who gets into that quick little two-box mixer. Let's gather everybody's names, Colin through Colin. Everyone in between, new dice, new list. And top four, we'll get into that division break. Top four after five, two and a three. Good luck. One, two, three, four, and five. So from five on down, tears. That's going to be sad times. Close Michael, not quite. Five through 32. Thank you very much for giving this a shot. I appreciate it. But only the top four can be happy. Happy times. Four, Colin is happy. There you go, Michael. We got you in. Michael is happy. Brian is happy. Michael, again, two of the four divisions. Congrats to you. Thanks, everybody. I'll see you in the next video for the break. Jaspeasecasebreaks.com.


This space of imagining the future, this space of saying we don't have to leave our traditional folk tales in the 18th and 19th century but to ask what do African stories look like. Africa has as much stake in the future as everybody has and I truly believe you know we are the continent of the past but we're also the continent of the future.


memory deduplication is widely applied to reduce memory consumption. Today, we are going to see three attack techniques that exploit memory deduplication. We have two incredible security researchers here with us today. That will show us how these attack works. To the left, I have Antonio Barresi, and to my right is Eric Bosman. They will then use the chance to also introduce themselves. Please help me welcome Antonio and Eric. Good morning, everyone. This is memory deduplication, a curse that keeps on giving. Unfortunately, it's just Eric and me, so Ben and Kave couldn't make it. But they say hi, and I just want to say that the credit goes also to them, so we prepared the talk together, and a big part of the content comes from them. So Eric, as he was introduced, he is a PhD student at the FUSEC, Networks and Systems Security Research Group in Amsterdam. So if you want to see what they do, go to the website, fusec.net. I'm Antonio, I'm co-founder of ExorLab Swiss IT Security Company in Zurich. So the work that we're going to present, actually, there were a lot of other people working on that, and here are some acknowledgments. Yeah, so let's start. So the message today is actually quite simple and straightforward. Memory deduplication is much more dangerous that you might possibly think in the beginning. So it comes along like a nice little feature that helps you save memory, but we're going to show you that it's actually dangerous and much more severe. And we're going to do that by showing you three attack techniques that all exploit memory deduplication one or another way. Before we do that, we'll look at memory deduplication so everyone knows what it is. We're going to show you the site channel that gets introduced by it. And then we start with the three attacks. So first, we have Cain. Cain is a cross VM leak attack which basically allows you to leak base addresses or other secrets with higher entropy from other VMs. And we applied it to ASLR because we thought it's an interesting case. And it only relies on memory deduplication. We'll then show you dedup as Makina. This is a attack against a process. And actually it got the Pony Award at this year's black cat for most innovative research. And it relies on memory deduplication and row hammer. And basically it allows you to read and write through JavaScript in edge without any soft vulnerability. And then we're going to present Flip Feng Shui. Flip Feng Shui is a cross VM bit flip attack. So basically imagine you could flip a bit in another VM. And the only requirement is you have to know the content of the page, of any page. So how would you actually compromise that system? So we're going to show you, so first of all, how you can bit flip precisely. And then we're going to show you two techniques to actually compromise the system with that bit flip. After that, we will conclude. So let's start with memory deduplication. So memory deduplication is a method to reduce memory consumption. And it's usually used in a virtualized environment but not exclusively. And it was also enabled. And the emphasis is on was in Windows 8.1 and 10. So the idea is that in virtualized environments, for example, the virtual machine monitor will try to be quite a resource or try to save memory. So basically it will over commit certain resources like memory and memory deduplication is a technique to reclaim certain pages in a clever way. Or easily speaking, run more VMs. So basically it's a nice feature, right? The idea is you can just have more VMs on the same hardware but you'll see that it has certain implications. So let's look at how it works. So basically, this is an example. You see memory pages of two virtual machines and the physical memory of the hardware. So let's say you have the picture of the Mona Lisa or a same process running, so the same code pages or something else, some data. So basically, in a normal scenario, you will have both address spaces filled up with these pages and all consume one physical page. So when memory deduplication is enabled, the memory deduplication implementation will try to identify these duplicates and then it will merge them so that the blue space gets free again. And it will mark these pages with a copy on write semantics which basically means if someone writes to it, it has to do something else. It's not going to work. Now, one implementation is kernel same page merging with KVM. I'm sure most of you know that. So if you have Ubuntu server or Ubuntu system, usually that's I think even now enabled by default. And you can check it. So there is like the run file under the sys file system where you see if there is a one there, it's enabled. And then there are certain parameters that allow you to define how fast the memory deduplication should work. And there are other implementation as well. So the problem with memory deduplication on most implementations is that it doesn't respect the security domain. And so basically, even between two different VMs or if it's done for processes, if you have two different processes, you cannot trust each other. But it still works across these boundaries. And actually that's the dilemma of memory deduplication because in the end you want to save memory and it makes a lot of sense, right? If you have a lot of VMs running the same operating system. So it makes sense to cross these boundaries. But the problem is it introduces a site channel. So let's look at the site channel. So if you have a page that belongs to you, you'll just write to it and that's it, okay? So the problem is if you have memory deduplication, you have copy and write. So now if you write to it, you need to go to the kernel. The page has to be duplicated again. Test out the page tables and then resume the process again and then you basically can write to that page. So you'll see that there are a lot of more steps involved here. And this introduces a one-bit site channel that allows you to see basically if such a page exists in another process or in another VM. It works across VM if it's implemented in the virtual machine monitor across process or as we will see, we will see one instance of that attack even within a process. You have different security boundaries. Think about your JavaScript code, right? So it might be interesting for your JavaScript code in a browser to find out certain things. So let's look at the attacker perspective now. So what does an attacker have to do to exploit that? So basically here, the attacker has his memory. This might be a VM or a process and then there is the victim. So there is a secret page that basically knowing that that page exists might help the attacker in one or another way. So what the attacker has to do is the attacker has to guess a page. So in that case, he really has to guess the content of that page. The attacker has to wait a certain amount of time, write to it, so modify his copy of the page. So this is totally legitimate. You don't need more privileges, right? Measure the time and then see if the right time is above a certain threshold. The attacker can deduce that page existed in the other VM, for example. And if the right time is below a certain threshold, the attacker can deduce that didn't exist there. Okay, so let's look at the first attack, Kain. So Kain is cross VM address based layout in Prospection. I actually regret already the long name every time I have to say it and basically only relies on deduplication. And the idea is to use that to break ASLR. So basically you have a VM that runs next to you, memory data application is enabled, and you will be able to find out what the base address, for example, of NTDLL is in the other VM. So let's recap what you have to do as an attacker. So first you need a secret page that allows you to deduce interesting information. And in our case, it's the ASLR base address of a certain DLL, for example. So the question here is, what page should we use? Then of course, there are certain practical challenges. So how long should you actually wait for, because you'd have no idea how fast the memory data application scheme is. And then in the end, you have to practically detect that it was merged. So you can measure right time, but you'll see that in practice, there is also noise involved. So sometimes right time is higher and it's not because of memory data application. So we looked at the suitable pages to break ASLR, and I mean, certain straightforward criteria are, you have to know as an attacker that the page exists in another VM. It has to be read only ideally in the VM because if it changes too often, then it will not be deduplicated. And it has to be page-aligned, so you really need to know the content mostly of that page. And then if you wanna break ASLR, you need ideally a page that has a base address in there, so basically the green part is totally predictable for an attacker, and the only thing that the attacker doesn't know is the base address. Or another possible page would be a page that actually has different values that were derived from a base address, from the secret that you're interested in. And the other thing you have to know is also the offsets of these secrets within the page. So we were looking for certain pages and we are sure there are much more, but luckily when we were looking at the first page of every executable PE image in memory, you'll already have a hit. So if you look at the PE file format, it looks like on the left for an image on disk. So there is an image base field there which basically gets updated with the runtime base address in memory. And this is exactly what we need. We can predict into all other bytes except for the base address where it has 19 bits of entropy. And there are of course other pages that fulfill that criteria, but we thought, I mean, why should we look further if you already have one? So we use that page in the POC then. So now the problem is you have this page, you can basically ask that memory data application side channel if that exists or not, but the problem is you still have to guess the base address, so you have 19 bits of entropy. So 19 bits of entropy in X64 windows is used for the base address of DLL for example. So as you need one page per, I guess, it's more than 500,000 pages that you will need, right? So if you will do that after each other, basically it will take you a lot of time. But of course we can just brute force it, right? So we can use much more memory, all the memory that the attacker actually has, right? So the attacker has much more memory. You can assume that usually you have maybe, you have a different VM2 for even more gigabytes. So you can just fill out the entire memory that is at our disposal with all the guesses. And in case of 19 bits of entropy and one page per guess, it's two gigabytes, which actually is okay. So what you do is you have these pages and then you allocate them and then you try to detect it. And it's a classical brute force attack on that memory need application side channel. So the other challenge that we had, the practical one is how long should we wait? Of course we could just wait like hours, right? And at some point it would work. But it depends, so we want it to be a bit better. So in the end it depends on the memory need application implementation. So how fast is it? So you've seen the parameters for KSM. So depending on the parameters, it might be faster or slower. But it also depends on the memory usage. So if you have a lot of VMs running, in the end you'll have to compare all the pages to each other. So you have to go through all the pages. And if you assume the worst case, then your guess page will be compared with the secret page at the latest point in time. So there is a trade-off for the attacker. So if the attacker waits too little, then the attack will just not work. But if the attacker waits too long, then the attack time increases. And that's also not favorable for the attacker. So what we came up with is a detection mechanism to detect this memory need application. Basically, the time you'll have to wait till you have certain guarantees that your page was compared with another one. We call it sleep time detection. And the idea is, as an attacker, you can just allocate a lot of random bytes and a lot of pages. And then you copy every second page of the half of your buffer to the other half of the buffer. So what you create is basically the situation like on the slide where you have a lot of merging opportunities. So you basically give the memory need application scheme a lot of work. You create a lot of pages that can be deduplicated. And then you wait a certain amount of time, like 10 minutes. Try to detect how many of these pages were merged by doing your detection magic. And then if the detection is above a certain threshold, you say that's the right time. So you use it in your attacks. And if not, you just increase T and then you try again. So the last practical challenge is how do you actually detect that the page was merged? And what you have to do is, I mean, you have to write to it and you have to measure the right time, right? So what we did is we, every time we have a guest page, so that's the orange one, the merged one, we have pages, adjacent pages that are for sure not merged. And we know that because we can just fill it up with random bytes, okay? So you create the buffer in such a way. And then you just write to it and you measure the cycles. And then you basically see this signal. Now, of course, there might be noise. So we developed certain heuristics. We didn't invest that much time to do that, but the ones you see there work pretty well. And that was fine for us. Works for me. So now the last question is how to handle noise, right? So we just implemented it in a quite conservative way because there is actually no harm if you have certain pages or certain false positives. So what we did is we implemented a round space system where you try to detect it, then you do it again with the guesses that might be potentially correct. And you do it over and over again. And in the end, as the noise will not affect the same guess all the time, it will work. But it might take certain rounds. So I'll show you some results for Windows attack. So we implemented it to attack, to basically leak the NTDLL base address of a neighboring Windows 64-bit system. So if you look at the entropy, you see basically for data, it's quite high. So that approach wouldn't work that easily. At least not if you have no control over how the secret is aligned. So basically for DLS, we have 19 bits of entropy. And if you have the base address of one NTDLL, you basically can use it in your exploits for all the other processes because it's usually not re-randomized. So we did it with a standard KVM KSM configuration with Sleeps Millisex 200, that's default. And basically you see when we attack one single VM, it took us a bit less than five hours to basically do that. And we had like some rounds till we reduced entropy from 19 bits to the actual base address. We also wanted to show that it works with multiple VMs. So we speeded up the memory need application by having Sleeps Millisex 20. And there you see, even if you have more victim VMs, it works, it just takes more time because the sleep time detection will tell you to wait more because you have more memory that is used. So in the end, how it looks like, so we have a video demo, but we don't have that much time. So I'll just show you the screenshot. We have a demo for another attack later.  And in the end, you just have the base address of the NTDLL in the other VM, that's it. So the attack is rather slow, I would say, but there were a lot of speed improvements that we didn't actually follow up with. But one way would be to have more random pages in between so that the noise will not affect your guests or the probability is lower, that happens. And the other thing is you can also use more than one guest page, right? So have redundancy already, because you might have, for example, relocated code pages that all have that secret. So you can just use many of them, right? The only thing is you cannot use the same page because if you have it two times with the same guest, then you create this merging opportunity and you have a false positive. So you need different pages that all have the same uncertainty or the same secret. Now, Cain is, I would say, a cool attack, but the problem is it's still quite limited. So one problem is we don't have any control over the victim memory, right? So we really have to rely on how these pages are, what the layout of these pages are and also where the secret actually is. And we need to find these pages. So there is no control, but some control would actually help a lot. So we didn't really investigate at how we can do that cross VM. And then, of course, it's a leak, right? So you still need a vulnerability to exploit the base address, for example, the secret that you got, if that's not enough. But last year, I mean, there was a lot of, there were a lot of talks and a lot of publications about Rowhammer, even here at the Congress, Clementine and Daniel presented Rowhammer.js. So basically they showed that it's possible in JavaScript. So let's say we were optimistic that we could do more. And then Microsoft basically enabled memory deduplication or we noticed for Windows 8.1 and 10, cross process, but it's disabled again. So it's not enabled anymore. But let's say it would have been cool, but it didn't go that well. So for the next attack, we call data-based Makina. We tried to take it a step further. So in this attack, we're going to combine deduplication as a side channel attack with Rowhammer in order to exploit Microsoft Edge, Microsoft's new browser from JavaScript without making use of any software bugs. Or well, if you consider, if you don't consider deduplication a software bug. So we're going to leak two secrets and we're going to use deduplication to do this. The first secret is a heap pointer. It's a location to data we control. And the second secret is a code pointer.   But we have a problem, JavaScript of course doesn't allow us to create references to this fake object, it's just in data. So we will use Rowhammer to flip a bit in a pointer and point this pointer to our fake object. And then we are basically, we can take over the process. So in contrast to Cain, in this attack, we won't only be probing for existing pages in memory, we will assume that we can manipulate the data of the victim in some way. And this is not really unlikely. If you think about it, every time you do IO to something you want to attack, then you're manipulating memory in this process. And in this case it's from JavaScript, so it's even more easy. And this allows us to not only probe for secrets that just happen to be in pages that we can leak, but we can craft memory pages that just contain the secrets that we want to leak. So it's quite a bit more powerful. But still there are some problems with this. The secret that we want to leak might not be somewhere. The secret we want to leak is probably somewhere in a page which contains other information that we don't know and then we cannot craft a page to leak the secret. So we need to find a way to kind of encode the secrets into a memory page. So I said that we can retrieve the secret again. So the secret, the memory page that we want to leak should contain only the secret and data known to us. So this could be that because this data was written by us into the outer space of the victim or it's just data that we know, data that we know the contents of in some way. And there's a second problem. We might want to leak a secret which has too much entropy, so much entropy that we cannot possibly brute force the whole, all the possible secrets. And for this, we have found some ways to get around this and leak secrets iteratively. The first method we tried was we call alignment probing. In this case, we manipulate the victim into creating a memory page or putting the secret somewhere across memory page boundaries. In this way, we can only put it into the memory page we can partially leak the secret in one round and then we have to get the victim to create a memory page with a slightly more of the secret in one page and so on and so on and we leak the whole secret. The second primitive we tried was we call partial reuse where we assume that the victim has a secret somewhere and then we write data, for example, in a buffer that was previously used to store the secret and then we write data in this buffer and overwrite only part of the secret and then again the entropy, again such that the entropy is low enough to leak it. And the first of these two primitive alignment probing is what we're going to use to leak the code address in this case and we're going to make use of Microsoft Edge's JIT compiler. So every modern browser has a JIT compiler compiling JavaScript to native code and for every chunk that's translated in Microsoft Edge the function epilogue, so the last part of the translated code is always looks the same except for one thing, namely a code address. And what we did was create lots of JavaScript functions which are just too big to fit into one memory page such that the code address spans multiple pages and then well normally the code address is 19 bits so it would need two gigabytes of memory. In this case we need only 16, I believe. And yeah, so in this way, in one sweep we can leak part of the address and in the second sweep we can leak the complete value. So now we have a code pointer but we still need to leak a heap pointer and there's a problem with this. We didn't find a situation where we could leak the heap pointer directly using the two primitives before and the heap pointer has quite a lot of entropy. So this is an example of a heap pointer in Microsoft Edge. There is some advertised randomness on Windows 10, 24 bits of randomness and if we only look at that part we'd need 64 gigabytes of memory just to try every possibility and then we need to multiply this by a bit to get redundancy because there's noise. But if we look at how a pointer actually looks like there's also some kind of lots of non-determinism which actually increases the entropy of the pointer quite a bit and yeah, we don't have hundreds of terabytes of memory to probe. So we needed to find something else. We could improve this a bit. We found another side channel so if you allocate lots of arrays then every one megabyte the browser will ask the operating system for an extra megabyte of memory and then the first object that fits into the new allocated one megabyte it will take longer to allocate and that's something you can detect. So then we have a timing side channel and then we can reduce entropy to 20 bits but we'd only already need at least four gigabytes of memory so that's also not nearly good enough. So we had to find something else. Well, luckily we found something else. Something very much like, the intuition is very much like that of the birthday problem which in a surprisingly small group of people the chances of two people sharing the same birthday is actually becomes pretty high more than you would naively think faster than you would think naively and the intuition behind this is that you're not comparing one person's birthday with a group of other people. With other people you're actually comparing everybody's birthday with everybody else's birthday and when you think about it this is exactly what memory duplication routine does as well. It compares every page with every other page. So how can we exploit this in practice? Well, we're going to assume that we don't have one secret to leak but lots of secrets and then we have lots of guesses and then there's a, yeah, you compare every guess with every secret and then you get, yeah, you need way less memory. So in practice the victim has secrets and then you kind of need this you don't need as many different guesses to actually get the match. So how do we exploit this in practice? Well, we allocate lots of objects and then we get, due to the other side channel we get a list of objects which are probably on a megabyte boundary and then we allocate the large array which of course is in practice just memory pages and then we put a reference to or a pointer to each object in this array. So, and then there's one pointer per memory page. So these memory pages kind of encode the addresses of the objects and those pages we're going to probe for and then on the other end we're using a typed array which allows us to completely control the binary contents of memory and then we're going to create references to objects which are 128 megabytes apart and then recreate the contents of the pages the contents of the, how they would look like if they were in the array. So you can see the secret pages are close together and one megabyte apart and then the pro pages range across the entire address, the possible address space that Edge might possibly use and then in the middle there's a hit and then we get our heap address belonging to an object where we control the data. So now we have the all the information to create a fake object. Now we're going to use Rohammer to create a reference to this object to allow us to use it. So the object is a typed array, the fake object that we make which allows us to basically control, yeah read and write the entire address space. So this typed array object, this fake object we recreate in a JavaScript array that we know the address of and then the next JavaScript array as a pointer to it and then we recreate it in such a way that if we flip a bit, the pointer will point to our object instead of the array and for this we're going to use the Rohammer attack. Yes, like Antonio said last year, some of you might have seen the Rohammer.js talk. We were able to reproduce their findings and on Windows 10 and use it for a tech. In the Rohammer attack, the problem is that DDR memory uses capacitors to store data and when you read it, the capacitors are drained. So yeah, these capacitors are stored in rows and then because they are drained, there has to be some kind of cache which doesn't lose its value. Which is static RAM buffer but it's only a limited amount of memory. So when the memory controller needs to read a different row, the data has to be written back to these capacitors and a different row is read to the buffer cache. The problem is that this creates some interference and if you did this in quick succession at specific locations, then and then after a while, some bits may flip in neighboring rows and that's what we use to flip a bit in a pointer allowing us to get a reference to this object and basically taking control of over the process. So that's the second attack. In the third attack, what you call flip function, we actually are also using Rohammer in combination with deduplication but in a different way, we won't be using deduplication as a software side channel anymore but we will be using it to make Rohammer a more useful expectation primitive. And our target will be one, yes, so in our attack, an attacker will be in control of one virtual machine and we'll take over another virtual machine on the same system. So like I said, Rohammer is a very powerful attack but it's also quite difficult to exploit because you can corrupt bits but it's not really, you don't really control which physical bits in memory are vulnerable to it. And if you can flip bits, you have to, the data that's being corrupted has to be useful to you. So you kind of have a problem of getting the right data into the right location for you to exploit. So it's unpredictable in which physical page the flip will happen and it's unpredictable in which location in this page it might happen. A flip function can solve the first part for you so given that you can flip a bit in some location in the page, a flip function will give you the ability to get an arbitrary page you know the victim has and put it in the location where you can flip the bit. Another thing to mention is that with Rohammer, if you discover you can flip a bit somewhere, it's very likely you can flip it again and again and again and again. Yeah, so we're going to look for pages that we want to, in the victim, that we want to flip and then make sure that these pages are put into a location where we can flip these bits. So we thought memory depletion is a kind of an attractive way of doing this we thought and we're working on the Windows 10 attack and we thought well what if we, yeah so if we do Rohammer find a bit flip, what if we find a page where we want to flip a bit, we just replicate the same content of this page and then wait for Windows to merge them and then hope our page would be the location it would merge to but sadly enough on Windows, Windows allocates a new page and points the old locations to the new location. However, we found that on Linux with kernel page merging, it didn't so and it had some other things that are advantageous to us. For example, Linux tries to give consecutive physical memory to virtual machine hosts for efficiency sake, so which makes it easier for us to do Rohammer and find bit flips and also makes it easier for us to make sure that these bit flips are not too much make sure that these bit flips occur in our own memory and not in someone else's memory which yeah we wouldn't want to corrupt a system before we can exploit it of course, crash the system before we can exploit it. So once we know we can flip a bit that's useful to us, we replicate the content and then wait for KSM to merge memory and we can know in a deterministic way whether KSM will merge it to our page and then we do Rohammer again and then we can exploit the target victim. So one example how we did this was by attacking the authorized keys file. Authorized keys files usually contain public keys and these public keys are not supposed to, yeah, they don't have to be kept secret. I bet lots of you have probably uploaded their public key to GitHub and their public, so. And what we see here is in yellow we see the, so this is an RSA public key and in yellow we see the RSA modulus base 64 encoded. Of course we're not supposed to factorize this modulus because then we can get the private key but in red here we have characters which contain at least one bit that when flipped will remain base 64 encoded but we're able to factorize the modulus within one minute. So that's what we did. Flip a bit in the modulus, factorize it and then reconstruct the private key and log in. We have a second example where we target GPG and up get to exploit the updates mechanism in WN or Ubuntu. So this is a two-stage attack where we first correct the sources.list file to redirect the updates repository to a domain name we control and we also corrupt a bit in the GPG key ring to corrupt the sign in key to a key that we can reconstruct and then we can backdoor and then we can backdoor packages being installed. So we have a demo for this as well. First, so this attack. So what you see here is a machine running both an attacker virtual machine and a victim virtual machine in the top right corner. There's the victim, well, in a minute. So top left there are some debug information. The bottom part is the access log of a HTTP update repository server that we control and the middle part is used to create a fake package. So now nothing happened yet and up get update is run. So this is all fine, but now we're going to flip a bit in the sources.list file and then when we do get update again, there will be an error because now it will connect to our repository. Of course, this step doesn't have to be done, but it's just to show that it now connects to the first to our repository. Well, then we have to wait for a while to find a bit that we can exploit to corrupt the GPG key and when we have done this, we can reconstruct the private key and create a new package with the new signing key, creating a new package. And then when the update upgrade is run, first we do a less still okay, but then after the update, our code is run. So in conclusion, I think, yeah, I hope that we hope to have convinced you that memory duplication can be dangerous. If you're thinking about deploying it, we'd like you to think again and think again and think again and then maybe conclude. Well, maybe let's just disable it. Thank you very much. So we have time for questions. If you do have questions, please come forward to one of those four microphones. Does the internet have a question? None. No question right now, okay. We have a question on the microphone on my left side in the front, please. Please speak loudly into the microphones so we can hear you while people are leaving. I would like to ask, how does this apply for large pages? So I think in all your examples, you had small pages for eight kilobytes, so how does this apply to two megabyte pages, for example? Yeah, so kernel same-page merging employs large pages, but actually, sadly, it was good for us, but sadly, the kernel same-page merging prioritizes merging over huge pages. So actually, we create huge pages at the start and to do the row hammer part. That's the consecutive memory thing, but when kernel same-page merging finds a page which is identical inside this huge page, it will break up the huge page and merge anyway. So that's actually the worst case scenario. Okay, I see, thank you. Great, thank you. Then the next question would be right behind you. Yeah, thank you. Yes, about the process of deduplication itself, does it use hashes or other things to actually speed up the comparing or some hardware acceleration maybe even, or what's just the cache and the timing before impacts of that process running on the background? Yes, so we didn't do research on latency, but I think it does use some form of hashing both on Linux and Windows. Yes, and the next question, please, and well, before you ask the question, could you please ask the audience to remain quiet at this point? Thank you. So these attacks, they require that I, if I'm the attacker, own or at least have interactive access to a virtual machine hosted on the same host as the target machines, right? Yes. Okay, so what are the implications for a, say, VM or whatever environment, thinking of desktop virtualization, where actually the virtual guests are being used for interactive access, and so you run a JavaScript and a browser or whatever, because I'm, like, every week being approached by companies trying to sell us desktop virtualization. So the idea of running that gives a complete new, large open door for Melva's spreading across virtual client computers, right? If there is desktop virtualization. So our second attack, they did, as Makina was done on Windows 10, so there we could leak information because Windows 10 does marry the duplication, not only for virtual machines, but also for its own processes. And Windows has disabled it, but if you run Windows on a hypervisor where the duplication is yet again enabled, then yeah, you have the same problem again. Thank you, and then I have a question here on the right, please. Do you also have the problem if you, are you vulnerable if you have both ECC memory and exempt any cryptographic secrets from de-duplication? So I haven't seen a practical attack with ECC memory on Rohemmer, I don't know. And I guess if you have cryptographic secrets and you don't de-duplicate it or you put some randomness in there that is impossible to guess, then I'd say there's not much you can leak from that point on, but it's something, I think it's not, yeah, you shouldn't burden an application developer to be aware that their memory, even to be, even be aware of the content layout of their program that's for most of the time very much low level stuff that yeah, application developers have no, shouldn't have to have any concept about. So I think this is really up to the operating system and hyper files offenders to, yeah, not yous, basically. Thank you, and in the back please. So when you merge the pages, you can have more of, you can have two in those examples, you can have more of them. How do you know which page will be the one that will be the last one? So, I can merge into it because it would be good that it's the one you control, so we can flip the bits and how do you know if you have like five VMs and every one, every has the same page? So it's kind of complicated, so the, so in KSM it's the oldest VM that gets merged to, but there's an exception if you first merge two pages and they are put in the first, so it first merges to already merged pages and then it merges to the oldest VM.  And so to flip things, you need to be the first one, so then they will merge into you. Well, not necessarily, but the attack becomes a bit harder because so what you could do is if, so the merging happens because files are in the page cache, so if the files are not yet in the page cache in the victim because no one has tried to log in for a user for a long time, you might be able to first create two pages in your own address space, wait for it to be de-duplicated, then log in to SSH and then SSH will load it in the page cache and then it gets merged to your page. And you win because you're merged already ends. Okay, thanks. Thank you and a question here in the front, please. Yeah, so if I understand it correctly, the attack works only if you know, if you detect the time difference between when a copy on write happens and when it does not, wouldn't it be able to have implementations of de-duplication with some artificial timing added? So there's no real difference. So, well, the copy on write takes time. So there's, yeah, that's probably not, no, yeah. So there's always going to be a time difference because you don't want to have artificially, you don't want to artificially slow every write operation, that's just. Would it be theoretically be possible to do it if timing is not a constraint? Then you have to, all the write operations, you have to slow them down as well, right? I mean, this is not feasible in the end, so. Thank you. There is a question from the internet. Yes, the question is, can this be applied for long PGP keys? Can we leak them? So leaking the complete contents or breaking them or? Doesn't say so in the question. No. I suppose it's about leaking them from memory. If you can find a way to, for example, first load them. So it really depends. So it takes some effort to find the situation. So you have lots of opportunity to find situations where you can leak data, but it's really difficult. It just takes time to find the right circumstances because it's just so much you can explore. So we didn't look for a situation where we could leak GPG keys, so I wouldn't say it's impossible. I do think that some crypto applications really make, try to not keep private keys in memory longer than needed. So I wouldn't know. I wouldn't know. Maybe you can try and find out. All right, thank you. Great. And then we have a last question over here, please. Maybe do you have some advice for the Linux kernel programmers? I think in the second example you said, for example, the page de-application used, I think it was Windows 10 was better. They did first copy the page to be de-applicated in a free page and then pointed the two pages to be de-applicated there. And in Ubuntu, it was that they just point one page to the other and drop the page. So the Microsoft approach is here more safe. Yeah, I'd say so. I don't know if they were aware of this, but in this case, well, maybe they were. I don't know. In this case, and there's certainly some approaches or make it harder, and some approaches make it easier. Of course, the relocation doesn't prevent us from leaking data, but it would help maybe with making Rohammer harder, although our group also has a paper on Rohammer on Android where we don't make use of memory de-application, but we make use of a different mechanism in order to control where memory pages get relocated. Yeah, from Rohammer, we can't do anything because we would have to change the memory architecture. But maybe you can publish some advices. What to do better with, for example, memory de-application, what you found for in your researchers just as an idea? Yeah, so there are some mitigations. We don't know if, yeah, but they always have some performance penalty drawbacks. And so I don't know whether they will be implemented or are standards enabled. OK, thank you. I'm sorry we have to cut it. Thank you so much. So please help me thank Antonio and Eric for a wonderful demonstration.