{"id":{"repo_id":"nps","oai_identifier":"oai:calhoun.nps.edu:10945/69686"},"canonical_url":"https://search.ndltd.org/etd/nps/oai:calhoun.nps.edu:10945/69686","repository":{"repo_id":"nps","name":"Naval Postgraduate School","base_url":"https://calhoun.nps.edu/server/oai/request"},"display":{"title":"A MACHINE LEARNING APPROACH FOR CLASSIFYING JAVASCRIPT USING STATIC CODE ANALYSIS","abstract":"This thesis develops a machine learning approach to classify normal and anomalous JavaScript based on a static analysis of select features derived from the top 30 000 webpages on the internet. A dataset of 136 features was extracted from 100 000 raw JavaScript files. Nine test groups were created and tested using 10 subsets of features. K-means clustering was used to group the data and manually translate into binary classification. The results from the K-means clustering show moderate performance with distortions less than 1.0 from elbow plot analysis and average silhouette scores between 0.3 and 0.8 using silhouette analysis of the clustering. The classification of each JavaScript file was then examined using naïve Bayes algorithm to re-create and examine the performance of the highest performing classifiers using a less processing intensive method. Naïve Bayes was not a good model to re-create the K-means classifier. The best performing classifiers had a Matthews correlation coefficient of 0.75 when examining small JavaScript, and less that 0.38 when examining the medium or large JavaScript. The results show that most JavaScript files were small in file size, and file size was the only defining feature. No features tested effectively categorize the vast majority of JavaScript other than file size. Further research is needed to find features that more accurately encompass the majority of JavaScript to define normal JavaScript.","abstract_html":"This thesis develops a machine learning approach to classify normal and anomalous JavaScript based on a static analysis of select features derived from the top 30 000 webpages on the internet. A dataset of 136 features was extracted from 100 000 raw JavaScript files. Nine test groups were created and tested using 10 subsets of features. K-means clustering was used to group the data and manually translate into binary classification. The results from the K-means clustering show moderate performance with distortions less than 1.0 from elbow plot analysis and average silhouette scores between 0.3 and 0.8 using silhouette analysis of the clustering. The classification of each JavaScript file was then examined using naïve Bayes algorithm to re-create and examine the performance of the highest performing classifiers using a less processing intensive method. Naïve Bayes was not a good model to re-create the K-means classifier. The best performing classifiers had a Matthews correlation coefficient of 0.75 when examining small JavaScript, and less that 0.38 when examining the medium or large JavaScript. The results show that most JavaScript files were small in file size, and file size was the only defining feature. No features tested effectively categorize the vast majority of JavaScript other than file size. Further research is needed to find features that more accurately encompass the majority of JavaScript to define normal JavaScript.","abstract_has_math":false,"creators":["Miller, Michael D."],"institution":"Monterey, CA; Naval Postgraduate School","degree_name":"Master of Science in Electrical Engineering","degree_level":"Masters","degree_discipline":"Electrical Engineering","degree_department":"Electrical and Computer Engineering (ECE)","school":null,"contributors":[],"advisors":["McEachen, John C.","Tummala, Murali"],"committee_chairs":[],"committee_members":[],"year":2022,"date_issued":"2022-03","date_published":"2022-03","updated_at":"2026-11-19T06:41:15Z","subjects":[],"languages":[],"rights":["This publication is a work of the U.S. Government as defined in Title 17, United States Code, Section 101. Copyright protection is not available for this work in the United States.","Approved for public release. Distribution is unlimited."],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.programcode","label":"Dc Identifier Programcode","values":["590, Electronic Systems Engineering"],"render_values":[{"text":"590, Electronic Systems Engineering","href":null,"code":true}]},{"key":"thesis:thesis_identifier","label":"Thesis Thesis Identifier","values":["36794"],"render_values":[{"text":"36794","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10945/69686","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10945/69686","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://calhoun.nps.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Acalhoun.nps.edu%3A10945%2F69686","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["McEachen, John C.","Tummala, Murali"]},{"key":"dc:contributor.department","label":"Department","values":["Electrical and Computer Engineering (ECE)"]},{"key":"dc:creator","label":"Author","values":["Miller, Michael D."]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2022-06-10T17:15:57Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2022-06-10T17:15:57Z"]},{"key":"dc:date.issued","label":"Date","values":["2022-03"]},{"key":"dc:publisher","label":"Institution","values":["Monterey, CA; Naval Postgraduate School"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Electrical Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science in Electrical Engineering"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Naval Postgraduate School"]},{"key":"thesis:thesis_identifier","label":"Thesis Thesis Identifier","values":["36794"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject.keyword","label":"Dc Subject Keyword","values":["JavaScript","machine learning","static","behavior","large data sets","Jupyter Notebook","real world data"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:rights","label":"Dc Rights","values":["This publication is a work of the U.S. Government as defined in Title 17, United States Code, Section 101. Copyright protection is not available for this work in the United States.","Approved for public release. Distribution is unlimited."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.programcode","label":"Dc Identifier Programcode","values":["590, Electronic Systems Engineering"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10945/69686"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["This thesis develops a machine learning approach to classify normal and anomalous JavaScript based on a static analysis of select features derived from the top 30 000 webpages on the internet. A dataset of 136 features was extracted from 100 000 raw JavaScript files. Nine test groups were created and tested using 10 subsets of features. K-means clustering was used to group the data and manually translate into binary classification. The results from the K-means clustering show moderate performance with distortions less than 1.0 from elbow plot analysis and average silhouette scores between 0.3 and 0.8 using silhouette analysis of the clustering. The classification of each JavaScript file was then examined using naïve Bayes algorithm to re-create and examine the performance of the highest performing classifiers using a less processing intensive method. Naïve Bayes was not a good model to re-create the K-means classifier. The best performing classifiers had a Matthews correlation coefficient of 0.75 when examining small JavaScript, and less that 0.38 when examining the medium or large JavaScript. The results show that most JavaScript files were small in file size, and file size was the only defining feature. No features tested effectively categorize the vast majority of JavaScript other than file size. Further research is needed to find features that more accurately encompass the majority of JavaScript to define normal JavaScript."]},{"key":"dc:description.sponsorship","label":"Dc Description Sponsorship","values":["National Security Agency, Ft. Meade, MD, 20755"]},{"key":"dc:title","label":"Title","values":["A MACHINE LEARNING APPROACH FOR CLASSIFYING JAVASCRIPT USING STATIC CODE ANALYSIS"]},{"key":"dspace:entity.type","label":"Dspace Entity Type","values":["Publication"]},{"key":"local:contributor.affiliation","label":"Local Contributor Affiliation","values":["Lieutenant, United States Navy"]}]}],"canonical_facts":{"dc:contributor.advisor":["McEachen, John C.","Tummala, Murali"],"dc:contributor.department":["Electrical and Computer Engineering (ECE)"],"dc:creator":["Miller, Michael D."],"dc:date.accessioned":["2022-06-10T17:15:57Z"],"dc:date.available":["2022-06-10T17:15:57Z"],"dc:date.issued":["2022-03"],"dc:description.abstract":["This thesis develops a machine learning approach to classify normal and anomalous JavaScript based on a static analysis of select features derived from the top 30 000 webpages on the internet. A dataset of 136 features was extracted from 100 000 raw JavaScript files. Nine test groups were created and tested using 10 subsets of features. K-means clustering was used to group the data and manually translate into binary classification. The results from the K-means clustering show moderate performance with distortions less than 1.0 from elbow plot analysis and average silhouette scores between 0.3 and 0.8 using silhouette analysis of the clustering. The classification of each JavaScript file was then examined using naïve Bayes algorithm to re-create and examine the performance of the highest performing classifiers using a less processing intensive method. Naïve Bayes was not a good model to re-create the K-means classifier. The best performing classifiers had a Matthews correlation coefficient of 0.75 when examining small JavaScript, and less that 0.38 when examining the medium or large JavaScript. The results show that most JavaScript files were small in file size, and file size was the only defining feature. No features tested effectively categorize the vast majority of JavaScript other than file size. Further research is needed to find features that more accurately encompass the majority of JavaScript to define normal JavaScript."],"dc:description.sponsorship":["National Security Agency, Ft. Meade, MD, 20755"],"dc:identifier.programcode":["590, Electronic Systems Engineering"],"dc:identifier.uri":["https://hdl.handle.net/10945/69686"],"dc:publisher":["Monterey, CA; Naval Postgraduate School"],"dc:rights":["This publication is a work of the U.S. Government as defined in Title 17, United States Code, Section 101. Copyright protection is not available for this work in the United States.","Approved for public release. Distribution is unlimited."],"dc:subject.keyword":["JavaScript","machine learning","static","behavior","large data sets","Jupyter Notebook","real world data"],"dc:title":["A MACHINE LEARNING APPROACH FOR CLASSIFYING JAVASCRIPT USING STATIC CODE ANALYSIS"],"dc:type":["Thesis"],"dspace:entity.type":["Publication"],"local:contributor.affiliation":["Lieutenant, United States Navy"],"thesis:degree_discipline":["Electrical Engineering"],"thesis:degree_level":["Masters"],"thesis:degree_name":["Master of Science in Electrical Engineering"],"thesis:institution_name":["Naval Postgraduate School"],"thesis:thesis_identifier":["36794"]},"updated_at":"2026-11-19T06:41:15Z"}