We have no time to waste and a lot of ground to cover. This is Journey to the Center of the PSTN. I'm Enzo D'Amato and first a little bit about me. So I got into computing when I was very young, got a bunch of servers, turned them into this, then got one of these, one of these, and put my servers in a professional data center. After doing that, I started looking for the next big challenge. I mean, after getting an ASN, you got to find something new to do. And for me, the answer was telephones. I wanted to figure out how the phone network worked, how I could become a part of it, and some interesting and unique exploits that you could do from the inside of the phone network. And this talk will take you through all of that. How you can become your own mob L. This talk, however, is not legal advice. It is not a comprehensive course on voice network design. It is not a guide to the regulations in your state. We're going to be covering licensing later on. And just remember to always check everything with what the actual rules are for your state, not just the generic nationwide rules. And this is also not going to be PBX hacking. A lot of people have done that, and that's sort of overplayed. We're going to be doing everything from the carrier side. So with that in mind, what is the publicly switched telephone network? The PSTN is essentially any phone that allows you to call another phone using a standard U.S. phone number. Some people define the PSTN as only phones that are connected over the traditional TDM network rather than phones that are connected over VoIP. However, in my opinion, there's no difference as long as the number is accessible from a standard telephone. So we're just going to say the PSTN is everything. And with that in mind, what is a phone company? In this case, a phone company, and when I say I started a phone company and I run a phone company, I mean a real phone company that owns its own numbering resources in the same way an ISP that has its own ASN owns its own IPV4 resources. You're not just reselling, you're not just buying from a generic sub-trunk provider and slapping a PBX on top of it. You're actually the carrier of record. You're managing the routing for those entities. A real phone company also files its own FCC 499, so it files federal taxes for phone companies, and it's interconnected with other carriers. Again, manages its own routing. It doesn't just send everything through whatever its upstream is. And why should you care about this? Well, the answer is that we, you know, in the hacker community, used to love phones. This was how the community started. Defcon groups are still labeled by area code and freaking was everything. But then everyone sort of lost interest right as the network started to get interesting. Because in 1996, you, for the first time, were allowed to become a competitor to Ma Bell for local exchange service, which means you could become a legit freak. You didn't have to do it in secret anymore. And with that, the amount of stuff on the network and therefore the interesting bits of the network got way larger and way more interesting. So we're going to be looking at all of those new interesting bits of the network. Unfortunately, we do have to cover first a bit of history and a bit of terminology for those who are new to freaking and new to phones. In the beginning, there was AT&T. AT&T was an amalgam of one major long distance company and then a local Bell operating company in each region. The long distance company did long distance and the local companies provided dial tone and local calls. However, this would break apart in 1984, which created nine separate RBOCs or regional Bell operating companies in each region of the United States and one IXC or inter exchange carrier that was the AT&T long distance entity that was subject to competition for the first time. MCI, Sprint, the other long distance carriers, if you remember dial around codes. And this is sort of a graph of how things broke apart and then merged back together. As you can see, there are three major phone companies, all of which own their own long distance branch and all of which also own a significant chunk of the U.S. geography for phones. The only difference now is that Quest is now level three, but these companies are the RBOC successors, what happened after the RBOC got broken up. And an interesting note here is looking at what an actual local call is. Because when we say we have local exchange carriers and inter exchange carriers, what is what? And this up on the screen here is a map of all of the LATAs or local access and transport areas in the United States. Each LATA is the specific territory of one of the RBOCs and any calls within the LATA are handled by that RBOC. Any calls external to the LATA are handled by an IXC. And within a specific LATA, we also have a number of numbering plan areas or area codes and rate centers. With calls within a rate center are always truly local. So always truly local meaning that they are not billed per minute. They are either billed not at all or per call. And usually there will be an arbitrary boundary between that rate center and a couple of the other adjoining rate centers that will be included in that local calling scope. This is defined in the state tariff for the RBOC and it is highly arbitrary. Unlike the LATAs, there is no federal standard for how big a rate center is supposed to be, what it includes and sort of what the rules are for those. So you are going to have to check for your specific rate center to see what counts as local for it. And therefore, we can sort of put together a taxonomy. We've got local calls that are always handled by the local exchange carrier and therefore governed by the state public utilities commission as a local utility. And they are usually unmetered. And then we've got true long distance calls, which are governed by the FCC under the Braille system break up and handled by an IXC. However, then you've got a bunch of weird niche categories. So intra LATA and intrastate calls are what are known as local long distance or long distance calls handled by the local exchange carrier or the baby bell. And then you also have inter LATA and intrastate calls, which are counterintuitively more expensive than interstate long distance calls because they are governed by the state public utilities commission and therefore, since the state public utilities commission is a less strong regulator, those calls are more expensive because they can get away with charging more. And finally, you have a very weird category that usually only exists in the large flat plain states of interstate intra LATA, interstate inter LATA calls that are governed by the FCC, I think, and handled by the local exchange carrier. These basically only exist on paper, but this just goes to show you the weirdness and the state of the number of exceptions and oddities that exist in the phone network. You know, when you have a bunch of categories that are created by successive regulations being layered on top of each other, you get these sort of weird categories. And this only is going to expand and create a bunch of interesting opportunities for us later. However, the real big change wouldn't come with the bell break up, but rather with the telecom act of 1996. This enabled competition for the local exchange carriers, these new entities known as CLECs, or any local exchange carriers certified after 1996. It normalized wireless regulation and created the modern cell phone industry by allowing cell carriers to be treated as co-equal carriers to the LECs instead of just as basically almost as resellers that subtended off of them. And it also critically required the incumbent LECs, meaning the R box, to interconnect their networks at any technically feasible point, offer services for resale, and to do all of this on nondiscriminatory terms expressed in a publicly filed interconnection agreement. These responsibilities are known collectively as 251, 252 interconnection. Together with the provision allowing for CLECs, that has been what has allowed the telephone network to really transform itself over the past couple of years. It's how we got VoIP, it's how we got new carriers, and it's how I was able to become a phone company at the age of 19. Later on, we would see a new category of sort of a half CLEC certification created for VoIP only carriers. This, known as an IPES, allowed those VoIP carriers to get numbering resources issued directly to them, but still required them to go through an IPES entity, sorry, go through a CLEC entity as their sort of parent company. The ILEC entity would manage the routing on their behalf. So sort of a half CLEC that doesn't have interconnection. So now let's get into how the PSTN actually works and how those calls are going to flow through the network. So here we can see an example of a modern LATA ecosystem as it exists currently. Each different company is represented by a different colored box. And as you can see, a call from an ILEC to a CLEC is going to go through, obviously, the ILEC's network, but it's also going to go through a very special box that exists in every LATA, the ILEC's feature group D tandem. The feature group D tandem acts almost like the default route for everything within that LATA. If two carriers don't have a connection to each other, they're supposed to always have an interconnection with that ILEC's feature group D tandem as part of their interconnection agreement with that ILEC, which means that those calls can flow through that feature group D tandem to sort of reach where they need to go. Either on the ILEC or on another carrier that subtends that ILEC. They can use that sort of as an almost like a tandem that they can both reach. If a call is long distance, however, it's going to get piped out over the long distance network and then all the way back into the feature group D tandem in the new LATA. As an example, this is an ILEC to ILEC call. Critically, the ILECs, because of the regulations, are not allowed to carry their own long distance traffic between LATAs. They have to send that traffic over an IXC. However, CLECs are not subject to the same restriction. So in this example, two CLECs in different LATAs are able to send traffic directly to each other. In this case, over an IP trunk that they have. So CLECs can actually use IP trunks. They can use VOIP to send calls between each other. So the internal routings on CLEC to CLEC or CLEC to mobile calls can actually be IP in some cases. Finally, you also have an example of a CLEC that connects directly to the inter-exchange carriers, receiving calls from them directly instead of sending them over the feature group D tandem. In this case, the CLEC basically acts as its own feature group D or acts as tandem for the numbers that it has. Hanging off of an IXC is one directly. This allows us to put together some general rules for routing with the caveat that voice routing is very ad hoc. It's not particularly well defined like BGP routing is where like a BGP router will always be able to use BGP to pick the best route to a given point. An ILEC will not be able to do this because an ILEC routing will not be able to see the entire picture of the network at one time. It won't be able to calculate a best path. So it has to go through basically a series of rules defined by the regulations and the information that it does have. These rules generally are as follows. If two carriers have a private IP interconnection between each other, that will be used by default. It's much cheaper and everyone prefers to keep things on IP as much as possible. If the call is local, however, it will be sent over the local interconnection. Local calls have to go over the local interconnection. If you send them over a long distance, they won't route properly. However, if a call is intra ladder, it can either go over the future group D tandem for that ladder or it can go through an IXC who they can then be responsible for basically delivering it back onto the future group D tandem through their internal network. However, if a call is inter ladder, it has to go over an IXC. It can't get sent through the future group D tandem unless that future group D tandem is basically being used just as a bridge to reach an IXC. We can now look at phone numbers. Everyone's familiar with the basic parts of a phone number, but there's a bit more to it. So obviously an area code, one or multiple will be assigned to a single numbering plan area. And when there are multiple assigned, that's called an overlay complex. However, we also have the next three digits, the CO code, are the most important for actually routing the call within the numbering plan area to the carrier that it's going to. So this was the original basic unit of phone number routing from the original days of direct dialing. And these were originally assigned to a single end office, like a single building back when it was the Bell system. After the break up, these started just being assigned to a single entity. So it's like a single, you know, licensed local exchange carrier. However, this, even this was too inefficient. They were noticing that especially in metropolitan, that especially with the rise of smaller CLECs, you'd have CLECs that were getting a CO code in every rate center and only using about a thousand of those numbers, meaning that all of those blocks, potentially hundreds of thousands if not millions of phone numbers, would only be ten percent utilized or less. This was extremely inefficient and therefore they created the number block pooling system. Instead of assigning people CO codes directly, instead a CO code would be broken up into its constituent thousands blocks and these would be assigned to carriers and we would route on these thousands blocks instead of routing on the full CO code. This made, allowed us to make much more efficient uses of our routing, but it wasn't adopted everywhere. It was required in major urban and metropolitan areas by the FCC, however in more rural areas it's optional and again you'll have to check with your state public utilities commission to see what rate centers in your area are pooled. Most of you will know that if you change carriers, you'll be able to take your number with you. However, you may not know how this is implemented. The routing that I just displayed is fairly static, you know, it's based on block, so if you move your number, how is that number going to be able to move with you? The answer to this is number portability, uh, or porting. The porting allows you to take the number with you by adding a routing overlay, a query layer on top of that existing base, you know, routing structure. And the way this works is that each number gets an LRN in addition to its, you know, normal appearance. And when that number is called, we hit a database for that outgoing call and we get back the LRN. We are guaranteed to know that the LRN will be a phone number, um, will be a phone number in a CO code owned by the destination carrier. So the destination carrier's CO code will point to that switch and then we can route to that CO code and we know that routing to the LRN's CO code rather than the original dialed number will get that call to the switch where it actually lives rather than the one, the carrier that initially owned that number. And then we can put all this together and actually figure out how routes are built. So an AOCN loads routes into BIRDS. BIRDS then feeds a database called the LURG. The LURG is a pile of CSV files, like several gigabytes worth of CSV files. And those CSV files form the routing information for the entire network. These CSV files are sent weekly to individual, to all of the carriers that are subscribed to the LURG. And then they use these CSV files to manually build routing entries on their switches, sometimes using scripts, especially if they're a larger carrier. And within these, the LURG entries, there will be a bunch of codes known as Silly Codes. The Silly Codes identify each individual switch or routing entity on the network. And then these codes are then manually associated to either SS7 point codes, in the case of SS7 signaling, which is the most common, especially for legacy networks, or sometimes for VoIP signaling in the case that the two carriers have implemented VoIP between each other. This is a very manual process, obviously, and it takes, on average, 30 to 60 days for the network to update with a new full CO code, and about 14 days for a new thousands block. It's slow, very, very slow. And the reason for this is, again, it's a very manual process. Those switches do not have the capability to communicate routing information to each other. So we have to maintain the routing information centrally. All of these different parts of the network are governed by separate regulatory bodies that you're going to have to interface with. So phone numbers are governed by NANPA, or the North American Numbering Plan Authority. Portability and number porting is governed by NPAC. Operating company numbers, or OCNs, which identify individual telcos, and individual telcos in a state, are governed by NECA. And then silly codes, the SS7 point codes themselves, the LURG, and IAC codes, and basically any other code that you'll need, is controlled by a company called iConnective, which is basically allowed by the FCC to have a monopoly on routing information for the entire network. Billing is another interesting topic. In almost all cases, the calling party pays. It's not billed 95.5 like internet traffic is, it's strictly billed per minute based on the calling party paying, with each call counting as an additional billing counter. The calling customer pays the calling local exchange carrier, the calling local exchange carrier pays the IXC that they're using to route that call, the calling IXC pays the receiving IXC. The money flows along the call path from entity to entity. It's not end to end, it's hop by hop. And there are also a few special cases, the most prominent is 800 numbers, where the money basically flows in reverse. There are entities known as RESP orgs, or responsible organizations, which handle the toll free routing, and they handle billing for that routing, and the billing passes from the called party back to the caller. 900 numbers and 500 numbers used to be special cases, because they were premium numbers that were up charged. However, these numbers don't exist anymore. The software to bill them no longer exists, so they're not routable on the current phone network. Local calls are almost always unmetered, or if they are metered, they are paid per call, not paid per minute. So now, with all of that information, all of that details about the phone network, let's actually get to doing something interesting and useful with it. We'll start with access stimulation. So if you were listening during the segment where I was talking about phone number billing, you may have noticed that the calling party always pays. And since most people nowadays have an unlimited minutes plan on their phone, can you make money off of this? You know, having people just call you and collecting the money? And the answer is yes. Access stimulation has been one of the longest running legalized abuses of the process since the very early days of competitive local exchange carriers. And the process goes about like this. We have, you know, so all we have to do in order for this to work is to get people to call us. It is that simple. Because the money will always flow along the calling path and our carrier will pay us. So we just have to generate a volume of calls. So imagine it's 1996 and you need people to call you and sit on the line with you for a long period of time so you can make money. How are you going to do this? And the answer is dial up. Dial up in 96 was the golden ticket for this. There were many, many, many, many companies. Dial up calls were 100% inbound and people sat on the line for hours so they could just rack up the billing. They would sit on the line and the dial up ISP would, you know, become a SELEC. Since they weren't serving real customers, they didn't have to run lines, you know, they didn't have to get a fancy switch. They had almost no costs. They just had to connect their dial up modems into the interconnection trunks that they were getting from the RBOC and they could collect those inbound minutes and profit off of this. However, the FCC would kill it in 2001 with the ISP remand order. They would rule, and I still do not understand where they got this from, but they ruled that internet traffic is considered interstate because it's going to the internet rather than another person at a fixed location. I still don't know how the FCC came up with this ruling, but they basically did it so that they could seize control over the reciprocal compensation for those ISP calls which had previously been a state issue. And then the FCC basically said, since this is interstate, we can set the rates for it. We say you get nothing. You know, this doesn't count. ISP calls don't count. You can't get compensation for them. Later on, much later on, they would kill local compensation for local calls altogether. However, there was still another plan. All we have to do is get people to call us. So if dial up isn't working, what are we going to do now? We're going to give people free stuff. Freeconferencecall.com is one of the original people who pioneered this space, but there were a lot more. Basically, any music, chat line, conference site, anything that people would call into and use for long periods of time. And critically, during the period between 96 and when dial up died, when the dial up loophole died, people got unlimited long distance packages where they could talk long distance for a long time or almost unlimited amount of time. We combined the free stuff with locating our numbers in the middle of nowhere so we can harvest higher per minute rates from them. We combine that with our unlimited plans and we get a pile of money. We're talking millions upon millions of dollars back when this was running out of its head. And we make AT&T extremely mad. This likely cost AT&T more in a month than all of the freaks of the 60s and 70s did the entire time they were operating. The scale of this was really astronomical. And it hit its peak during COVID, back when everyone was calling into conference call sites. However, this too would die. In 2011, the FCC finally closed the loophole and said that if you're doing a revenue share agreement with the person who's driving your inbound traffic and you either have an over 3 to 1 in out ratio or 100% year on year increase in inbound calls, you don't get access revenue. Unfortunately, there was still another loophole. In certain rural areas, there were specialized collector IXCs that basically pooled access to a bunch of rural co-ops and collected that long distance traffic and they could bill for that. So we would put our access stimulation behind like 20 of these that still existed and have them bill it. Because that was a loophole . The FCC would close that loophole. We would try again. And we would add an IPES company between the LEC and the high volume to end point and now the LEC would bill the access minutes. And this was also a loophole. They only closed this one last year. And, of course, people have moved on to something else. This, like I said, it's the longest running basically free money glitch in the phone network. People have been using this for years. I'm sure people still continue to use it until they get rid of per minute charging for long distance calls. And you may be wondering why do you care about this? And if you looked at your PBX logs, if you have SIP exposed, you may have noticed that there are a lot of people attempting to brute force your box. Why? Why are people trying to brute force PBXs on the internet? How is that a profitable activity for them? And the answer is that this same principle that works for domestic calls also works for international calls where the rates aren't, you know, half a cent per minute. They're 50 cents a minute. And if someone is actually able to get in your PBX and you've got international dialing enabled, or hell, even if you've got domestic dialing enabled, they will run up a tremendous bill on your PBX until you figure out that you've been hacked and you close the loophole. It is a pretty big money attack and it's the reason why everyone is always trying to brute force into your SIP servers. Now let's get on to another attack. Something more traditionally freaky. Let's say we want to make robocalls and we don't want people to be able to identify that we're making them. In the FCC quite recently added a new SIP header that mandated that all telecoms use it. This SIP header was the stir shaken header. The stir shaken header added a cryptographic signature to every call that contained certain critical details about the call and an attestation level. A, for a fully verified caller ID where you assign the number to the user. B, for a verified customer where you knew the customer but you didn't know that the number they were using was legit. And C, if you were just a gateway passing on a call to someone else. Passing on a call you got from another carrier on to someone else with no real information. But you may have noticed that if you have a phone you've still been getting robocalls. This hasn't fixed anything and the robocalls you're getting are still spoofed. This has fixed nothing. So how are the robocalls getting away from this? If you think about it, if you have a stir shaken certificate for them the police should just be able to roll up and arrest you. But this hasn't worked. And the answer to this is something that I'm calling the TDM shuffle. In a normal telephone arrangement everyone will generally prefer IP trunks because they're faster, they're easier, they're cheaper. And most major carriers, especially people doing real volume and the major cell companies have IP trunks between each other because they want to take advantage of those discounts. However, if we choose a provider that's, let's say, spammer friendly, that provider can choose where and how they're going to send out those calls. So they can choose to force those calls over the old school TDM network instead of the newer IP trunks. This means that those calls will lose their stir shaken header once they go over TDM because TDM doesn't support stir shaken. So that header gets stripped out and then eventually once the call reenters the IP network a gateway node is going to see that it doesn't have a signature on it and is going to slap a C attestation on it. If you're really lucky you'll hit a misconfigured PSTN gateway that puts A attestation on everything. But either way you've now gotten your spoofed caller ID to have a legitimate stir shaken certificate on it and the original destination of that call has been completely muggled and no one knows where it came from. There are a bunch of approaches to this and ways that this can happen. The spammer can directly run TDM trunks into their boxes. More likely the spammer will use a carrier that they know will support TDM. Sometimes the spammer can try and force the routings to force a call over a legacy pathway by calling between two providers that they know don't have trunks, that they know don't have IP trunks even if both of the providers are legitimate. This can sometimes just be coincidental. A lot of phone companies especially in rural areas or just for whatever reason are still TDM only. A large part of the network, I'd say about 40 percent of calls today are still hitting TDM at some point in the call chain. So, you know, a lot of times that this stir shaken header gets popped out and with the weird routings, this can be very hard to diagnose and much harder to actually definitively prove to be malicious. There is a standard for TDM shaken. However, there is no yet, there is no date yet on a forced implementation. There is no agreement on how the implementation would work. The FCC is working on it but they are not done yet. And I'm sure the fact that the robocall carriers are harvesting millions of dollars in revenue for carrying these robocalls has absolutely nothing to do with the fact that we haven't gotten a fix for this yet. Now, let's say we want to do something a bit less technical. We're not a carrier, we're just a jerk and we want to blast people with spam. We can harvest a technique that will be familiar to anyone from the old days of email spamming. I call it snowshoe. But essentially what we do is we get 20 shell companies and each shell company signs up with 20 mom and pop or super tiny VoIP providers that aren't doing good KYC, that aren't doing proper attestation, they're not doing caller ID filtering on their outbound calls. And all of these companies are going to get like 5% of the overall spam volume. So the spammer might be having a tremendous spam pipe cranking out tens of thousands of calls a day. Remember the car warranty robocall thing was one guy. That was one spam operation. That was one guy and he had all of these accounts with a bunch of other people and he was blasting these calls out and basically spreading them out. So even if any one of these entities would get zapped by the government, there would be no way to really get the root guy because it was all shell companies. This was combined with the fact that a lot of these small carriers aren't doing KYC properly. They don't know who their end customer is. They're not stopping that customer from sending out stupid amounts of traffic for their profile size. They'd let a residential customer have 100,000 lines active and that can become a real powerful attack vector. This is made even better by the fact that numbers are so cheap now. If numbers are one cent each, we're going to buy one per day per company and just switch them out. And major, like the state attorney's general robocall report has noted that this is one of the big issues they're seeing. That caller ID filtering has become almost useless because spammers will never use the same caller ID for more than a couple of calls. And we can, of course, mix and match both of these techniques for maximum damage, spreading calls across piles of tiny middle of nowhere in the country, TDM carriers, all of which aren't doing KYC, all of which are muddling the call flow and all of which can never be tracked back to us, especially when you consider that a lot of these carriers have three or more resellers and other entities in the chain between customer and the actual entity in the LERP responsible for routing. And since only inbound carriers require licenses, none of these high volume VoIP carriers are regulated, so you can't take away their license. You can't kick them off the network. You've got a recipe for infinite robocalls with almost no mitigation. And this is just scratching the surface of carrier side VoIP abuse. Again, once you get your certification, the doors are open to you. You can do everything that you want pretty much legally. You've got local number portability abuse. You don't need a pin for wireline ports. You can just make a fake LOA and steal someone's number. SS7 devices haven't been pen tested in, I think, ever. And that's not even considering just plain freaking, sending out calls with no ANI, sending out calls with a charge number set to someone you don't like because they get billed for it. Sending out, using your access as an AOCN to hijack number blocks and numbering resources. Vulnerabilities on 20‑plus‑year‑old hardware like 5Es and DMS100s that have never been pen tested but have a bunch of interfaces that may not be accessible to the public but are certainly accessible to other telcos. You're basically only limited by your time and the imagination you're willing to put into this. It's like a new Internet to play with. It's wonderful. Now, finally, hopefully you're all interested enough that we can discuss CLEC formation, the actual process to become a phone company. So let's do this. And let's do this quickly. So, you know, first thing you're going to do is you're going to need to get certification. So then establish interconnection with another phone company so your calls will route. Set up a switch, get your numbers and then handle taxes. So there are a bunch of different types of certification. I'll let you read this slide later. It's on the server. But the key ones you need to understand, the ILEX are existing phone companies before 96. There are no new ones. You either have to buy one or merge into it. CLECs are new wireline companies and cell companies are wireless companies and IPEZ are IP only. In terms of picking which one you want to get, if you can afford it and you don't plan to be doing wholesale minutes because wireless carriers have to sell wireless, wireless is by far the easiest type. It's included with your wireless certification. So if you can track down any common carrier wireless certification, you're basically good to go. If you don't need interconnection agreements, you can get an IPEZ. However, it's nationwide. It has minimal ongoing paperwork. However, the FCC is slow and expensive to deal with and, again, you don't get to do interconnection agreements. So you're basically completely shut out of TDM. If you want maximum power, like you want the full set of certifications, you want to be as mobile as you can be. You want to get a CLEC certification. However, the downside is that these are a lot of paperwork. You have to get one for each state you want to operate in. So you have to file paperwork in each state and you need to file ongoing reports in each state. It's also a tax headache because, again, you have to pay taxes in each state. However, the application process for all of these, again, except mobile, is fairly simple. You file with the State Public Utilities Commission. You need, in general, some financial information, balance sheets and income statements, resume for your key executives and key personnel, descriptions of the service area that you want to serve and the services to be offered. This can be the whole state and everything. Just write something that sounds good for, you know, those categories and a brief description of what equipment you want to put together. Again, the people at the POC aren't really tech experts. They just want to have some idea of what you're going to be setting up. Then be prepared to wait about 30 to 90 days. In terms of getting approved, the best advice I can give you is to read the Public Utilities Commission docket. Every application that has ever been filed is public and it's in there. You can read the applications that got approved and, more importantly, you can read the ones that didn't. You do what's in the good ones. You don't do what's in the not good ones. Download one that got approved quickly by a major carrier and modify it to suit your needs. Generally, however, having a team is better. Hacking is a social activity, especially phone hacking. The more people you have on it, the more years of experience you're able to show, the better. This goes doubly well if you have actual telecom experience, but this isn't a necessity. Just have some idea of what you're doing. The biggest and most important thing is you can't have a criminal record or judgments, especially for fraud or consumer abuses. I don't know about other stuff, but I know that, basically, if you got convicted for defrauding people, they're never going to give you a license for obvious reasons. You also need some amount of money. The actual amount varies from zero in liberal states, not liberal as in politically liberal, liberal as in giving out licenses, to a fairly decent chunk in other states that require you to have a specific amount of equity or a specific balance. Again, check your state's website and read your state's laws. Read the laws. It will tell you what needs to be in the application. Make sure you put that stuff in there. And don't be afraid to call. Generally, the public utilities commissions are more friendly than you might think. You'll have to shop around a bit to get to the right person, but generally, once you get to the right guy, they'll be able to help. It's not as hard as it used to be. In the 90s, it was very difficult to get approved. Now, it's almost deregulated, so you just have to do a box ticking exercise almost. Once you've got your certification, you need to get interconnection. There are two kinds. Local, for where your numbers live, and long distance or feature group D for everything else. Inbound calls are hard. Outbound calls are fairly easy, because for outbound, you just use a normal SIP trunk for everything that's not local. The first step is to pick a ladder and a rate center that you're going to be getting numbering resources in. You have to pick the geographic location in the rate center in order to figure out what kind of interconnection you need and where you're going to grab it from. Local interconnection is the harder of the two. You need to find, you're going to need to get an ICA in the area where you want to get numbers, in the rate center where your numbers are going to live. For RBOX, this process is fairly standardized. If inflexible, you're going to send them an email. They're going to send you an information request form and credit application, and then a draft interconnection agreement that's part of their standardized template. You're going to fill out the draft ICA and send it back to them, and you're done in about a month. For a smaller ILAC, the process is a lot more variable, because they almost certainly won't know you're talking about. You're going to have to go through multiple rounds of people until you either get their regulatory guy or their, you know, whoever's responsible for that at their company. And you might have to send them a draft ICA, because they might not have one on file. But the upshot to this is that even though it's harder to deal with them, they are more willing to negotiate and more flexible. So if you need something that the RBOX doesn't want to give you, they'll be more helpful. If you want to deal with TDM, you've got a few difficulties. So firstly, the actual media part of TDM is pretty easy. Cheap T1 media gateways are everywhere. However, SS7 is a real killer. If you have to deal with it, you're basically going to have to develop a custom platform , because it's not supported on anything. However, you can order MF trunks still in a lot of parts of the country, so you can use MF to avoid this. There are also interconnect companies that make the process easier. However, there are a lot more. These companies basically provide you a TDM IP translation service. However convenient this may be, it also is an added cost per minute and sometimes per number. You know, check with whatever provider you're going to deal with. But this avoids having to pay for either a fiber mid‑point splice or leased facilities from the ILAC. This isn't that bad in terms of actually ordering real TDM from the ILAC if you're close to them, if you're in the same ladder, if you're in their service territory. However, if you're outside of their service territory, those rates are no longer regulated and therefore are obscenely expensive. We're talking tens of thousands of dollars for a single T1 if you need to run it between states or something. So again, your mileage may vary. If you're staying local, you might be able to just deal with the RBOC directly. If you're not, you might have to do something different. Long distance interconnection, thankfully, is a hell of a lot easier. You can just get an ICA with your RBOC. If you have an ICA with your RBOC and you're doing TDM, you can just do long distance through them. Otherwise, you're going to want to look for an access homing tandem service. This is either cheap or free. Again, depending on who you deal with. If you're doing decent volume, you can even get some of that access revenue that we were talking about before. In either way, this is easier to get because, you know, there's no incentive for long distance companies to protect their brand or their territory. It's a profit center for them to be selling interconnection because they're getting a fraction of that permanent revenue. Switch building is where you really get to exercise your creativity. A couple of the major SIP platforms, I have their logos up, but you're going to pick one or multiple of these and put something together. Generally, you're going to need a session border controller or a gateway signaling element to deal with SIP and load balancing and that sort of thing. And then some sort of media element to do codec translation, to do NAT traversal, that sort of thing. This is where you can really show your creativity and make your voice service unique. There's a ton of flexibility you can show here, but it is a bit of a larger project because you're going to have to develop something. Again, this is also sort of what you want to do. You can get away with a single asterisk box if you just want to be tiny and serve yourself, but if you want something production ready, you're going to need to do more. A couple key notes here, IMS is the standard for LTE. It's confusing, difficult and generally a nightmare to work with, but you do need it if you want to deal with phones or if you want to follow the technical standard for residential VoIP services. But no one really uses it if they don't have to. And finally, commercial switches, your old stuff, your 5Es, your DMS100s or your meta switches and ribbons if you want to buy modern stuff are very expensive and less customizable, but rock solid reliability. We're talking five nines for a single box and have everything you're going to need out of the box. So if you want to, if you're willing to pay out of pocket for them, you know, they might be worth it. There are a couple pitfalls with switches. Biggest one is Lex style routing. So local and interlattic calls, you're going to have to pick those out and make sure they go over the correct trunks. You may have to support equal access depending on whether someone asks you to and the regulations in your state. Again, check your local laws. And you may have to deal with TDM and SS7 as we were talking about before. So you may need media gateways. You may need other, you know, gateway type elements. You may need an SS7 signaling gateway. Billing can be a real nightmare if you want to do proper, you know, telco style billing where you're billing local calls separately, you're billing per minute, you're billing cabs or access revenue for inbound. You're also going to have to deal with high availability and failover if you want to meet certain state standards for, you know, time, for uptime. A lot of states have a standard of four nines of uptime for your switches. So you may have to, you know, make sure you're suitably reliable and not just running on one box. You may also want to go multi‑site, especially if you're going to be pumping a lot of traffic through one central instance. There are issues for how to do this, you know, clustering and that sort of thing. VoIP is not particularly easy to cluster like, you know, websites. Once you've got your switch set up, you're on the home stretch. Now all you need to do is follow for your numbering resources. You're going to go to NAMPA or the North American Numbering Plan Authority, you're going to send them your OCN, you're going to send them your long distance interconnection details and you're going to send them your silly code for your switch. Then you're going to wait 45 to 90 days to get your central office code or a bit less if you're just getting a thousands block. Once you're approved by NAMPA, you're going to get an AOCN to put the numbers into birds and set up the routing records. You're going to talk to them about how you want to get your routing set up and then you're going to input your numbers into NPAC so people can port them. After you're all set up and all fully online, you're going to submit part four with NAMPA and if your numbers are pooled, you'll also have to send in a PSTN confirmation to say basically a test that you've fully built out the block. And then you're done. You are now an official phone company with your own numbering resources built out and with your own interconnection set up and routed. We're going to finally have a few concluding notes and hopefully get that done before we run out of time. So firstly, if you're a phone company or hell, even if you have an internet connected PBX, monitor your call and SIP logs, set alerts for unexpected usage, especially for weird international destinations. Lock down those weird international destinations. If you're a normal company, why are your employees calling Uganda? They probably shouldn't. Nothing wrong with Uganda, just they charge like 50 cents a minute for a call. So you want to make sure that's not happening if it doesn't have to be. Did rotation or people swapping out phone numbers, if you're a carrier, is not normal and is almost a certain sign that that person is using your service to send spam calls, you're going to want to monitor your customers too. Know the real person behind every company, know who's making your calls, know who you're dealing with and set limits on your switches to match that. If a customer says they're a home, they don't need to be making 40 calls at the same time. If a customer says they're a large business, you should expect them to not be switching out their numbers every two days because that's not normal for anyone. And never give out people the ability to swap out their caller ID and basically supply what the caller ID is going to be, unless you absolutely have to. It's the number one way that spammers are able to abuse phone services. In terms of public policy, if we have any feds in the room, require ILEX to support IP interconnection. This would solve a huge chunk of our issues for the TDM shuffle, the evasion of Starshaken. And it would also, at the very least, get the FCC moving on mandating out of band Starshaken support. This would be a big thing for fixing a lot of those problems. End user shaking might also be a good idea. If you force the end user PBX to sign the call, rather than the calling carrier, this would allow us to set a proper black hole list for PBX for people whose calls are frequently associated with spam. And it would allow us to track the call directly back to the originator rather than their carrier. And we also need better enforcement against criminal telcos. I have no proof of this, but I would estimate that 50 plus percent of all robocalls right now come from less than 10 carriers who make this a market for them. These guys need to be kicked off the network, because they're the source of all the spam, basically. Finally, I will ask you nicely, if any of you have equipment that you don't need, please, like, if you have 5Es, if you have old step by step stuff, you know, even if you have, like, mainframe gear, I've also got the Z14, if you have anything, or if you just are an ISP, an IXE, a WEC, an ASN, you want to peer with me, I'll connect with anyone and I will give any unloved equipment a new home. Finally, I'd like to give a thanks, first, to DEF CON for inviting me here to speak. Second, to LiveWire Telecom and my friend Dylan Cruz, who knows far more about TDM and the old phone network than I ever will and has been a tremendous help in this. Wide Voice, who is my future group D carrier, and I have nothing but good things to say about their service. And finally, YKC Communications in Ganado, Texas, who did not have a choice when I sent them an interconnection request, but was still a good sport about cooperating, so thanks for following the law and being a good sport, I guess. And finally, call me. This is my information. I love talking about phone stuff with people, and I have no one to talk about it with. Please reach out. I will talk your ear off about any of this stuff. I love to talk to you, but I love to talk about phones. And I think we're done with one minute to spare.