Click here to close now.

Welcome!

.NET Authors: Carmen Gonzalez, Elizabeth White, Liz McMillan, Greg O'Connor, Jason Bloomberg

Related Topics: .NET

.NET: Article

Securing .NET Compact Framework Solutions

Securing .NET Compact Framework Solutions

In recent times, and with good reason - as attacks by worms such as Code Red, Nimbda, and Slammer have shown - security has been pushed to the forefront of the minds of architects and developers. And just as Microsoft has rededicated itself to security through its Trustworthy Computing Initiative, your organization should be sure to design and implement its applications using secure coding practices and principles. Even though .NET Compact Framework applications may at first appear immune to such attacks, their connection to back-end systems and their portability introduce a variety of security risks that must be mitigated.

In this column we'll review what you'll need to consider to implement security at the device, application, and communication layers.

Secure the Device
The first layer of security to consider is that provided by the device itself. In addition to relying on mechanisms provided by the device manufacturer or platform (such as the Pocket PC running on Windows CE), your organization can augment the OS software with third-party solutions. Generally, the types of security that can be used to protect the device fall into the categories of authentication, antivirus protection, and lockdown.

  • Authentication: The simplest step organizations can take to protect devices on which Compact Framework applications run is to require some form of authentication. For example, Pocket PC 2002 and later devices running Windows CE support both simple and strong power-on password authentication. By enabling this feature on the device, the user must type in a simple four-character, or more complex seven-character, password at a configurable interval that defaults to one hour. If a user enters an incorrect password, an exponentially increasing time delay is enforced, making it very difficult to repeatedly guess the password. Third-party vendors, such as Trust Digital LLC through its PDASecure product, provide power-on password authentication with additional options that include locking the device after a certain number of invalid password attempts and additionally requiring a soft reset, hard reset, or even "wiping" the device of its data.

    Although this form of authentication can be quite effective, it is based on knowledge of a password that can perhaps be obtained through illegitimate means. To implement authentication based on possession of a physical item like a smart card or a cryptographic certificate located on a removable storage card, or based on user identity through biometric (e.g., fingerprint) or signature identification, third-party products are required. Vendors such as A2000 Distribution, Certicom Corporation, and Cloakware Corporation provide a variety of such solutions.

  • Antivirus Protection: Even though viruses that target mobile devices are not as prevalent as those targeting desktop computers, they are still a potential threat to any software on the device. Typically, however, devices are not damaged by viruses but rather pass them into a corporate network via e-mail attachments and documents. There are, as you might expect, a variety of antivirus packages on the market for devices such as the Pocket PC, from vendors including McAfee, Computer Associates, and F-Secure. Additionally, personal firewall products such as VPN-1 are available from vendors such as Check Point Software Technologies Ltd.

  • Lockdown: Following the accepted security principle of "reducing the attack surface," many organizations may wish to disable some features of the device. Third-party software such as PDASecure, for example, does just that by password protecting or disabling infrared communications, ActiveSync, and the voice recorder.

    Secure the Application
    The second layer to which security should be applied is the application itself. Typically, such security includes the concepts of authentication, data protection, and user input.

  • Authentication: Of course, the main way to secure an application on the device is by requiring the user to present credentials in order to be authenticated by the application. However, depending on what data source the application uses and how it creates a connection, this process can vary greatly. For example, a Compact Framework application might need to authenticate directly to SQL Server when using the SQLClient .NET Data Provider, to a Web server and SQL Server when using Remote Data Access or replication with SQL Server 2000 Windows CE Edition (SSCE), through a SOAP request when using an XML Web service, or through HTTP when using the HTTP pluggable protocol.

    In each of these cases your application must manage the credentials. In the case where multiple sets of credentials are required (for example, for a proxy and Web server in addition to SQL Server) it is a good practice to store the credentials in an encrypted database or file on the device or even on a storage card that is required to be inserted before the application can run.

  • Data protection: This concept involves two key aspects. First, any local data used by the application must be secured. This can be most easily accomplished using the built-in encryption feature of SSCE, which encrypts the database using the RC4 symmetric encryption algorithm with a key generated from an MD5 hash of the password (which implies that the strength of the encryption is dependent on the length of the password chosen). However, if local data is stored in a file it will need to be encrypted using the CryptoAPI (which supports 128-bit encryption on Pocket PC 2002 and Pocket PC 2000 with the Microsoft High Encryption Pack installed) since the System.Security. Cryptography namespace is not supported in the Compact Framework. Additionally, third-party encryption tools such as PDASecure support encryption of individual files.

  • User input: As codified in the "Don't Trust User Input" security principle, you need to secure user input. This issue is most directly relevant when accepting user input that is subsequently used to query or update data in SSCE or on a remote SQL Server. Malicious users may attempt to insert or inject additional SQL into a TextBox control, thereby causing a possibly harmful statement to run against the database. Such SQL injection attacks can be mitigated by cleansing user input with a function. In general, user input can be checked using regular expressions through the RegEx class of the System.Text.RegularExpressions namespace. One interesting use of this class is to create a derived TextBox control that uses a regular expression to validate the text entered by the user.

    Secure the Channel
    The final aspect to securing an application involves securing the transmission of data across the network. This aspect can involve a wide range of issues, including the use of Secure Sockets Layer (SSL), Virtual Private Networks (VPNs), and Wired Equivalent Privacy (WEP).

  • Secure Sockets Layer: The most fundamental way to secure the communication channel between a device and network is the use of SSL over HTTP. Simply put, SSL uses public- and private-key encryption based on the RSA algorithm, along with the use of a digital certificate to encrypt all of the communication between a client and a server. Fortunately, support for 128-bit SSL is built into both Pocket PC 2002 and 2000 devices (with the Microsoft High Encryption Pack installed). Since SSL is used over HTTP, Compact Framework applications can use it when connecting to a back-end server using SSCE connectivity, XML Web services, or the HTTP pluggable protocol.

    On the server side, the IIS server must have a digital certificate installed for the virtual directory in which the resource (the HTML page, for example) resides. The certificate may be either one obtained from a trusted certificate authority such as VeriSign or one generated internally within the organization using Microsoft Certificate Server. In the latter case the root certificate for your organization must also be installed on the device.

  • Virtual private networks: A second option for encrypting the communication channel is the use of VPNs that rely on protocols such as the Point-to-Point Tunneling Protocol (PPTP) and the IP security protocol (IPSec) to both authenticate and encrypt communications. While Pocket PC 2002 and Windows CE .NET 4.1 devices do not support IPSec, they do support PPTP when setting up connections in the Connections tab of the device Settings. After entering the address of the VPN server for the connection, the device will prompt the user for credentials when a connection is made. In order to provide VPN functionality to Pocket PC 2000 devices or to use IPSec, a number of third-party products are available from vendors, including Certicom Corporation and Check Point Software Technologies.

  • Wired Equivalent Privacy: In wireless networks, unlike in wired LANs, walls are ineffective as a means of security since radio waves are not bound by the walls used to protect the network. A first-generation technology used to protect such networks was based on the WEP security protocol. However, this protocol was found to contain flaws that left it vulnerable to attack. As a result, WEP is considered unsecure and should not be used without additional security such as VPNs or SSL.

    Although an initiative called WEP2 was developed to address the issues with WEP, many in the industry felt it too was vulnerable to attack. However, the 802.11i standard, currently in draft form, addresses many of these security issues. While the new specification is being ratified, wireless vendors have agreed on an interim solution called Wi-Fi Protected Access (WPA). WPA support is currently being rolled out in products such as Funk Software's Odyssey Client and Meetinghouse Data Communications' AEGIS Client. In the interim other organizations using server and client software primarily from Funk and Meetinghouse have gone forward and implemented the Extensible Authentication Protocol (EAP) over the competing Tunneled Transport Layer Security (TTLS) protocol developed by Funk and Certicom and the Protected Extensible Authentication Protocol (PEAP) developed by Microsoft and Cisco Systems to allow secure access to WLANs on their corporate campuses. In addition, third parties such as MobileSys, Inc., and Altarus Corporation offer wireless encryption technology.

    Security Is Key
    We hope this column has given you a framework for thinking about how to secure your .NET Compact Framework applications.

  • More Stories By Jon Box

    Jon Box is an Architect Evangelist in Developer & Platform Evangelism with the Microsoft Corporation. He coauthored Building Solutions with the Microsoft .NET Compact Framework, published by Addison-Wesley, and blogs at http://blogs.msdn.com/jonbox/default.aspx.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    @ThingsExpo Stories
    The IoT Bootcamp is coming to Cloud Expo | @ThingsExpo on June 9-10 at the Javits Center in New York. Instructor. Registration is now available at http://iotbootcamp.sys-con.com/ Instructor Janakiram MSV previously taught the famously successful Multi-Cloud Bootcamp at Cloud Expo | @ThingsExpo in November in Santa Clara. Now he is expanding the focus to Janakiram is the founder and CTO of Get Cloud Ready Consulting, a niche Cloud Migration and Cloud Operations firm that recently got acquired by Aditi Technologies. He is a Microsoft Regional Director for Hyderabad, India, and one of the f...
    The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal today!
    While not quite mainstream yet, WebRTC is starting to gain ground with Carriers, Enterprises and Independent Software Vendors (ISV’s) alike. WebRTC makes it easy for developers to add audio and video communications into their applications by using Web browsers as their platform. But like any market, every customer engagement has unique requirements, as well as constraints. And of course, one size does not fit all. In her session at WebRTC Summit, Dr. Natasha Tamaskar, Vice President, Head of Cloud and Mobile Strategy at GENBAND, will explore what is needed to take a real time communications ...
    Chuck Piluso will present a study of cloud adoption trends and the power and flexibility of IBM Power and Pureflex cloud solutions. Speaker Bio: Prior to Data Storage Corporation (DSC), Mr. Piluso founded North American Telecommunication Corporation, a facilities-based Competitive Local Exchange Carrier licensed by the Public Service Commission in 10 states, serving as the company's chairman and president from 1997 to 2000. Between 1990 and 1997, Mr. Piluso served as chairman & founder of International Telecommunications Corporation, a facilities-based international carrier licensed by t...
    There are lots of challenges in IoT around secure, scalable and business friendly infrastructure for enterprises. For large corporations, IoT implementations are one of the top priorities of the decade. All industries are seeing a competitive need to sustain by investing in IoT initiatives. The value addition comes from improved customer service, innovative product and additional revenue streams. The data from these IP-connected devices can be leveraged for a variety of business applications as well as responsive action controls. The various architectural building blocks of an IoT ...
    SYS-CON Events announced today that MangoApps will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY., and the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. MangoApps provides private all-in-one social intranets allowing workers to securely collaborate from anywhere in the world and from any device. Social, mobile, and easy to use. MangoApps has been named a "Market Leader" by Ovum Research and a "Cool Vendor" by Gartner...
    SYS-CON Media announced today that @ThingsExpo Blog launched with 7,788 original stories. @ThingsExpo Blog offers top articles, news stories, and blog posts from the world's well-known experts and guarantees better exposure for its authors than any other publication. @ThingsExpo Blog can be bookmarked. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago.
    The world's leading Cloud event, Cloud Expo has launched Microservices Journal on the SYS-CON.com portal, featuring over 19,000 original articles, news stories, features, and blog entries. DevOps Journal is focused on this critical enterprise IT topic in the world of cloud computing. Microservices Journal offers top articles, news stories, and blog posts from the world's well-known experts and guarantees better exposure for its authors than any other publication. Follow new article posts on Twitter at @MicroservicesE
    SYS-CON Events announced today that robomq.io will exhibit at SYS-CON's @ThingsExpo, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. robomq.io is an interoperable and composable platform that connects any device to any application. It helps systems integrators and the solution providers build new and innovative products and service for industries requiring monitoring or intelligence from devices and sensors.
    Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities. Accordingly, attendees at the upcoming 16th Cloud Expo at the Javits Center in New York June 9-11 will find fresh new content in a new track called PaaS | Containers & Microservices Containers are not being considered for the first time by the cloud community, but a current era of re-consideration has pushed them to the top of the cloud agenda. With the launch of Docker's initial release in March of 2013, interest was revved up several notches. Then late last...
    Wearable technology was dominant at this year’s International Consumer Electronics Show (CES) , and MWC was no exception to this trend. New versions of favorites, such as the Samsung Gear (three new products were released: the Gear 2, the Gear 2 Neo and the Gear Fit), shared the limelight with new wearables like Pebble Time Steel (the new premium version of the company’s previously released smartwatch) and the LG Watch Urbane. The most dramatic difference at MWC was an emphasis on presenting wearables as fashion accessories and moving away from the original clunky technology associated with t...
    SYS-CON Events announced today that Litmus Automation will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Litmus Automation’s vision is to provide a solution for companies that are in a rush to embrace the disruptive Internet of Things technology and leverage it for real business challenges. Litmus Automation simplifies the complexity of connected devices applications with Loop, a secure and scalable cloud platform.
    In 2015, 4.9 billion connected "things" will be in use. By 2020, Gartner forecasts this amount to be 25 billion, a 410 percent increase in just five years. How will businesses handle this rapid growth of data? Hadoop will continue to improve its technology to meet business demands, by enabling businesses to access/analyze data in real time, when and where they need it. Cloudera's Chief Technologist, Eli Collins, will discuss how Big Data is keeping up with today's data demands and how in the future, data and analytics will be pervasive, embedded into every workflow, application and infra...
    From telemedicine to smart cars, digital homes and industrial monitoring, the explosive growth of IoT has created exciting new business opportunities for real time calls and messaging. In his session at @ThingsExpo, Ivelin Ivanov, CEO and Co-Founder of Telestax, shared some of the new revenue sources that IoT created for Restcomm – the open source telephony platform from Telestax. Ivelin Ivanov is a technology entrepreneur who founded Mobicents, an Open Source VoIP Platform, to help create, deploy, and manage applications integrating voice, video and data. He is the co-founder of TeleStax, a...
    As Marc Andreessen says software is eating the world. Everything is rapidly moving toward being software-defined – from our phones and cars through our washing machines to the datacenter. However, there are larger challenges when implementing software defined on a larger scale - when building software defined infrastructure. In his session at 16th Cloud Expo, Boyan Ivanov, CEO of StorPool, will provide some practical insights on what, how and why when implementing "software-defined" in the datacenter.
    How is unified communications transforming the way businesses operate? In his session at WebRTC Summit, Arvind Rangarajan, Director of Product Marketing at BroadSoft, will discuss how to extend unified communications experience outside the enterprise through WebRTC. He will also review use cases across different industry verticals. Arvind Rangarajan is Director, Product Marketing at BroadSoft. He has over 19 years of experience in the telecommunications industry in various roles such as Software Development, Product Management and Product Marketing, applied across Wireless, Unified Communic...
    So I guess we’ve officially entered a new era of lean and mean. I say this with the announcement of Ubuntu Snappy Core, “designed for lightweight cloud container hosts running Docker and for smart devices,” according to Canonical. “Snappy Ubuntu Core is the smallest Ubuntu available, designed for security and efficiency in devices or on the cloud.” This first version of Snappy Ubuntu Core features secure app containment and Docker 1.6 (1.5 in main release), is available on public clouds, and for ARM and x86 devices on several IoT boards. It’s a Trend! This announcement comes just as...
    The only place to be June 9-11 is Cloud Expo & @ThingsExpo 2015 East at the Javits Center in New York City. Join us there as delegates from all over the world come to listen to and engage with speakers & sponsors from the leading Cloud Computing, IoT & Big Data companies. Cloud Expo & @ThingsExpo are the leading events covering the booming market of Cloud Computing, IoT & Big Data for the enterprise. Speakers from all over the world will be hand-picked for their ability to explore the economic strategies that utility/cloud computing provides. Whether public, private, or in a hybrid form, clo...
    Internet of Things (IoT) will be a hybrid ecosystem of diverse devices and sensors collaborating with operational and enterprise systems to create the next big application. In their session at @ThingsExpo, Bramh Gupta, founder and CEO of robomq.io, and Fred Yatzeck, principal architect leading product development at robomq.io, will discuss how choosing the right middleware and integration strategy from the get-go will enable IoT solution developers to adapt and grow with the industry, while at the same time reduce Time to Market (TTM) by using plug and play capabilities offered by a robust I...
    IoT is still a vague buzzword for many people. In his session at @ThingsExpo, Mike Kavis, Vice President & Principal Cloud Architect at Cloud Technology Partners, discussed the business value of IoT that goes far beyond the general public's perception that IoT is all about wearables and home consumer services. He also discussed how IoT is perceived by investors and how venture capitalist access this space. Other topics discussed were barriers to success, what is new, what is old, and what the future may hold. Mike Kavis is Vice President & Principal Cloud Architect at Cloud Technology Pa...